public static HashSet <Guid> GetReferencedIds(this IField field, IJsonValue?value, int referencesPerField = int.MaxValue)
        {
            var result = new HashSet <Guid>();

            if (value != null)
            {
                var extractor = new ReferencesExtractor(result, referencesPerField);

                extractor.SetValue(value);

                field.Accept(extractor);
            }

            return(result);
        }
Esempio n. 2
0
 public static IEdmTypeReference CreateEdmType(IField field)
 {
     return(field.Accept(Instance));
 }
Esempio n. 3
0
        public static None Extract(IField field, IJsonValue?value, HashSet <DomainId> result, int take)
        {
            var args = new Args(value ?? JsonValue.Null, result, take);

            return(field.Accept(Instance, args));
        }
Esempio n. 4
0
        public static IGraphType?Build(IField field, IGraphModel model, ISchemaEntity schema, string fieldName)
        {
            var args = new Args(model, schema, fieldName);

            return(field.Accept(Instance, args));
        }
        public static IEnumerable <IValidator> CreateValidators(IField field)
        {
            Guard.NotNull(field, nameof(field));

            return(field.Accept(Instance));
        }
Esempio n. 6
0
        public static JsonSchemaProperty?BuildProperty(IField field, SchemaResolver?schemaResolver = null, bool withHiddenFields = false)
        {
            var args = new Args(schemaResolver, withHiddenFields, 0);

            return(field.Accept(Instance, args));
        }
Esempio n. 7
0
 public (IGraphType?, ValueResolver?, QueryArguments?) GetGraphType(ISchemaEntity schema, IField field, string fieldName)
 {
     return(field.Accept(new QueryGraphTypeVisitor(schema, contentTypes, this, assetListType, fieldName)));
 }
        public static IEnumerable <IValidator> CreateValidators(ValidatorContext context, IField field, ValidatorFactory createFieldValidator)
        {
            var args = new Args(context, createFieldValidator);

            return(field.Accept(Instance, args));
        }
Esempio n. 9
0
        public static FilterSchema?BuildProperty(IField field, ResolvedComponents components)
        {
            var args = new Args(components);

            return(field.Accept(Instance, args));
        }
Esempio n. 10
0
 public static IEnumerable <IValidator> CreateValidators(IField field)
 {
     return(field.Accept(Instance, None.Value));
 }
Esempio n. 11
0
 public (IGraphType ResolveType, IFieldResolver Resolver) GetGraphType(IField field)
 {
     return(field.Accept(schemaTypes));
 }
Esempio n. 12
0
 public static JToken CleanReferences(IField field, JToken value, ICollection <Guid> oldReferences)
 {
     return(field.Accept(new ReferencesCleaner(value, oldReferences)));
 }
Esempio n. 13
0
        public static IJsonValue CreateDefaultValue(IField field, Instant now)
        {
            Guard.NotNull(field);

            return(field.Accept(new DefaultValueFactory(now)));
        }
Esempio n. 14
0
        public static JToken CreateDefaultValue(IField field, Instant now)
        {
            Guard.NotNull(field, nameof(field));

            return(field.Accept(new DefaultValueFactory(now)));
        }
 public static IGraphType GetInputGraphType(this IField field)
 {
     return(field.Accept(InputFieldVisitor.Default));
 }
Esempio n. 16
0
 public (IGraphType ResolveType, ValueResolver Resolver) GetGraphType(ISchemaEntity schema, IField field)
 {
     return(field.Accept(new QueryGraphTypeVisitor(schema, GetContentType, this, assetListType)));
 }
Esempio n. 17
0
 public IEdmTypeReference?CreateEdmType(IField field)
 {
     return(field.Accept(this));
 }
Esempio n. 18
0
 public static IEnumerable <Guid> ExtractReferences(IField field, IJsonValue value)
 {
     return(field.Accept(new ReferencesExtractor(value)));
 }
Esempio n. 19
0
 public IGraphType?GetInputGraphType(ISchemaEntity schema, IField field, string fieldName)
 {
     return(field.Accept(new InputFieldVisitor(schema, this, fieldName)));
 }
Esempio n. 20
0
 public static IJsonValue CleanReferences(IField field, IJsonValue value, ICollection <Guid> oldReferences)
 {
     return(field.Accept(new ReferencesCleaner(value, oldReferences)));
 }
Esempio n. 21
0
 public (IGraphType?, ValueResolver?, QueryArguments?) GetGraphType(ISchemaEntity schema, IField field, string fieldName)
 {
     return(field.Accept(graphQLTypeVisitor, new GraphQLTypeVisitor.Args(schema, fieldName)));
 }
Esempio n. 22
0
        public static IEdmTypeReference?BuildType(IField field, EdmTypeFactory factory)
        {
            var args = new Args(factory);

            return(field.Accept(Instance, args));
        }
Esempio n. 23
0
        public static IJsonValue CreateDefaultValue(IField field, Instant now, string partition)
        {
            Guard.NotNull(field, nameof(field));

            return(field.Accept(new DefaultValueFactory(now, partition)));
        }
Esempio n. 24
0
        public static IJsonValue Cleanup(IField field, IJsonValue?value, HashSet <DomainId> validIds)
        {
            var args = new Args(value ?? JsonValue.Null, validIds);

            return(field.Accept(Instance, args));
        }
Esempio n. 25
0
 public static object ConvertValue(IField field, IJsonValue json)
 {
     return(field.Accept(new JsonValueConverter(json)));
 }
Esempio n. 26
0
        public static IEdmTypeReference?BuildType(IField field, EdmTypeFactory factory, ResolvedComponents components)
        {
            var args = new Args(factory, components);

            return(field.Accept(Instance, args));
        }