public static SortOperationDescriptor New( IDescriptorContext context, NameString name, ITypeReference type, SortOperation operation) => new SortOperationDescriptor( context, name, type, operation);
protected SortObjectOperationDescriptor( IDescriptorContext context, NameString name, ITypeReference type, SortOperation operation) : base(context, name, type, operation) { }
protected IgnoredSortingFieldDescriptor( IDescriptorContext context, NameString name, ITypeReference type, SortOperation operation) : base(context, name, type, operation) { Definition.Ignore = true; }
protected SortOperationDescriptorBase( IDescriptorContext context, NameString name, ITypeReference type, SortOperation operation) : base(context) { Definition.Name = name.EnsureNotEmpty(nameof(name)); Definition.Type = type ?? throw new ArgumentNullException(nameof(type)); Definition.Operation = operation ?? throw new ArgumentNullException(nameof(operation)); }
public new static SortObjectOperationDescriptor <TObject> CreateOperation( PropertyInfo property, IDescriptorContext context) { var operation = new SortOperation(property, true); var name = context.Naming.GetMemberName(property, MemberKind.InputObjectField); var typeReference = new ClrTypeReference( typeof(SortInputType <>).MakeGenericType(typeof(TObject)), TypeContext.Input); return(SortObjectOperationDescriptor <TObject> .New( context, name, typeReference, operation)); }
private SortOperationDescriptor CreateOperation( IEnumerable<SortOperationKind> allowedSorts) { var operation = new SortOperation( allowedSorts, Definition.Property); var typeReference = new ClrTypeReference( typeof(SortOperationKindType), TypeContext.Input); return SortOperationDescriptor.New( Context, Definition.Name, typeReference, operation); }
public static IgnoredSortingFieldDescriptor CreateOperation( PropertyInfo property, IDescriptorContext context) { var operation = new SortOperation(property); var typeReference = new ClrTypeReference( typeof(SortOperationKindType), TypeContext.Input); NameString name = context.Naming.GetMemberName( property, MemberKind.InputObjectField); return(IgnoredSortingFieldDescriptor.New( context, name, typeReference, operation )); }
public static SortObjectOperationDescriptor CreateOperation( PropertyInfo property, IDescriptorContext context) { Type type = property.PropertyType; var operation = new SortOperation(property, true); NameString name = context.Naming.GetMemberName( property, MemberKind.InputObjectField); var typeReference = context.TypeInspector.GetTypeRef( typeof(SortInputType <>).MakeGenericType(type), TypeContext.Input); return(SortObjectOperationDescriptor.New( context, name, typeReference, operation)); }
public new static SortObjectOperationDescriptor <TObject> New( IDescriptorContext context, NameString name, ITypeReference type, SortOperation operation) => new SortObjectOperationDescriptor <TObject>(context, name, type, operation);
public static IgnoredSortingFieldDescriptor New( IDescriptorContext context, NameString name, ITypeReference type, SortOperation operation) => new IgnoredSortingFieldDescriptor(context, name, type, operation);