本文整理汇总了C#中SearchParameters类的典型用法代码示例。如果您正苦于以下问题:C# SearchParameters类的具体用法?C# SearchParameters怎么用?C# SearchParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SearchParameters类属于命名空间,在下文中一共展示了SearchParameters类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
_appTask = AppTask.GetTaskInOnCreate(bundle, Intent);
SetContentView(Resource.Layout.search);
SearchParameters sp = new SearchParameters();
PopulateCheckBox(Resource.Id.cbSearchInTitle, sp.SearchInTitles);
PopulateCheckBox(Resource.Id.cbSearchInUsername, sp.SearchInUserNames);
PopulateCheckBox(Resource.Id.cbSearchInNotes, sp.SearchInNotes);
PopulateCheckBox(Resource.Id.cbSearchInPassword, sp.SearchInPasswords);
PopulateCheckBox(Resource.Id.cbSearchInTags, sp.SearchInTags);
PopulateCheckBox(Resource.Id.cbSearchInGroupName, sp.SearchInGroupNames);
PopulateCheckBox(Resource.Id.cbSearchInUrl, sp.SearchInUrls);
PopulateCheckBox(Resource.Id.cbSearchInOtherStrings, sp.SearchInOther);
PopulateCheckBox(Resource.Id.cbRegEx, sp.RegularExpression);
StringComparison sc = sp.ComparisonMode;
bool caseSensitive = ((sc != StringComparison.CurrentCultureIgnoreCase) &&
(sc != StringComparison.InvariantCultureIgnoreCase) &&
(sc != StringComparison.OrdinalIgnoreCase));
PopulateCheckBox(Resource.Id.cbCaseSensitive, caseSensitive);
PopulateCheckBox(Resource.Id.cbExcludeExpiredEntries, sp.ExcludeExpired);
ImageButton btnSearch = (ImageButton)FindViewById(Resource.Id.search_button);
btnSearch.Click += (sender, e) => PerformSearch();
FindViewById<EditText>(Resource.Id.searchEditText).EditorAction += (sender, e) =>
{
if (e.ActionId == Android.Views.InputMethods.ImeAction.Search) {
PerformSearch();
}
};
}
开发者ID:pythe,项目名称:wristpass,代码行数:34,代码来源:SearchActivity.cs
示例2: Search
public Search(SearchParameters p, Player searchingPlayer, SearchResults searchResults, Game game)
{
_p = p;
_searchResults = searchResults;
_game = game;
_root = new InnerResult(_game.CalculateHash(), searchingPlayer.IsMax, 0);
}
开发者ID:leloulight,项目名称:magicgrove,代码行数:7,代码来源:Search.cs
示例3: GetTransformation
internal static string GetTransformation(SearchParameters spIn)
{
if(spIn == null) { Debug.Assert(false); return string.Empty; }
if(spIn.DataTransformationFn == null) return string.Empty;
return StrTrfDeref;
}
开发者ID:Stoom,项目名称:KeePass,代码行数:7,代码来源:SearchUtil.cs
示例4: Constructor_Full_NullDocumentTypeTags
public void Constructor_Full_NullDocumentTypeTags()
{
SearchParameters par = new SearchParameters("query", null, SearchOptions.AllWords);
Assert.AreEqual("query", par.Query, "Wrong query");
Assert.IsNull(par.DocumentTypeTags, "DocumentTypeTags should be null");
Assert.AreEqual(SearchOptions.AllWords, par.Options);
}
开发者ID:mono,项目名称:ScrewTurnWiki,代码行数:7,代码来源:SearchParametersTests.cs
示例5: BindModel
/// <summary>
/// Binds the model to a value by using the specified controller context and binding context.
/// </summary>
/// <param name="controllerContext">The controller context.</param>
/// <param name="bindingContext">The binding context.</param>
/// <returns>The bound value.</returns>
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
{
var parameters = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);
var sp = parameters != null ? parameters.RawValue as SearchParameters : null;
if (sp == null)
{
var qs = GetParams(controllerContext);
var qsDict = NvToDict(qs);
var facets = qsDict.Where(k => FacetRegex.IsMatch(k.Key)).Select(k => k.WithKey(FacetRegex.Replace(k.Key, ""))).ToDictionary(x=>x.Key, y=>y.Value.Split(','));
sp = new SearchParameters
{
FreeSearch = qs["q"].EmptyToNull(),
PageIndex = qs["p"].TryParse(1),
PageSize = qs["pageSize"].TryParse(0),
Sort = qs["sort"].EmptyToNull(),
SortOrder = qs["sortorder"].EmptyToNull(),
Facets = facets
};
if (!string.IsNullOrEmpty(sp.FreeSearch))
{
sp.FreeSearch = sp.FreeSearch.EscapeSearchTerm();
}
}
return sp;
}
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:33,代码来源:SearchParametersBinder.cs
示例6: InitializeMap
/// <summary>
/// Creates a clear map with a start and end point and sets up the search parameters
/// </summary>
private void InitializeMap(int[,] iMap, Point S, Point F)
{
this.map = IntToBool(iMap);
//var tmp = BoolToString(map);
//var tmp1 = ParseIntArrayToString(iMap);
this.sp = new SearchParameters(S, F, map);
}
开发者ID:ewgraf,项目名称:HBMET,代码行数:10,代码来源:A_star.cs
示例7: LoadWebMap_Loaded
// Loads UI elements and an initial webmap
private async void LoadWebMap_Loaded(object sender, RoutedEventArgs e)
{
_portal = await ArcGISPortal.CreateAsync();
var searchParams = new SearchParameters("type: \"web map\" NOT \"web mapping application\"");
var result = await _portal.ArcGISPortalInfo.SearchHomePageFeaturedContentAsync(searchParams);
comboWebMap.ItemsSource = result.Results;
}
开发者ID:MagicWang,项目名称:arcgis-runtime-samples-dotnet,代码行数:8,代码来源:LoadWebMap.xaml.cs
示例8: SearchRunner
public SearchRunner(SearchParameters searchParameters, Game game)
{
_game = game;
_searchParameters = searchParameters;
CurrentDepth = _searchParameters.SearchDepth;
CurrentTargetCount = _searchParameters.TargetCount;
}
开发者ID:leloulight,项目名称:magicgrove,代码行数:8,代码来源:SearchRunner.cs
示例9: PathFinder
/// <summary>
/// Create a new instance of PathFinder
/// </summary>
/// <param name="searchParameters"></param>
public PathFinder(SearchParameters searchParameters)
{
this.searchParameters = searchParameters;
InitializeNodes(searchParameters.Map);
this.startNode = this.nodes[searchParameters.StartLocation.X, searchParameters.StartLocation.Y];
this.startNode.State = NodeState.Open;
this.endNode = this.nodes[searchParameters.EndLocation.X, searchParameters.EndLocation.Y];
}
开发者ID:ewgraf,项目名称:HBMET,代码行数:12,代码来源:PathFinder.cs
示例10: RegisterSearchChannel
public void RegisterSearchChannel(SearchContext searchContext)
{
this._searchService.GetSearchParameters(CLAIMS_SEARCH_SP_NAME, parameters =>
{
this._searchParameters = parameters;
searchContext.RegisterSearchChannel(this.GetChannel(this._searchTypeName));
});
}
开发者ID:victorxata,项目名称:261120,代码行数:8,代码来源:AXAClaimSearchBase.cs
示例11: Search
public SearchResults Search(SearchParameters parameters)
{
if (string.IsNullOrEmpty(parameters.Query) && string.IsNullOrEmpty(parameters.Title) && string.IsNullOrEmpty(parameters.Skills))
{
throw new ArgumentException("At least one of the Query, Title, or Skills parameters must be specified.");
}
return restTemplate.GetForObject<SearchResults>(searchBaseUri + parameters.ToString());
}
开发者ID:javaday,项目名称:Spring.Social.oDesk,代码行数:9,代码来源:JobSearchTemplate.cs
示例12: Test_Selected_Filters_To_Search_Parameter
public void Test_Selected_Filters_To_Search_Parameter()
{
var query = Conditions.From("MAYY380WWPGYY1", urlOfuscator);
var selectedFiltersContext = new QueryUrlParser(facetConfiguration.FacetHierarchy, urlOfuscator).Parse(query).GetSelectedFilters();
var searchParameter = new SearchParameters<Publication>(string.Empty, selectedFiltersContext,
facetConfiguration.FacetHierarchy.ByName(selectedFiltersContext.SelectedFilters.Last().Name),
facetConfiguration.FacetHierarchy.FacetsNotInBranchOf((selectedFiltersContext.SelectedFilters.Last().Name)));
var result = indexServiceImpl.Query(searchParameter);
}
开发者ID:pampero,项目名称:cgFramework,代码行数:9,代码来源:FacetTest.cs
示例13: Constructor_QueryDocumentTypeTags
public void Constructor_QueryDocumentTypeTags()
{
SearchParameters par = new SearchParameters("query", "blah", "doc");
Assert.AreEqual("query", par.Query, "Wrong query");
Assert.AreEqual(2, par.DocumentTypeTags.Length, "Wrong DocumentTypeTag count");
Assert.AreEqual("blah", par.DocumentTypeTags[0], "Wrong type tag");
Assert.AreEqual("doc", par.DocumentTypeTags[1], "Wrong type tag");
Assert.AreEqual(SearchOptions.AtLeastOneWord, par.Options);
}
开发者ID:mono,项目名称:ScrewTurnWiki,代码行数:9,代码来源:SearchParametersTests.cs
示例14: Constructor_Full
public void Constructor_Full()
{
SearchParameters par = new SearchParameters("query", new string[] { "blah", "doc" }, SearchOptions.AllWords);
Assert.AreEqual("query", par.Query, "Wrong query");
Assert.AreEqual(2, par.DocumentTypeTags.Length, "Wrong DocumentTypeTag count");
Assert.AreEqual("blah", par.DocumentTypeTags[0], "Wrong type tag");
Assert.AreEqual("doc", par.DocumentTypeTags[1], "Wrong type tag");
Assert.AreEqual(SearchOptions.AllWords, par.Options);
}
开发者ID:mono,项目名称:ScrewTurnWiki,代码行数:9,代码来源:SearchParametersTests.cs
示例15: SetTransformation
internal static void SetTransformation(SearchParameters spOut,
string strTrf)
{
if(spOut == null) { Debug.Assert(false); return; }
if(strTrf == null) { Debug.Assert(false); return; }
if(strTrf == StrTrfDeref)
spOut.DataTransformationFn = SprEngine.DerefFn;
else spOut.DataTransformationFn = null;
}
开发者ID:Stoom,项目名称:KeePass,代码行数:10,代码来源:SearchUtil.cs
示例16: BindModel
public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) {
var qs = controllerContext.HttpContext.Request.QueryString;
var qsDict = NVToDict(qs);
var sp = new SearchParameters {
FreeSearch = StringHelper.EmptyToNull(qs["q"]),
PageIndex = StringHelper.TryParse(qs["page"], 1),
PageSize = StringHelper.TryParse(qs["pageSize"], DefaultPageSize),
Sort = StringHelper.EmptyToNull(qs["sort"]),
Facets = qsDict.Where(k => FacetRegex.IsMatch(k.Key))
.Select(k => k.WithKey(FacetRegex.Replace(k.Key, "")))
.ToDictionary()
};
return sp;
}
开发者ID:Jo1nes,项目名称:SolrNet,代码行数:14,代码来源:SearchParametersBinder.cs
示例17: MakeSearchParameters
private SearchParameters MakeSearchParameters()
{
var p = new SearchParameters();
p.SearchInTitles = true;
p.RegularExpression = true;
p.SearchInGroupNames = false;
p.SearchInNotes = false;
p.SearchInOther = false;
p.SearchInPasswords = false;
p.SearchInTags = false;
p.SearchInUrls = true;
p.SearchInUserNames = false;
p.SearchInUuids = false;
return p;
}
开发者ID:SqueeG,项目名称:keepasshttp,代码行数:15,代码来源:KeePassHttp.cs
示例18: Load
public static GameParameters Load(PlayerType player1Controller, PlayerType player2Controller,
SavedGame savedGame, int? looser = null, int rollback = 0, SearchParameters searchParameters = null)
{
return new GameParameters
{
Player1 = savedGame.Player1,
Player2 = savedGame.Player2,
Player1Controller = player1Controller,
Player2Controller = player2Controller,
SearchParameters = searchParameters ?? SearchParameters.Default,
SavedGame = savedGame,
RollBack = rollback,
Looser = looser
};
}
开发者ID:leloulight,项目名称:magicgrove,代码行数:15,代码来源:GameParameters.cs
示例19: LoadWebMap_Loaded
// Loads UI elements and an initial webmap
private async void LoadWebMap_Loaded(object sender, RoutedEventArgs e)
{
_portal = await ArcGISPortal.CreateAsync();
var searchParams = new SearchParameters("type: \"web map\" NOT \"web mapping application\"");
var result = await _portal.ArcGISPortalInfo.SearchHomePageFeaturedContentAsync(searchParams);
comboWebMap.ItemsSource = result.Results;
var webmap = result.Results.FirstOrDefault();
if (webmap != null)
{
comboWebMap.SelectedIndex = 0;
await LoadWebMapAsync(webmap.Id);
}
}
开发者ID:MagicWang,项目名称:arcgis-runtime-samples-dotnet,代码行数:16,代码来源:LoadWebMap.xaml.cs
示例20: LoadReport
public static Game LoadReport(string filename, int rollback = 0, SearchParameters searchParameters = null)
{
using (var stream = new FileStream(filename, FileMode.Open))
{
var saveGameFile = SavedGames.ReadFromStream(stream);
var gameParameters = GameParameters.Load(
player1Controller: PlayerType.Machine,
player2Controller: PlayerType.Machine,
savedGame: (SavedGame) saveGameFile.Data,
rollback: rollback,
searchParameters: searchParameters);
return new Game(gameParameters);
}
}
开发者ID:leloulight,项目名称:magicgrove,代码行数:16,代码来源:ErrorReportLoader.cs
注:本文中的SearchParameters类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论