示例#1
0
        /**
         * Creates an aggregate field type with the given aggregate arg name. i.e. "list<Whatever>"
         */
        private IAggregateableFieldType CreateAggregateableFieldType(string aggregateArgName)
        {
            IAggregateableFieldType listAggregateableFieldType = null;

            if (this.lowerCasePrimitiveTypeEnumValues.Contains(aggregateArgName))
            {
                listAggregateableFieldType = new PrimitiveFieldType(
                    (PrimitiveType)Enum.Parse(typeof(PrimitiveType), aggregateArgName, true)
                    );
            }
            else
            {
                listAggregateableFieldType = new ReferenceFieldType(aggregateArgName);
            }
            return(listAggregateableFieldType);
        }
示例#2
0
 public SetFieldType(IAggregateableFieldType elementType, bool isOptional)
 {
     this.ElementType = elementType;
     this.isOptional  = isOptional;
 }
示例#3
0
 /**
  * Creates a set field that can contain elements of the given type.
  */
 public SetFieldType(IAggregateableFieldType elementType) : this(elementType, false)
 {
 }
示例#4
0
 public MapFieldType(IAggregateableFieldType keyType, IAggregateableFieldType valueType, bool isOptional)
 {
     this.KeyType    = keyType;
     this.ValueType  = valueType;
     this.isOptional = isOptional;
 }
示例#5
0
 /**
  * Creates a map field with the given key and value types.
  */
 public MapFieldType(IAggregateableFieldType keyType, IAggregateableFieldType valueType) : this(keyType, valueType, false)
 {
 }