예제 #1
0
        public AssignmentKind createAssignmentKindFromString(EDataType eDataType, String initialValue)
        {
            AssignmentKind result = AssignmentKind.get(initialValue);

            if (result == null)
            {
                throw new ArgumentException(
                          "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.name + "'");
            }
            return(result);
        }
예제 #2
0
 public static AssignmentKind getByName(string name)
 {
     for (int i = 0; i < VALUES_ARRAY.Length; ++i)
     {
         AssignmentKind result = VALUES_ARRAY[i];
         if (result.getName() == name)
         {
             return(result);
         }
     }
     return(null);
 }
예제 #3
0
 public static AssignmentKind get(string literal)
 {
     for (int i = 0; i < VALUES_ARRAY.Length; ++i)
     {
         AssignmentKind result = VALUES_ARRAY[i];
         if (result.ToString() == literal)
         {
             return(result);
         }
     }
     return(null);
 }