コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }