Beispiel #1
0
        public TorqueParameter(TorqueType type, string name, string defaultValue, bool varargs)
        {
            Type         = type;
            Name         = name;
            DefaultValue = defaultValue;
            VarArgs      = varargs;

            RenameIfReserved();
            ValidateDefaultValue();
        }
Beispiel #2
0
        public TorqueParameter(JObject jObject)
        {
            Type         = new TorqueType(jObject["Type"].ToString());
            Name         = jObject["Name"].ToString();
            DefaultValue = jObject["DefaultValue"].ToString();
            VarArgs      = jObject["VarArgs"].ToObject <bool>();

            RenameIfReserved();
            ValidateDefaultValue();
        }
Beispiel #3
0
 public TorqueFunction(JObject jObject)
 {
     Namespace       = jObject["Namespace"]?.ToString();
     Type            = new TorqueType(jObject["Type"].ToString());
     Name            = jObject["Name"].ToString();
     Comment         = jObject["Comment"].ToString();
     Parameters      = ((JArray)jObject["Parameters"]).Select(x => new TorqueParameter((JObject)x)).ToList();
     IsStringlyTyped = jObject["IsStringlyTyped"]?.ToObject <bool>();
     RenameIfReserved();
 }