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


C# IVertex.GetOutgoingSingleEdge方法代码示例

本文整理汇总了C#中IVertex.GetOutgoingSingleEdge方法的典型用法代码示例。如果您正苦于以下问题:C# IVertex.GetOutgoingSingleEdge方法的具体用法?C# IVertex.GetOutgoingSingleEdge怎么用?C# IVertex.GetOutgoingSingleEdge使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IVertex的用法示例。


在下文中一共展示了IVertex.GetOutgoingSingleEdge方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetSingleEdge

        public static ISingleEdge GetSingleEdge(this IOutgoingEdgeDefinition myProperty, IVertex myVertex)
        {
            if (myProperty == null)
                throw new NullReferenceException();

            return myVertex.GetOutgoingSingleEdge(myProperty.ID);
        }
开发者ID:anukat2015,项目名称:sones,代码行数:7,代码来源:IOutgoingEdgeDefinitionExtension.cs

示例2: GetTargetVertexType

        /// <summary>
        /// Gets the target vertex of an outgoing edge.
        /// </summary>
        /// <param name="myOutgoingEdge">A vertex that represents an outgoing edge.</param>
        /// <returns>The target vertex type of the outgoing edge.</returns>
        private static IVertexType GetTargetVertexType(IVertex myOutgoingEdge)
        {
            var vertex = myOutgoingEdge.GetOutgoingSingleEdge((long)AttributeDefinitions.OutgoingEdgeDotTarget).GetTargetVertex();

            if (vertex == null)
                throw new UnknownDBException("An outgoing edge has no vertex that represents its target vertex type.");

            return new VertexType(vertex);
        }
开发者ID:loubo,项目名称:sones,代码行数:14,代码来源:BaseGraphStorageManager.cs

示例3: GetRelatedOutgoingEdgeDefinition

        /// <summary>
        /// Creates an outgoing edge definition from a vertex that represents an incoming edge definition.
        /// </summary>
        /// <param name="myVertex">A vertex that represents an incoming edge definition.</param>
        /// <returns>An outgoing edge definition.</returns>
        private static IOutgoingEdgeDefinition GetRelatedOutgoingEdgeDefinition(IVertex myVertex)
        {
            var vertex = myVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.IncomingEdgeDotRelatedEgde).GetTargetVertex();

            if (vertex == null)
                throw new UnknownDBException("An incoming edge definition has no vertex that represents its related outgoing edge definition.");

            return CreateOutgoingEdgeDefinition(vertex);
        }
开发者ID:loubo,项目名称:sones,代码行数:14,代码来源:BaseGraphStorageManager.cs

示例4: GetDefiningVertexType

        private static IVertexType GetDefiningVertexType(IVertex myIndexVertex)
        {
            var edge = myIndexVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.IndexDotDefiningVertexType);

            if (edge == null)
                throw new UnknownDBException("An index has no vertex that represents its defining vertex type.");

            var vertex = edge.GetTargetVertex();

            if (vertex == null)
                throw new UnknownDBException("An index has no vertex that represents its defining vertex type.");

            return new VertexType(vertex);
        }
开发者ID:loubo,项目名称:sones,代码行数:14,代码来源:BaseGraphStorageManager.cs

示例5: GetDefiningType

        private static IBaseType GetDefiningType(IVertex myAttributeVertex)
        {
            var edge = myAttributeVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.AttributeDotDefiningType);

            if (edge == null)
                throw new UnknownDBException("An attribute has no vertex that represents its defining type.");

            var vertex = edge.GetTargetVertex();

            if (vertex == null)
                throw new UnknownDBException("An attribute has no vertex that represents its defining type.");

            switch (vertex.VertexTypeID)
            {
                case (long)BaseTypes.VertexType: return new VertexType(vertex);
                case (long)BaseTypes.EdgeType: return new EdgeType(vertex);
                default: throw new UnknownDBException("The defining attribute vertex neither point to an edge nor to an vertex type vertex.");
            }
        }
开发者ID:loubo,项目名称:sones,代码行数:19,代码来源:BaseGraphStorageManager.cs

示例6: GetBaseType

        private static Type GetBaseType(IVertex myVertex)
        {
            var typeID = GetUUID(myVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.PropertyDotBaseType).GetTargetVertex());

            switch ((BasicTypes)typeID)
            {
                case BasicTypes.Int32:
                    return typeof(Int32);

                case BasicTypes.String:
                    return typeof(String);

                case BasicTypes.DateTime:
                    return typeof(DateTime);

                case BasicTypes.Double:
                    return typeof(Double);

                case BasicTypes.Boolean:
                    return typeof(Boolean);

                case BasicTypes.Int64:
                    return typeof(Int64);

                case BasicTypes.Char:
                    return typeof(Char);

                case BasicTypes.Byte:
                    return typeof(Byte);

                case BasicTypes.Single:
                    return typeof(Single);

                case BasicTypes.SByte:
                    return typeof(SByte);

                case BasicTypes.Int16:
                    return typeof(Int16);

                case BasicTypes.UInt32:
                    return typeof(UInt32);

                case BasicTypes.UInt64:
                    return typeof(UInt64);

                case BasicTypes.UInt16:
                    return typeof(UInt16);

                case BasicTypes.TimeSpan:
                    return typeof(TimeSpan);

                default:
                    throw new NotImplementedException("User defined base types are not implemented yet.");
            }
        }
开发者ID:loubo,项目名称:sones,代码行数:55,代码来源:BaseGraphStorageManager.cs

示例7: GetParentVertexType

 /// <summary>
 /// Gets the vertex that represents the parent type.
 /// </summary>
 /// <returns>An IVertex that represents the parent type, if existing otherwise <c>NULL</c>.</returns>
 public static IVertex GetParentVertexType(IVertex myVertex)
 {
     return myVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.VertexTypeDotParent).GetTargetVertex();
 }
开发者ID:loubo,项目名称:sones,代码行数:8,代码来源:BaseGraphStorageManager.cs

示例8: CreateIndexDefinition

        public static IIndexDefinition CreateIndexDefinition(IVertex myIndexVertex, IVertexType myDefiningVertexType = null)
        {
            var id = GetUUID(myIndexVertex);
            var props = GetIndexedProperties(myIndexVertex);
            var typeName = GetIndexTypeName(myIndexVertex);
            var edition = myIndexVertex.EditionName;
            var isUserDefined = GetIndexDotIsUserDefined(myIndexVertex);
            var name = GetIndexDotName(myIndexVertex);
            var single = myIndexVertex.GetProperty<bool>((long)AttributeDefinitions.IndexDotIsSingleValue);
            var range = myIndexVertex.GetProperty<bool>((long)AttributeDefinitions.IndexDotIsRange);
            var version = myIndexVertex.GetProperty<bool>((long)AttributeDefinitions.IndexDotIsVersioned);
            var sourceIndex = (myIndexVertex.HasOutgoingEdge((long)AttributeDefinitions.IndexDotSourceIndex))
                ? CreateIndexDefinition(myIndexVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.IndexDotSourceIndex).GetTargetVertex())
                : null;

            myDefiningVertexType = myDefiningVertexType ?? GetDefiningVertexType(myIndexVertex);

            return new IndexDefinition
            {
                ID = id,
                IndexedProperties = props,
                Edition = edition,
                IndexTypeName = typeName,
                IsUserdefined = isUserDefined,
                Name = name,
                VertexType = myDefiningVertexType,
                IsSingle = single,
                IsRange = range,
                IsVersioned = version,
                SourceIndex = sourceIndex,
            };
        }
开发者ID:loubo,项目名称:sones,代码行数:32,代码来源:BaseGraphStorageManager.cs

示例9: GetBaseType

        private Type GetBaseType(IVertex myVertex)
        {
            var typeID = GetUUID(myVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.PropertyDotBaseType).GetTargetVertex());

            return _baseTypeManager.GetBaseType(typeID);
        }
开发者ID:anukat2015,项目名称:sones,代码行数:6,代码来源:BaseGraphStorageManager.cs

示例10: GetInnerEdgeType

        private IEdgeType GetInnerEdgeType(IVertex myOutgoingEdgeVertex)
        {
            var vertex = myOutgoingEdgeVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.OutgoingEdgeDotInnerEdgeType).GetTargetVertex();
            if (vertex == null)
                throw new UnknownDBException("An outgoing edge has no vertex that represents its inner edge type.");

            return new EdgeType(vertex, this);
        }
开发者ID:anukat2015,项目名称:sones,代码行数:8,代码来源:BaseGraphStorageManager.cs

示例11: IsAttributeOnVertexType

 private static bool IsAttributeOnVertexType(String myVertexTypeName, IVertex myAttributeVertex)
 {
     var vertexTypeVertex = myAttributeVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.AttributeDotDefiningType).GetTargetVertex();
     var name = vertexTypeVertex.GetPropertyAsString((long)AttributeDefinitions.BaseTypeDotName);
     return name.Equals(myVertexTypeName);
 }
开发者ID:loubo,项目名称:sones,代码行数:6,代码来源:ExecuteVertexTypeManager.cs


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