コード例 #1
0
ファイル: AGraphElement.cs プロジェクト: anukat2015/sones
 /// <summary>
 /// Returns all properties of this graph element
 /// </summary>
 /// <param name="myFilter">An optional filter function</param>
 /// <returns>An enumerable of propertyID/propertyValue</returns>
 protected IEnumerable<Tuple<long, IComparable>> GetAllPropertiesProtected(PropertyHyperGraphFilter.GraphElementStructuredPropertyFilter myFilter = null)
 {
     if (_structuredProperties != null)
     {
         foreach (var aProperty in _structuredProperties)
         {
             if (myFilter != null)
             {
                 if (myFilter(aProperty.Key, aProperty.Value))
                 {
                     yield return new Tuple<long, IComparable>(aProperty.Key, aProperty.Value);
                 }
             }
             else
             {
                 yield return new Tuple<long, IComparable>(aProperty.Key, aProperty.Value);
             }
         }
     }
     yield break;
 }
コード例 #2
0
ファイル: AGraphElement.cs プロジェクト: anukat2015/sones
 /// <summary>
 /// Returns all unstructured properties of this graph element
 /// </summary>
 /// <param name="myFilter">An optional filter function</param>
 /// <returns>An enumerable of propertyName/PropertyValue</returns>
 protected IEnumerable<Tuple<string, object>> GetAllUnstructuredPropertiesProtected(
     PropertyHyperGraphFilter.GraphElementUnStructuredPropertyFilter myFilter = null)
 {
     if (_unstructuredProperties != null)
     {
         foreach (var aUnstructuredProperty in _unstructuredProperties)
         {
             if (myFilter != null)
             {
                 if (myFilter(aUnstructuredProperty.Key, aUnstructuredProperty.Value))
                 {
                     yield return
                         new Tuple<String, object>(aUnstructuredProperty.Key, aUnstructuredProperty.Value);
                 }
             }
             else
             {
                 yield return new Tuple<String, object>(aUnstructuredProperty.Key, aUnstructuredProperty.Value);
             }
         }
     }
     yield break;
 }
コード例 #3
0
ファイル: AGraphElement.cs プロジェクト: cosh/sones
 /// <summary>
 /// Returns all unstructured properties of this graph element
 /// </summary>
 /// <param name="myFilter">An optional filter function</param>
 /// <returns>An enumerable of propertyName/PropertyValue</returns>
 protected IEnumerable<UnstructuredPropertyContainer> GetAllUnstructuredPropertiesProtected(
     PropertyHyperGraphFilter.GraphElementUnStructuredPropertyFilter myFilter = null)
 {
     if (_unstructuredProperties != null)
     {
         foreach (var aUnstructuredProperty in _unstructuredProperties)
         {
             if (myFilter != null)
             {
                 if (myFilter(aUnstructuredProperty.Key, aUnstructuredProperty.Value))
                 {
                     yield return
                         new UnstructuredPropertyContainer { PropertyName = aUnstructuredProperty.Key, Property = aUnstructuredProperty.Value };
                 }
             }
             else
             {
                 yield return new UnstructuredPropertyContainer { PropertyName = aUnstructuredProperty.Key, Property = aUnstructuredProperty.Value };
             }
         }
     }
     yield break;
 }
コード例 #4
0
ファイル: RemoteSingleEdge.cs プロジェクト: anukat2015/sones
 public override IEnumerable<IVertex> GetTargetVertices(PropertyHyperGraphFilter.TargetVertexFilter myFilter = null)
 {
     List<IVertex> list = new List<IVertex>();
     list.Add(_TargetVertex);
     return list;
 }
コード例 #5
0
ファイル: AGraphElement.cs プロジェクト: cosh/sones
 /// <summary>
 /// Returns all properties of this graph element
 /// </summary>
 /// <param name="myFilter">An optional filter function</param>
 /// <returns>An enumerable of propertyID/propertyValue</returns>
 protected IEnumerable<PropertyContainer> GetAllPropertiesProtected(PropertyHyperGraphFilter.GraphElementStructuredPropertyFilter myFilter = null)
 {
     if (_structuredProperties != null)
     {
         foreach (var aProperty in _structuredProperties)
         {
             if (myFilter != null)
             {
                 if (myFilter(aProperty.Key, aProperty.Value))
                 {
                     yield return new PropertyContainer { PropertyID = aProperty.Key, Property = aProperty.Value };
                 }
             }
             else
             {
                 yield return new PropertyContainer { PropertyID = aProperty.Key, Property = aProperty.Value };
             }
         }
     }
     yield break;
 }