当前位置: 首页>>代码示例>>C#>>正文


C# Search类代码示例

本文整理汇总了C#中Search的典型用法代码示例。如果您正苦于以下问题:C# Search类的具体用法?C# Search怎么用?C# Search使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Search类属于命名空间,在下文中一共展示了Search类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IdenticaClient

        public IdenticaClient(string username, string password)
        {
            Statuses = new Statuses(this);
            Account = new Account(this);
            DirectMessages = new DirectMessages(this);
            Favourites = new Favourites(this);
            Block = new Block(this);
            Friendships = new Friendship(this);
            Lists = new List(this);
            Search = new Search(this);
            Users = new Users(this);
            FriendsAndFollowers = new FriendsAndFollowers(this);

            Credentials = new BasicAuthCredentials
            {
                Username = username,
                Password = password
            };

            Client = new RestClient
                         {
                             Authority = "http://identi.ca/api",

                         };            
            
            Authority = "http://identi.ca/api";

            Encode = false;
        }
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:29,代码来源:IdenticaClient.cs

示例2: Main

        static void Main(string[] args)
        {
            var mySearch = new Search();
            List<string> myList= new List<string>();
            myList=mySearch.SplitString("din mor er en mand");

            foreach (string s in myList)
            {
                Console.WriteLine(s);
            }


            var component1 = new Component();
            component1._name = "myComponent";

            var component2 = new Component();
            component2._name = "myComponent";

           var myComponentsList=new List<Component>();
            myComponentsList.Add(component1);
            myComponentsList.Add(component2);
            var myComponents = new Components(myComponentsList);
            Console.WriteLine(myComponents.GetAvaiableQuantity("myComponent"));

        }
开发者ID:dsb92,项目名称:embeddedstock,代码行数:25,代码来源:Program.cs

示例3: VM

 /// <summary>
 /// base constructor
 /// </summary>
 /// <param name="v"></param>
 public VM(MainPage v)
 {
     view = v;
     byPoint = true;
     _searchObj = new Search();
     _rad = view._changedRadius;
 }
开发者ID:gminky019,项目名称:BING-POI-Map,代码行数:11,代码来源:VM.cs

示例4: OnboardingViewModel

 public OnboardingViewModel(
     CommuterApplication application,
     Search.SearchService search)
 {
     _application = application;
     _search = search;
 }
开发者ID:michaellperry,项目名称:Commuter,代码行数:7,代码来源:OnboardingViewModel.cs

示例5: LoadData

        /// <summary>
        /// 
        /// </summary>
        /// <param name="reload">是否是重新加载</param>
        /// <returns></returns>
        private async Task LoadData(bool reload = false) {
            this.IsBusy = true;

            var method = new Search() {
                Page = reload ? 1 : this.Page
            };
            var datas = await ApiClient.Execute(method);
            if (!method.HasError && datas.Count() > 0) {

                if (reload) {
                    this.Datas.Clear();
                }


                if (Device.OS == TargetPlatform.Windows) {
                    foreach (var d in datas) {
                        this.Datas.Add(new SearchedItemViewModel(d, this.NS));
                    }
                } else
                    this.Datas.AddRange(datas.Select(d =>
                        new SearchedItemViewModel(d, this.NS)
                    ));

                //this.NotifyOfPropertyChange(() => this.Datas);
                this.Page++;
            }

            this.IsBusy = false;
        }
开发者ID:zhangcj,项目名称:Xamarin.Forms.Lagou,代码行数:34,代码来源:IndexViewModel.cs

示例6: Index

        public ActionResult Index(Search<Product> search)
        {
            if (!ModelState.IsValid)
                return View (search);

            var qry = from x in Product.Queryable
                  orderby x.Name
                  select x;

            if (!string.IsNullOrEmpty (search.Pattern)) {
                qry = from x in Product.Queryable
                      where x.Name.Contains (search.Pattern) ||
                            x.Code.Contains (search.Pattern) ||
                            x.Model.Contains (search.Pattern) ||
                            x.SKU.Contains (search.Pattern) ||
                            x.Brand.Contains (search.Pattern)
                      orderby x.Name
                      select x;
            }

            search.Total = qry.Count ();
            search.Results = qry.Skip (search.Offset).Take (search.Limit).ToList ();

            ViewBag.PriceLists = PriceList.Queryable.ToList ();

            return PartialView ("_Index", search);
        }
开发者ID:mictlanix,项目名称:mbe,代码行数:27,代码来源:PricingController.cs

示例7: SearchAgent

		public SearchAgent(Problem p, Search search) 
		{
			actionList = search.search(p);
			actionIterator = actionList.GetEnumerator();
			searchMetrics = search.getMetrics();

		}
开发者ID:langeds,项目名称:aima,代码行数:7,代码来源:SearchAgent.cs

示例8: InvalidCollectionReturnsError

 public void InvalidCollectionReturnsError()
 {
     //try
     //{
     //	ClearContainer();
     //	var container = Startup.Container;
     //	container.Register<IEndPointConfiguration>(c => new TestEndPointConfiguration());
     //	ServiceLocator.SetLocatorProvider(() => container);
     //}
     //catch (Exception)
     //{
     //	// Ignore
     //}
     try
     {
         var s = new Search<TestDocument>(new Settings("a-collection-that-does-not-exist"));
         var results = s.Execute("crownpeak");
         Assert.IsTrue(results.Count == 10, "Expected 10 results, got " + results.Count);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         // Restore the state
         SetupSearch();
     }
 }
开发者ID:Crownpeak,项目名称:Search-Results-Examples,代码行数:29,代码来源:GenericSearchTests.cs

示例9: Next

    void Next()
    {
        if(myLastSearch.mySearchee)
        {
            myPreviousBeings.Add(myLastSearch);
        }

        --mySearcheesToGo;
        myState = ConveyorBeltStates.Moving;
        myLastSearch = myCurrentSearch;
        if(mySearcheesToGo == 0)
        {
            if(myState != ConveyorBeltStates.Done)
            {
                AssessSession(false);
            }
        }
        else
        {
            myCurrentSearch = new Search();
            myCurrentSearch.mySearchee = Helper.GetNewBeing();
            myCurrentSearch.mySearchee.transform.position = new Vector3(15, 0, 0);

            myState = ConveyorBeltStates.Moving;
        }
    }
开发者ID:reruined,项目名称:LD29,代码行数:26,代码来源:Conveyorbelt.cs

示例10: MapAgent

	public MapAgent(Map map, EnvironmentViewNotifier notifier, Search search,
			int maxGoalsToFormulate) : base ( maxGoalsToFormulate) {
		
		this.map = map;
		this.notifier = notifier;
        this._search = search;
	}
开发者ID:PaulMineau,项目名称:AIMA.Net,代码行数:7,代码来源:MapAgent.cs

示例11: Start

	// Use this for initialization
	void Start () {
		int[,] map = new int[5, 5]{
			{0,1,0,0,0},
			{0,1,0,0,0},
			{0,1,0,0,0},
			{0,1,0,0,0},
			{0,0,0,0,0}
		};

		var graph = new Graph(map);
		
		
		Search search = new Search(graph);
		search.Start (graph.nodes[0], graph.nodes[8]);

		while(!search.finished)
		{
			search.Step();
		}

		print ("Search done. Path length " + search.path.Count+ " iteration " + search.iterations);
		ResetMapGroup (graph);

		foreach (var node in search.path) {
			GetImage(node.label).color = Color.red;
		}

	}
开发者ID:nguyenqphan,项目名称:IntroToPathFinding2D,代码行数:29,代码来源:PathFindingTest.cs

示例12: SetUp

        public void SetUp()
        {
            twitterClient = Substitute.For<IBaseTwitterClient>();
            searchClient = Substitute.For<IRestClient>();

            search = new Search(twitterClient, s => searchClient);
        }
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:7,代码来源:SearchTests.cs

示例13: Campaign

        public void Campaign()
        {
            var criteria = new[]
                               {
                                   new CampaignSearchCriteria
                                       {
                                           InternalName = CampaignSearchCriteria.DonatedToCampaign,
                                           SearchOperator = SearchOperator.StartsWith,
                                           Type = SearchFieldType.String,
                                           Value = "Christmas"
                                       }
                               };

            var expr = new Search().CompileCampaignCriteria(criteria, null);

            var reference = expr.LeftOperand as ObjectReference;
            Assert.IsNotNull(reference);
            Assert.AreEqual("Name", reference.GetName());
            Assert.AreEqual(SimpleExpressionType.Function, expr.Type);
            var function = expr.RightOperand as SimpleFunction;
            Assert.IsNotNull(function);
            Assert.AreEqual("like", function.Name.ToLowerInvariant());
            Assert.AreEqual(1, function.Args.Count);
            Assert.AreEqual("Christmas%", function.Args.First());
        }
开发者ID:robinminto,项目名称:GiveCRM,代码行数:25,代码来源:SearchTest.cs

示例14: ParentMenuItemFeatureCommand

 public ParentMenuItemFeatureCommand(IMainWindow mainWindow, IEnumerable<SelectedItem> selection, ParentMenuItemFeature owner, Search search)
     : base(mainWindow, selection)
 {
     Util.ThrowIfParameterNull(owner, "owner");
     _owner = owner;
     _search = search;
 }
开发者ID:huizh,项目名称:xenadmin,代码行数:7,代码来源:ParentMenuItemFeatureCommand.cs

示例15: OrgViewSearch

        private Search OrgViewSearch(Search search)
        {
            ObjectTypes types;

            if (search == null || search.Query == null || search.Query.QueryScope == null)
            {
                types = IncludeFolders ? ObjectTypes.AllIncFolders : ObjectTypes.AllExcFolders;
            }
            else
            {
                types = IncludeFolders
                            ? search.Query.QueryScope.ObjectTypes
                            : (search.Query.QueryScope.ObjectTypes & ~ObjectTypes.Folder);
            }

            QueryScope scope = new QueryScope(types);
            
            QueryFilter filter;

            if (search == null || search.Query == null || search.Query.QueryFilter == null)
                filter = Query;
            else if (Query == null)
                filter = search.Query.QueryFilter;
            else
                filter = new GroupQuery(new[] { search.Query.QueryFilter, Query }, GroupQuery.GroupQueryType.And);

            return new Search(new Query(scope, filter), Grouping, false, "", null, null, new Sort[] { });
        }
开发者ID:huizh,项目名称:xenadmin,代码行数:28,代码来源:OrganizationalView.cs


注:本文中的Search类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。