本文整理汇总了C#中ISelector.Accepts方法的典型用法代码示例。如果您正苦于以下问题:C# ISelector.Accepts方法的具体用法?C# ISelector.Accepts怎么用?C# ISelector.Accepts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISelector
的用法示例。
在下文中一共展示了ISelector.Accepts方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTriplesWithSubject
/// <summary>
/// Selects all Triples where the Subject meets the criteria of an ISelector from a Subset of Graphs in the Triple Store
/// </summary>
/// <param name="graphUris">List of the Graph URIs of Graphs you want to select over</param>
/// <param name="selector">A Selector on Nodes</param>
/// <returns></returns>
public IEnumerable<Triple> GetTriplesWithSubject(List<Uri> graphUris, ISelector<INode> selector)
{
IEnumerable<Triple> ts = from g in this._graphs
where graphUris.Contains(g.BaseUri)
from t in g.Triples
where selector.Accepts(t.Subject)
select t;
return ts;
}
示例2: GetNodes
/// <summary>
/// Selects all Nodes that meet the criteria of a given ISelector from all the Query Triples
/// </summary>
/// <param name="selector">A Selector on Nodes</param>
/// <returns></returns>
public IEnumerable<INode> GetNodes(ISelector<INode> selector)
{
return (from g in this._graphs
from n in g.Nodes
where selector.Accepts(n)
select n);
}
示例3: GetTriples
/// <summary>
/// Selects all Triples which meet the criteria of an ISelector from all the Query Triples
/// </summary>
/// <param name="selector">A Selector on Triples</param>
/// <returns></returns>
public IEnumerable<Triple> GetTriples(ISelector<Triple> selector)
{
return (from g in this._graphs
from t in g.Triples
where selector.Accepts(t)
select t);
}
示例4: TriplesExist
/// <summary>
/// Checks whether any Triples Exist which match a given Selector
/// </summary>
/// <param name="selector">Selector Class which performs the Selection</param>
/// <returns></returns>
public override bool TriplesExist(ISelector<Triple> selector)
{
IEnumerable<Triple> ts = from t in this._triples
where selector.Accepts(t)
select t;
return ts.Any();
}
示例5: GetTriplesWithObject
/// <summary>
/// Gets all the Triples with an Object matching some arbitrary criteria as embodied in a Selector
/// </summary>
/// <param name="selector">Selector class which performs the Selection</param>
/// <returns>Zero/More Triples</returns>
public override IEnumerable<Triple> GetTriplesWithObject(ISelector<INode> selector)
{
IEnumerable<Triple> ts = from t in this._triples
where selector.Accepts(t.Object)
select t;
return ts;
}
示例6: GetNodes
/// <summary>
/// Gets all the Nodes according to some arbitrary criteria as embodied in a Selector
/// </summary>
/// <param name="selector">Selector class which performs the Selection</param>
/// <returns>Zero/More Nodes</returns>
public override IEnumerable<INode> GetNodes(ISelector<INode> selector)
{
IEnumerable<INode> ns = from n in this._nodes
where selector.Accepts(n)
select n;
return ns;
}