Exemple #1
0
 /// <inheritdoc />
 public ISortConventionDescriptor Configure <TSortType>(
     ConfigureSortInputType configure)
     where TSortType : SortInputType =>
 Configure(
     Context.TypeInspector.GetTypeRef(
         typeof(TSortType),
         TypeContext.Input,
         Definition.Scope),
     configure);
Exemple #2
0
        protected ISortConventionDescriptor Configure(
            ITypeReference typeReference,
            ConfigureSortInputType configure)
        {
            if (!Definition.Configurations.TryGetValue(
                    typeReference,
                    out List <ConfigureSortInputType>?configurations))
            {
                configurations = new List <ConfigureSortInputType>();
                Definition.Configurations.Add(typeReference, configurations);
            }

            configurations.Add(configure);
            return(this);
        }
Exemple #3
0
 /// <inheritdoc />
 public ISortConventionDescriptor Configure <TSortType, TRuntimeType>(
     ConfigureSortInputType <TRuntimeType> configure)
     where TSortType : SortInputType <TRuntimeType> =>
 Configure(
     Context.TypeInspector.GetTypeRef(
         typeof(TSortType),
         TypeContext.Input,
         Definition.Scope),
     d =>
 {
     configure.Invoke(
         SortInputTypeDescriptor.From <TRuntimeType>(
             (SortInputTypeDescriptor)d,
             Definition.Scope));
 });