public ContainedType(TypeReference innerType)
        {
            switch (innerType.ValueTypeSelector)
            {
            case ValueType.Enum:
                category      = ValueType.Enum;
                FqnType       = DetailsUtils.GetCapitalisedFqnTypename(innerType.Enum);
                primitiveType = null;
                break;

            case ValueType.Primitive:
                category      = ValueType.Primitive;
                FqnType       = UnityTypeMappings.SchemaTypeToUnityType[innerType.Primitive];
                primitiveType = innerType.Primitive;
                break;

            case ValueType.Type:
                category      = ValueType.Type;
                FqnType       = DetailsUtils.GetCapitalisedFqnTypename(innerType.Type);
                primitiveType = null;
                break;

            default:
                throw new ArgumentOutOfRangeException("Malformed inner type.");
            }
        }
Exemple #2
0
        protected GeneratorInputDetails(string package, QualifiedDefinition qualifiedDefinition) : base(qualifiedDefinition)
        {
            Namespace     = Formatting.CapitaliseQualifiedNameParts(package);
            NamespacePath = Formatting.GetNamespacePath(package);

            QualifiedName      = qualifiedDefinition.QualifiedName;
            FullyQualifiedName = DetailsUtils.GetCapitalisedFqnTypename(qualifiedDefinition.QualifiedName);
        }
 public UnityEventDetails(ComponentDefinition.EventDefinition rawEventDefinition) : base(rawEventDefinition)
 {
     FqnPayloadType = DetailsUtils.GetCapitalisedFqnTypename(rawEventDefinition.Type);
     EventIndex     = rawEventDefinition.EventIndex;
 }