Class ServiceCollectionExtensions
- Namespace
- Apizr
- Assembly
- Apizr.Extensions.Microsoft.DependencyInjection.dll
Apizr service collection extensions
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddApizr(IServiceCollection, Action<IApizrExtendedRegistryBuilder>, Action<IApizrExtendedCommonOptionsBuilder>)
Create a registry with all managers built with both common and proper options
public static IServiceCollection AddApizr(this IServiceCollection services, Action<IApizrExtendedRegistryBuilder> registryBuilder, Action<IApizrExtendedCommonOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
registryBuilder
Action<IApizrExtendedRegistryBuilder>The registry builder with access to proper options
optionsBuilder
Action<IApizrExtendedCommonOptionsBuilder>The common options shared by all managers
Returns
AddApizrCrudManagerFor(IServiceCollection, Assembly[], Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for each CrudEntityAttribute decorated classes
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Assembly[] assemblies, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
assemblies
Assembly[]Any assembly to scan for CrudEntityAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for apiEntityType
object type (class),
with key of type int and "ReadAll" query result of type IEnumerable<T>
and ReadAll query parameters of type IDictionary{string,object}
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apiEntityType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apiEntityType
TypeThe object type to manage with crud api calls (class)
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Assembly[], Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi> for each CrudEntityAttribute decorated classes
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apizrManagerImplementationType, Assembly[] assemblies, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apizrManagerImplementationType
TypeA custom IApizrManager<TWebApi> implementation type
assemblies
Assembly[]Any assembly to scan for CrudEntityAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for apiEntityType
object type (class),
with key of type apiEntityKeyType
and "ReadAll" query result of type IEnumerable<T>
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apiEntityType, Type apiEntityKeyType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apiEntityType
TypeThe object type to manage with crud api calls (class)
apiEntityKeyType
TypeThe object key type
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Type, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for apiEntityType
object type (class),
with key of type apiEntityKeyType
and "ReadAll" query result of type apiEntityReadAllResultType
(inheriting from IEnumerable<T> or be of class type)
and ReadAll query parameters of type IDictionary{string,object}
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apiEntityType, Type apiEntityKeyType, Type apiEntityReadAllResultType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apiEntityType
TypeThe object type to manage with crud api calls (class)
apiEntityKeyType
TypeThe object key type
apiEntityReadAllResultType
Type"ReadAll" query result type (should inherit from IEnumerable<T> or be of class type)
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Type, Type, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for apiEntityType
object type (class),
with key of type apiEntityKeyType
and "ReadAll" query result of type apiEntityReadAllResultType
(inheriting from IEnumerable<T> or be of class type)
and ReadAll query parameters type (inheriting from IDictionary{string,object} or be of class type)
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apiEntityType, Type apiEntityKeyType, Type apiEntityReadAllResultType, Type apiEntityReadAllParamsType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apiEntityType
TypeThe object type to manage with crud api calls (class)
apiEntityKeyType
TypeThe object key type
apiEntityReadAllResultType
Type"ReadAll" query result type (should inherit from IEnumerable<T> or be of class type)
apiEntityReadAllParamsType
TypeReadAll query parameters type
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Type, Type, Type, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi> for apiEntityType
object type (class),
with key of type apiEntityKeyType
and "ReadAll" query result of type apiEntityReadAllResultType
(inheriting from IEnumerable<T> or be of class type)
and ReadAll query parameters type (inheriting from IDictionary{string,object} or be of class type)
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apiEntityType, Type apiEntityKeyType, Type apiEntityReadAllResultType, Type apiEntityReadAllParamsType, Type apizrManagerImplementationType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apiEntityType
TypeThe object type to manage with crud api calls
apiEntityKeyType
TypeThe object key type
apiEntityReadAllResultType
Type"ReadAll" query result type (should inherit from IEnumerable<T> or be of class type)
apiEntityReadAllParamsType
TypeReadAll query parameters type
apizrManagerImplementationType
TypeA custom IApizrManager<TWebApi> implementation type
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type, Type[], Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi> for each CrudEntityAttribute decorated classes
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type apizrManagerImplementationType, Type[] assemblyMarkerTypes, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apizrManagerImplementationType
TypeA custom IApizrManager<TWebApi> implementation type
assemblyMarkerTypes
Type[]Any type contained in assembly to scan for CrudEntityAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor(IServiceCollection, Type[], Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for each CrudEntityAttribute decorated classes
public static IServiceCollection AddApizrCrudManagerFor(this IServiceCollection services, Type[] assemblyMarkerTypes, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
assemblyMarkerTypes
Type[]Any type contained in assembly to scan for CrudEntityAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrCrudManagerFor<T>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for T
object type (class),
with key of type int and "ReadAll" query result of type IEnumerable<T>
and ReadAll query parameters of type IDictionary{string,object}
public static IServiceCollection AddApizrCrudManagerFor<T>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null) where T : class
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
T
The object type to manage with crud api calls
AddApizrCrudManagerFor<T, TKey>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for T
object type (class),
with key of type TKey
and "ReadAll" query result of type IEnumerable<T>
and ReadAll query parameters of type IDictionary{string,object}
public static IServiceCollection AddApizrCrudManagerFor<T, TKey>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null) where T : class
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
T
The object type to manage with crud api calls
TKey
The object key type
AddApizrCrudManagerFor<T, TKey, TReadAllResult>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for T
object type (class),
with key of type TKey
and "ReadAll" query result of type TReadAllResult
(inheriting from IEnumerable<T> or be of class type)
and ReadAll query parameters of type IDictionary{string,object}
public static IServiceCollection AddApizrCrudManagerFor<T, TKey, TReadAllResult>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null) where T : class
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
T
The object type to manage with crud api calls (class)
TKey
The object key type
TReadAllResult
"ReadAll" query result type (should inherit from IEnumerable<T> or be of class type)
AddApizrCrudManagerFor<T, TKey, TReadAllResult, TReadAllParams>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi> for T
object type (class),
with key of type TKey
and "ReadAll" query result of type TReadAllResult
(inheriting from IEnumerable<T> or be of class type)
and ReadAll query parameters type (inheriting from IDictionary{string,object} or be of class type)
public static IServiceCollection AddApizrCrudManagerFor<T, TKey, TReadAllResult, TReadAllParams>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null) where T : class
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
T
The object type to manage with crud api calls (class)
TKey
The object key type
TReadAllResult
"ReadAll" query result type (should inherit from IEnumerable<T> or be of class type)
TReadAllParams
ReadAll query parameters
AddApizrCrudManagerFor<T, TKey, TReadAllResult, TReadAllParams, TApizrManager>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi> for T
object type,
with key of type TKey
and "ReadAll" query result of type TReadAllResult
(inheriting from IEnumerable<T> or be of class type)
and ReadAll query parameters type (inheriting from IDictionary{string,object} or be of class type)
public static IServiceCollection AddApizrCrudManagerFor<T, TKey, TReadAllResult, TReadAllParams, TApizrManager>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null) where T : class where TApizrManager : IApizrManager<ICrudApi<T, TKey, TReadAllResult, TReadAllParams>>
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
T
The object type to manage with crud api calls
TKey
The object key type
TReadAllResult
"ReadAll" query result type (should inherit from IEnumerable<T> or be of class type)
TReadAllParams
ReadAll query parameters
TApizrManager
A custom IApizrManager<TWebApi> implementation
AddApizrManagerFor(IServiceCollection, Assembly[], Action<IApizrExtendedManagerOptionsBuilder>)
Register a IApizrManager<TWebApi> for each BaseAddressAttribute decorated interfaces
public static IServiceCollection AddApizrManagerFor(this IServiceCollection services, Assembly[] assemblies, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
assemblies
Assembly[]Any assembly to scan for BaseAddressAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrManagerFor(IServiceCollection, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi>
public static IServiceCollection AddApizrManagerFor(this IServiceCollection services, Type webApiType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
webApiType
TypeThe web api interface type to manage
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrManagerFor(IServiceCollection, Type, Assembly[], Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi> for each BaseAddressAttribute decorated interfaces
public static IServiceCollection AddApizrManagerFor(this IServiceCollection services, Type apizrManagerImplementationType, Assembly[] assemblies, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apizrManagerImplementationType
TypeA custom IApizrManager<TWebApi> implementation type
assemblies
Assembly[]Any assembly to scan for BaseAddressAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrManagerFor(IServiceCollection, Type, Type, Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi>
public static IServiceCollection AddApizrManagerFor(this IServiceCollection services, Type webApiType, Type apizrManagerImplementationType, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
webApiType
TypeThe web api interface type to manage
apizrManagerImplementationType
TypeA custom IApizrManager<TWebApi> implementation type
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrManagerFor(IServiceCollection, Type, Type[], Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi> for each BaseAddressAttribute decorated interfaces
public static IServiceCollection AddApizrManagerFor(this IServiceCollection services, Type apizrManagerImplementationType, Type[] assemblyMarkerTypes, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
apizrManagerImplementationType
TypeA custom IApizrManager<TWebApi> implementation type
assemblyMarkerTypes
Type[]Any type contained in assembly to scan for BaseAddressAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrManagerFor(IServiceCollection, Type[], Action<IApizrExtendedManagerOptionsBuilder>)
Register a IApizrManager<TWebApi> for each BaseAddressAttribute decorated interfaces
public static IServiceCollection AddApizrManagerFor(this IServiceCollection services, Type[] assemblyMarkerTypes, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
assemblyMarkerTypes
Type[]Any type contained in assembly to scan for BaseAddressAttribute
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
AddApizrManagerFor<TWebApi>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register IApizrManager<TWebApi>
public static IServiceCollection AddApizrManagerFor<TWebApi>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null)
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
TWebApi
The web api interface to manage
AddApizrManagerFor<TWebApi, TApizrManager>(IServiceCollection, Action<IApizrExtendedManagerOptionsBuilder>)
Register a custom IApizrManager<TWebApi>
public static IServiceCollection AddApizrManagerFor<TWebApi, TApizrManager>(this IServiceCollection services, Action<IApizrExtendedManagerOptionsBuilder> optionsBuilder = null) where TApizrManager : IApizrManager<TWebApi>
Parameters
services
IServiceCollectionThe service collection
optionsBuilder
Action<IApizrExtendedManagerOptionsBuilder>The builder defining specific Apizr options
Returns
Type Parameters
TWebApi
The web api interface to manage
TApizrManager
A custom IApizrManager<TWebApi> implementation