Narito ang ilang mga code na nagpapakita ng lahat ng magagamit na tanawin mula sa isang FAST server batay sa mga pangalang QRServer (ang proseso ng server na kung saan namin makipag-usap). I offer this up to give you all a taste of what it’s like to use the provided FAST API.
paggamit Sistema; paggamit System.Collections.Generic; paggamit System.Linq; paggamit System.Text; paggamit Com.FastSearch.Esp.Search; paggamit Com.FastSearch.Esp.Search.Http; paggamit Com.FastSearch.Esp.Search.Navigation; paggamit Com.FastSearch.Esp.Search.Query; paggamit Com.FastSearch.Esp.Search.Result; paggamit Com.FastSearch.Esp.Search.View; paggamit System.Collections.Specialized; paggamit System.Collections; namespace Conchango { klase EnumerateFASTViews { statik walang bisa Pangunahin(pisi[] args) { ISearchFactory searchFactory; NameValueCollection nameValueCollection = bago NameValueCollection(); nameValueCollection.Add("fastsearchengine", "Com.FastSearch.Esp.Search.Http.HttpSearchFactory"); nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.QRServers", "fastdemoback:15100"); nameValueCollection.Add("Com.FastSearch.Esp.Search.Http.RequestMethod", "GET"); searchFactory = SearchFactory.NewInstance(nameValueCollection); Mag-aliw.WriteLine("Total Views: [" + searchFactory.GetSearchViewList().Bilangin + "]."); int i = 0; foreach (bagay o sa searchFactory.GetSearchViewList()) { Mag-aliw.WriteLine("View [" + i + "]: [" + o.ToString() + "]."); } Mag-aliw.ReadLine(); } } }
Tandaan na isaalang-alang ko ang aking sarili ng bahagya karampatang C # programmer at mayroon akong manipis na balat, kaya huwag magpadala ng anumang mga raspberries aking paraan, lalo na muli: the "foreach (ang bagay at …)" construct 🙂
</dulo>