ServiceExtensions Class

Namespace
Shiny
Base Types
  • object
graph BT Type-->Base0["object"] Type["ServiceExtensions"] class Type type-node

Syntax

public static class ServiceExtensions

Methods

Name Value Summary
IsRegistered(IServiceProvider, Type) bool
Check if a service is register in the container
static
IsRegistered<T>(IServiceProvider) bool
Check if a service is registered in the container
static
IsRegistered<TService>(IServiceCollection) bool
Check if a service type is registered on the service builder
static
RegisterJob(IServiceCollection, JobInfo) void
Register a job on the job manager
static
RegisterJob(IServiceCollection, Type, string?, InternetAccess) void
Registers a job on the job manager
static
RegisterModule(IServiceCollection, IShinyModule) void
Register a module (like a category) of services
static
RegisterModule<T>(IServiceCollection) void
Register a module (like a category) of services
static
RegisterPostBuildAction(IServiceCollection, Action<IServiceProvider>) void
Registers a post container build step
static
Resolve<T>(IServiceProvider, bool) T
Get Service of Type T from the IServiceProvider
static
ResolveOrInstantiate(IServiceProvider, Type) object
Attempts to resolve or build an instance from a service provider
static
ResolveOrInstantiate<T>(IServiceProvider) T
Attempts to resolve or build an instance from a service provider
static
SafeResolveAndExecute<T>(IServiceProvider, Func<T, Task>, bool) Task
static

Extension Methods

Name Value Summary
ReflectCopyTo(object) void
ReflectGet(string) object
Gets an objects property dynamically through reflection - will throw an exception if proper has no getter or property does not exists
ReflectSet(string, object) void
Sets an objects property dynamically through reflection - will throw an exception if proper has no setter, wrong type, or property does not exists
GitHub