Exemplo n.º 1
0
 public UnityEventDetails(ComponentDefinition.EventDefinition eventDefinitionRaw)
 {
     EventName          = Formatting.SnakeCaseToPascalCase(eventDefinitionRaw.Name);
     CamelCaseEventName = Formatting.PascalCaseToCamelCase(EventName);
     FqnPayloadType     = CommonDetailsUtils.GetCapitalisedFqnTypename(eventDefinitionRaw.Type);
     EventIndex         = eventDefinitionRaw.EventIndex;
 }
Exemplo n.º 2
0
        public ContainedType(TypeReference innerType)
        {
            switch (innerType.ValueTypeSelector)
            {
            case ValueType.Enum:
                category      = ValueType.Enum;
                FqnType       = CommonDetailsUtils.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       = CommonDetailsUtils.GetCapitalisedFqnTypename(innerType.Type);
                primitiveType = null;
                break;

            default:
                throw new ArgumentOutOfRangeException("Malformed inner type.");
            }
        }
Exemplo n.º 3
0
        public UnityTypeDetails(string package, TypeDefinition typeDefinitionRaw)
        {
            Package                = package;
            CapitalisedName        = typeDefinitionRaw.Name;
            CamelCaseName          = Formatting.PascalCaseToCamelCase(CapitalisedName);
            QualifiedName          = typeDefinitionRaw.QualifiedName;
            FullyQualifiedTypeName = CommonDetailsUtils.GetCapitalisedFqnTypename(typeDefinitionRaw.QualifiedName);

            raw = typeDefinitionRaw;
        }
Exemplo n.º 4
0
        public UnityCommandDetails(ComponentDefinition.CommandDefinition commandDefinitionRaw)
        {
            CommandName          = Formatting.SnakeCaseToPascalCase(commandDefinitionRaw.Name);
            CamelCaseCommandName = Formatting.PascalCaseToCamelCase(CommandName);
            FqnRequestType       =
                CommonDetailsUtils.GetCapitalisedFqnTypename(commandDefinitionRaw.RequestType);
            FqnResponseType =
                CommonDetailsUtils.GetCapitalisedFqnTypename(commandDefinitionRaw.ResponseType);

            CommandIndex = commandDefinitionRaw.CommandIndex;
        }