Esempio n. 1
0
        private static TypePropertyFlags GetTypePropertyFlags(SerializedTypes.Concrete.ObjectProperty input)
        {
            var flags = TypePropertyFlags.None;

            if (input.Flags.HasFlag(SerializedTypes.Concrete.ObjectPropertyFlags.Required))
            {
                flags |= TypePropertyFlags.Required;
            }
            if (input.Flags.HasFlag(SerializedTypes.Concrete.ObjectPropertyFlags.ReadOnly))
            {
                flags |= TypePropertyFlags.ReadOnly;
            }
            if (input.Flags.HasFlag(SerializedTypes.Concrete.ObjectPropertyFlags.WriteOnly))
            {
                flags |= TypePropertyFlags.WriteOnly;
            }
            if (input.Flags.HasFlag(SerializedTypes.Concrete.ObjectPropertyFlags.DeployTimeConstant))
            {
                flags |= TypePropertyFlags.SkipInlining;
            }

            return(flags);
        }
Esempio n. 2
0
        private TypeProperty GetTypeProperty(string name, SerializedTypes.Concrete.ObjectProperty input)
        {
            var type = input.Type ?? throw new ArgumentException();

            return(new TypeProperty(name, GetTypeReference(type), GetTypePropertyFlags(input)));
        }