public TypeProperty(string name, ITypeReference typeReference, TypePropertyFlags flags = TypePropertyFlags.None, string?description = null) { this.Name = name; this.TypeReference = typeReference; this.Flags = flags; this.Description = description; }
public NamedObjectType(string name, TypeSymbolValidationFlags validationFlags, IEnumerable <TypeProperty> properties, ITypeReference?additionalPropertiesType, TypePropertyFlags additionalPropertiesFlags = TypePropertyFlags.None, IEnumerable <FunctionOverload>?functions = null) : base(name) { this.ValidationFlags = validationFlags; this.Properties = properties.ToImmutableDictionary(property => property.Name, LanguageConstants.IdentifierComparer); this.MethodResolver = FunctionResolver.Create(functions); this.AdditionalPropertiesType = additionalPropertiesType; this.AdditionalPropertiesFlags = additionalPropertiesFlags; }
public ObjectType(string name, TypeSymbolValidationFlags validationFlags, IEnumerable <TypeProperty> properties, ITypeReference?additionalPropertiesType, TypePropertyFlags additionalPropertiesFlags, Func <ObjectType, FunctionResolver> methodResolverBuilder) : base(name) { this.ValidationFlags = validationFlags; this.Properties = properties.ToImmutableDictionary(property => property.Name, LanguageConstants.IdentifierComparer); this.MethodResolver = methodResolverBuilder(this); this.AdditionalPropertiesType = additionalPropertiesType; this.AdditionalPropertiesFlags = additionalPropertiesFlags; }
public ObjectType(string name, TypeSymbolValidationFlags validationFlags, IEnumerable <TypeProperty> properties, ITypeReference?additionalPropertiesType, TypePropertyFlags additionalPropertiesFlags = TypePropertyFlags.None, IEnumerable <FunctionOverload>?functions = null) : this(name, validationFlags, properties, additionalPropertiesType, additionalPropertiesFlags, owner => new FunctionResolver(owner, functions ?? ImmutableArray <FunctionOverload> .Empty)) { }
public NamedObjectType(string name, IEnumerable <TypeProperty> properties, ITypeReference?additionalProperties, TypePropertyFlags additionalPropertiesFlags = TypePropertyFlags.None) : base(name) { this.Properties = properties.ToImmutableDictionary(property => property.Name, property => property, LanguageConstants.IdentifierComparer); this.AdditionalProperties = additionalProperties; this.AdditionalPropertiesFlags = additionalPropertiesFlags; }
private static TypePropertyFlags ConvertToReadOnly(TypePropertyFlags typePropertyFlags) => (typePropertyFlags | TypePropertyFlags.ReadOnly) & ~TypePropertyFlags.Required;
public TypeProperty(string name, ITypeReference typeReference, TypePropertyFlags flags = TypePropertyFlags.None) { this.Name = name; this.TypeReference = typeReference; this.Flags = flags; }
public TypeProperty(string name, TypeSymbol type, TypePropertyFlags flags = TypePropertyFlags.None) { this.Name = name; this.Type = type; this.Flags = flags; }