本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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.");
}
}
示例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.");
}
}
示例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();
}
示例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,
};
}
示例9: GetBaseType
private Type GetBaseType(IVertex myVertex)
{
var typeID = GetUUID(myVertex.GetOutgoingSingleEdge((long)AttributeDefinitions.PropertyDotBaseType).GetTargetVertex());
return _baseTypeManager.GetBaseType(typeID);
}
示例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);
}
示例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);
}