protected override void OnCreateDefinition( FilterInputTypeDefinition definition) { if (!Definition.AttributesAreApplied && Definition.EntityType is not null) { Context.TypeInspector.ApplyAttributes(Context, this, Definition.EntityType); Definition.AttributesAreApplied = true; } var fields = new Dictionary <NameString, FilterOperationDefintion>(); var handledProperties = new HashSet <PropertyInfo>(); var explicitFields = Fields.Select(t => t.CreateDefinition()).ToList(); FieldDescriptorUtilities.AddExplicitFields( explicitFields.Where(t => !t.Ignore).SelectMany(t => t.Filters), f => f.Operation?.Property, fields, handledProperties); foreach (FilterFieldDefintion field in explicitFields.Where(t => t.Ignore)) { handledProperties.Add(field.Property); } OnCompleteFields(fields, handledProperties); Definition.Fields.AddRange(fields.Values); }
protected override void OnCreateDefinition( FilterInputTypeDefinition definition) { var fields = new Dictionary <NameString, FilterOperationDefintion>(); var handledProperties = new HashSet <PropertyInfo>(); FieldDescriptorUtilities.AddExplicitFields( Fields.Select(t => t.CreateDefinition()) .SelectMany(t => t.Filters), f => f.Operation.Property, fields, handledProperties); OnCompleteFields(fields, handledProperties); Definition.Fields.AddRange(fields.Values); }
protected override void OnCreateDefinition( FilterInputTypeDefinition definition) { var fields = new Dictionary <NameString, FilterOperationDefintion>(); var handledProperties = new HashSet <PropertyInfo>(); List <FilterFieldDefintion> explicitFields = Fields.Select(t => t.CreateDefinition()).ToList(); FieldDescriptorUtilities.AddExplicitFields( explicitFields.Where(t => !t.Ignore).SelectMany(t => t.Filters), f => f.Operation.Property, fields, handledProperties); foreach (var field in explicitFields.Where(t => t.Ignore)) { handledProperties.Add(field.Property); } OnCompleteFields(fields, handledProperties); Definition.Fields.AddRange(fields.Values); }
protected override void OnCreateDefinition( FilterInputTypeDefinition definition) { if (Definition.EntityType is { })