public static string BaseTypeToString(this BaseTypes enumValue)
 {
     try
     {
         return(enumValue.GetType()
                .GetMember(enumValue.ToString())
                .First()
                .GetCustomAttribute <DisplayAttribute>()
                .Name);
     }
     catch (System.Exception)
     {
         return(enumValue.ToString());
     }
 }
Exemple #2
0
 public IVertex StoreVertexType(
     IVertexStore myStore,
     VertexInformation myVertex,
     BaseTypes myType,
     String myComment,
     Int64 myCreationDate,
     bool myIsAbstract,
     bool myIsSealed,
     bool myIsUserDefined,
     VertexInformation?myParent,
     IEnumerable <VertexInformation> myUniques,
     SecurityToken mySecurity,
     Int64 myTransaction)
 {
     return(StoreVertexType(myStore, myVertex, myType.ToString(), myComment, myCreationDate, myIsAbstract, myIsSealed, myIsUserDefined, myParent, myUniques, mySecurity, myTransaction));
 }
 public static IVertex StoreVertexType(
     IVertexStore myStore,
     VertexInformation myVertex,
     BaseTypes myType,
     String myComment,
     Int64 myCreationDate,
     bool myIsAbstract,
     bool myIsSealed,
     bool myIsUserDefined,
     VertexInformation? myParent,
     IEnumerable<VertexInformation> myUniques,
     SecurityToken mySecurity,
     TransactionToken myTransaction)
 {
     return StoreVertexType(myStore, myVertex, myType.ToString(), myComment, myCreationDate, myIsAbstract, myIsSealed, myIsUserDefined, myParent, myUniques, mySecurity, myTransaction);
 }