本文整理汇总了C#中Search类的典型用法代码示例。如果您正苦于以下问题:C# Search类的具体用法?C# Search怎么用?C# Search使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Search类属于命名空间,在下文中一共展示了Search类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: changeSearch
public static void changeSearch(Search search = null)
{
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 3; j++)
{
if (search == Grid.searches[i, j])
{
Grid.searches[i, j].active = true;
Grid.searches[i, j].GetComponent<SpriteRenderer>().sprite = Grid.searches[i, j].activeTextures[searchIndices[i, j]];
searchRow = i;
searchCol = j;
setupColumns();
convoySearch();
targetsRolled = false;
LoadTdcTargets();
}
else {
if (Grid.searches[i, j].active)
{
Grid.searches[i, j].active = false;
Grid.searches[i, j].GetComponent<SpriteRenderer>().sprite = Grid.searches[i, j].dimTextures[searchIndices[i, j]];
}
}
}
}
}
开发者ID:tharkad,项目名称:silent-war,代码行数:27,代码来源:Grid.cs
示例17: CompareWithQrel
public string CompareWithQrel(Search search)
{
int found = 0, diff = 0;
string query = search.Query.OriginalQuery;
string qrelResult = "";
if (Queries.ContainsKey(query))
{
Qrel qrel = Queries[query];
foreach (QrelLine qrelLine in search.ResultList)
{
if (qrel.Lines.Contains(qrelLine))
{
found += 1;
}
else
{
diff += 1;
}
}
qrelResult = "Trouvé : " + found + "/" + qrel.Lines.Count + " - Résultats supplémentaires : " + diff;
}
else
{
qrelResult = "Pas de Qrel associée à ces critères";
}
return "Total : " + search.ResultList.Count + " - " + qrelResult;
}
开发者ID:tbalaye,项目名称:m2ice-websemantique,代码行数:27,代码来源:Comparator.cs
示例18: resetInstance
public static Search resetInstance()
{
if (instance != null)
instance = null; //Garbage collection
return getInstance();
}
开发者ID:kewur,项目名称:BattleSlash,代码行数:7,代码来源:Search.cs
示例19: MapToService
public MatchyBackend.Search MapToService(Search search)
{
BrancheMapping brancheMapper = null;
EducationMapper eduMapper = null;
if(search.Branche != null)
brancheMapper = new BrancheMapping();
if(search.Education != null)
eduMapper = new EducationMapper();
MatchyBackend.Search result = new MatchyBackend.Search();
if (search != null)
{
return new MatchyBackend.Search()
{
SearchTerm = search.SearchTerm,
Education = eduMapper != null ? eduMapper.MapToService(search.Education) : null,
City = search.City,
Hours = search.Hours,
Branche = brancheMapper != null ? brancheMapper.mapToService(search.Branche) : null
};
}
else
return result;
}
开发者ID:RamonEsteveCuevas,项目名称:Matchy,代码行数:26,代码来源:SearchMapping.cs
示例20: considerLink
private void considerLink(IDiagramLine l, IDiagramPort p, Search s, ArrayList items)
{
bool flag1 = (s & Search.NotSelf) == ((Search)0);
if ((l.FromPort == p) && ((flag1 || (l.ToPort.DiagramShape == null)) || !l.ToPort.DiagramShape.IsChildOf(this)))
{
if ((s & Search.LinksOut) != ((Search)0))
{
this.addItem(items, l);
}
if ((s & Search.NodesOut) != ((Search)0))
{
this.addItem(items, l.ToNode);
}
}
if ((l.ToPort == p) && ((flag1 || (l.FromPort.DiagramShape == null)) || !l.FromPort.DiagramShape.IsChildOf(this)))
{
if ((s & Search.LinksIn) != ((Search)0))
{
this.addItem(items, l);
}
if ((s & Search.NodesIn) != ((Search)0))
{
this.addItem(items, l.FromNode);
}
}
}
开发者ID:JBTech,项目名称:Dot.Utility,代码行数:26,代码来源:DiagramNode.cs
注:本文中的Search类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论