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


C# ISelector.Accepts方法代码示例

本文整理汇总了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;
        }
开发者ID:jbunzel,项目名称:MvcRQ_git,代码行数:16,代码来源:TripleStore.cs

示例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);           
 }
开发者ID:jbunzel,项目名称:MvcRQ_git,代码行数:12,代码来源:TripleStore.cs

示例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);
 }
开发者ID:jbunzel,项目名称:MvcRQ_git,代码行数:12,代码来源:TripleStore.cs

示例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();
 }
开发者ID:almostEric,项目名称:DotNetRDF-4.0,代码行数:12,代码来源:Graph.cs

示例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;
        }
开发者ID:almostEric,项目名称:DotNetRDF-4.0,代码行数:13,代码来源:Graph.cs

示例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;
        }
开发者ID:almostEric,项目名称:DotNetRDF-4.0,代码行数:13,代码来源:Graph.cs


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