예제 #1
0
 /**
  * Sets the actual referrable type on the referrable object (transforms the name to the actual referrable).
  */
 private void SetReferrable(IFieldType fieldType, Dictionary <string, IPatternBufferReferrable> nameReferrableMap)
 {
     if (fieldType is ReferenceFieldType)
     {
         ReferenceFieldType rft = (ReferenceFieldType)fieldType;
         rft.Referrable = this.GetReferrable(rft.ReferrableName, nameReferrableMap);
     }
 }
예제 #2
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);
        }