SharePoint ceev kev koom ua ke: Qauv Code kom tso saib txhua YOO Views muaj

Ntawm no yog tej chaws uas pom tias tas nrho muaj views ntawm ib CAUJ neeg rau zaub mov ntawm raug teev tus hais QRServer (txoj kev uas peb qhia neeg rau zaub mov). Kuv muab qhov no muab nej ib tug saj ntawm seb nws zoo li siv siv sai API.

siv Tsim;
siv System.Collections.Generic;
siv System.Linq;
siv System.Text;
siv Com.FastSearch.Esp.Search;
siv Com.FastSearch.Esp.Search.Http;
siv Com.FastSearch.Esp.Search.Navigation;
siv Com.FastSearch.Esp.Search.Query;
siv Com.FastSearch.Esp.Search.Result;
siv Com.FastSearch.Esp.Search.View;
siv System.Collections.Specialized;
siv System.Collections;


namespace Conchango
{
    hoob EnumerateFASTViews
    {
        zoo li qub khoob lug Main(hlua[] args)
        {

            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection = tshiab 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", "TAU");

            searchFactory = SearchFactory.NewInstance(nameValueCollection);

            Console.WriteLine("Tag nrho Views: [" + searchFactory.GetSearchViewList().Suav + "].");

            rau cov menyuam Kuv = 0;

            foreach (nruas o nyob rau hauv searchFactory.GetSearchViewList())
            {
                Console.WriteLine("Pom [" + i    + "]: [" + o.ToString() + "].");

            }

            Console.ReadLine();

        }
    }
}

Nco ntsoov tias kuv xav txog kuv tus kheej ib NW nyuam qhuav competent C# programmer thiab kuv muaj nyias daim tawv nqaij, thiaj tsis xa qhov twg raspberries kuv txoj kev, re tshwj xeeb: "foreach cov (kwv o nyob rau hauv …)" construct 🙂

</kawg>

Ntawv cim npe Technorati: ,

Subscribe rau kuv blog.

sau ntawv cia

Koj email chaw nyob yuav tsis muab luam tawm. Search cim *