/// <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; }
/// <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; }
/// <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; }
public override IEnumerable<IVertex> GetTargetVertices(PropertyHyperGraphFilter.TargetVertexFilter myFilter = null) { List<IVertex> list = new List<IVertex>(); list.Add(_TargetVertex); return list; }
/// <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; }