Show / Hide Table of Contents

Interface IContainerBuilder

Регистратор зависимостей и правил их разрешения.

Namespace:InfinniPlatform.IoC
Assembly:InfinniPlatform.Core.Abstractions.dll
Syntax
public interface IContainerBuilder

Methods

| Improve this Doc View Source

RegisterFactory<TComponent>(Func<IContainerResolver, TComponent>)

Регистрирует фабричный метод компонента.

Declaration
IContainerRegistrationRule RegisterFactory<TComponent>(Func<IContainerResolver, TComponent> componentFactory)where TComponent : class
Parameters
Type Name Description
Func<IContainerResolver, TComponent> componentFactory

Фабричный метод компонента.

Returns
Type Description
IContainerRegistrationRule

Правила регистрации компонента.

Type Parameters
Name Description
TComponent

Тип, реализующий компонент.

Examples

RegisterFactory(r => new MyComponent())

| Improve this Doc View Source

RegisterGeneric(Type)

Регистрирует компонент по его generic-типу.

Declaration
IContainerRegistrationRule RegisterGeneric(Type componentType)
Parameters
Type Name Description
Type componentType

Тип, реализующий компонент.

Returns
Type Description
IContainerRegistrationRule

Правила регистрации компонента.

Remarks

Компонент будет создан с помощью Reflection.

Examples

RegisterGeneric(typeof(MyComponent<>))

| Improve this Doc View Source

RegisterInstance<TComponent>(TComponent)

Регистрирует экземпляр компонента.

Declaration
IContainerRegistrationRule RegisterInstance<TComponent>(TComponent componentInstance)where TComponent : class
Parameters
Type Name Description
TComponent componentInstance

Экземпляр компонента.

Returns
Type Description
IContainerRegistrationRule

Правила регистрации компонента.

Type Parameters
Name Description
TComponent

Тип, реализующий компонент.

Examples

RegisterInstance(new MyComponent())

| Improve this Doc View Source

RegisterType(Type)

Регистрирует компонент по его типу.

Declaration
IContainerRegistrationRule RegisterType(Type componentType)
Parameters
Type Name Description
Type componentType

Тип, реализующий компонент.

Returns
Type Description
IContainerRegistrationRule

Правила регистрации компонента.

Remarks

Компонент будет создан с помощью Reflection.

Examples

RegisterType(typeof(MyComponent))

| Improve this Doc View Source

RegisterType<TComponent>()

Регистрирует компонент по его типу.

Declaration
IContainerRegistrationRule RegisterType<TComponent>()where TComponent : class
Returns
Type Description
IContainerRegistrationRule

Правила регистрации компонента.

Type Parameters
Name Description
TComponent

Тип, реализующий компонент.

Remarks

Компонент будет создан с помощью Reflection.

Examples

RegisterType<MyComponent>()

Extension Methods

SchedulerExtensions.RegisterJobInfoSources(IContainerBuilder, Assembly)
SchedulerExtensions.RegisterJobHandlers(IContainerBuilder, Assembly)
DynamicCollectionExtensions.GetItem(Object, Int32)
DynamicCollectionExtensions.SetItem(Object, Int32, Object)
DynamicCollectionExtensions.AddItem(Object, Object)
DynamicCollectionExtensions.InsertItem(Object, Int32, Object)
DynamicCollectionExtensions.RemoveItem(Object, Object)
DynamicCollectionExtensions.RemoveItemAt(Object, Int32)
DynamicCollectionExtensions.MoveItem(Object, Object, Int32)
DynamicObjectExtensions.TryGetPropertyValue(Object, String)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TryGetPropertyValueByPath(Object, String)
DynamicObjectExtensions.TrySetPropertyValueByPath(Object, String, Object)
ReflectionExtensions.IsInstanceOfType(Object, Type)
ReflectionExtensions.GetMemberValue(Object, String)
ReflectionExtensions.SetMemberValue(Object, String, Object)
ReflectionExtensions.InvokeMember(Object, String, Object[], out Object, Type[])
ReflectionExtensions.GetFieldValue(Object, FieldInfo)
ReflectionExtensions.SetFieldValue(Object, FieldInfo, Object)
ReflectionExtensions.GetPropertyValue(Object, PropertyInfo)
ReflectionExtensions.SetPropertyValue(Object, PropertyInfo, Object)
ReflectionExtensions.GetMethodDelegate(Object, MethodInfo)
ReflectionExtensions.GetEventDelegate(Object, EventInfo)
ReflectionExtensions.SetEventDelegate(Object, EventInfo, Object)
ServiceExtentions.RegisterHttpServices(IContainerBuilder, Assembly)
ContainerExtensions.RegisterAssemblyTypes(IContainerBuilder, Assembly, Func<Type, Boolean>, Action<IContainerRegistrationRule>)
DocumentHttpServiceExtensions.RegisterDocumentHttpService(IContainerBuilder, String)
DocumentHttpServiceExtensions.RegisterDocumentHttpService<TDocument>(IContainerBuilder, String)
DocumentHttpServiceExtensions.RegisterDocumentHttpServiceType(IContainerBuilder, Type)
DocumentHttpServiceExtensions.RegisterDocumentHttpServiceType<TServiceHandler>(IContainerBuilder)
DocumentHttpServiceExtensions.RegisterDocumentHttpServiceInstance<TServiceHandler>(IContainerBuilder, TServiceHandler)
DocumentHttpServiceExtensions.RegisterDocumentHttpServices(IContainerBuilder, Assembly)
CommonExtensions.ExecuteSilent<T>(T, Action<T>)
QueuesExtentions.RegisterConsumers(IContainerBuilder, Assembly)
  • Improve this Doc
  • View Source
Back to top © Copyright Infinnity Solutions Ltd, 2010–2017.