/// <summary> /// Binds common runtime types to the according <see cref="SortInputType"/> that are /// supported by Neo4J /// </summary> /// <param name="descriptor">The descriptor where the handlers are registered</param> /// <returns>The descriptor that was passed in as a parameter</returns> /// <exception cref="ArgumentNullException"> /// Throws in case the argument <paramref name="descriptor"/> is null /// </exception> public static ISortConventionDescriptor BindDefaultNeo4JTypes( this ISortConventionDescriptor descriptor) { if (descriptor is null) { throw new ArgumentNullException(nameof(descriptor)); } descriptor.BindRuntimeType <string, DefaultSortEnumType>(); descriptor.DefaultBinding <DefaultSortEnumType>(); return(descriptor); }
public static ISortConventionDescriptor BindDefaultTypes( this ISortConventionDescriptor descriptor) { if (descriptor is null) { throw new ArgumentNullException(nameof(descriptor)); } // bind string as it is a class to avoid SortType<string> descriptor.BindRuntimeType <string, DefaultSortEnumType>(); descriptor.DefaultBinding <DefaultSortEnumType>(); return(descriptor); }