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 SortOperationDescriptor 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(SortOperationDescriptor.New( context, name, typeReference, operation )); }