Entegrasyon SharePoint RAPIDE: Echantiyon kòd pou yo ekspoze tout disponib Vues RAPIDE

Isit la se yon kòd ki montre tout vues disponib nan yon AN sèvè ki baze sou sa rele a QRServer (sèvè pwosesis la ak sa nou kominike). Mwen ofri sa a pou ba ou tout yon tan de sa, se tankou pou itilize a fourni VIT API.

itilize Sistèm;
itilize System.Collections.Generic;
itilize System.Linq;
itilize System.Text;
itilize Com.FastSearch.Esp.Search;
itilize Com.FastSearch.Esp.Search.Http;
itilize Com.FastSearch.Esp.Search.Navigation;
itilize Com.FastSearch.Esp.Search.Query;
itilize Com.FastSearch.Esp.Search.Result;
itilize Com.FastSearch.Esp.Search.View;
itilize System.Collections.Specialized;
itilize System.Collections;


espace Conchango
{
    klas EnumerateFASTViews
    {
        menm jan vid Pwensipal(filè[] args)
        {

            ISearchFactory searchFactory;

            NameValueCollection nameValueCollection = nouvo 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", "OBTENIR");

            searchFactory = SearchFactory.NewInstance(nameValueCollection);

            Konsole.WriteLine("Total de Vues: [" + searchFactory.GetSearchViewList().Konte + "].");

            int mwen = 0;

            foreach (objet ou menm nan searchFactory.GetSearchViewList())
            {
                Konsole.WriteLine("View [" + m     + "]: [" + o.ToString() + "].");

            }

            Konsole.ReadLine();

        }
    }
}

Note ke mwen konsidere tèt mwen yon pyès à C# pwogramè e mwen gen ti po, Se poutèt sa, pa voye tout framboises mwen, sitou si: la "foreach (objet nou menm nan …)" construct 🙂

</fen>

Technorati baj: ,

Vous pou m' blog.

kite yon repons

Adrès imèl ou pa pral dwe pibliye. Jaden obligatwa yo make *