• Getting Started
  • Tutorials
  • Api Documentation
Show / Hide Table of Contents
  • Onbox.Abstractions.V8
    • IContainer
    • IContainerPipeline
    • IContainerResolver
    • IContainerResolverPipeline
    • IHttpService
    • IJsonService
    • ILoggingService
    • IMapper
    • IMessageService
    • IProgressIndicator
  • Onbox.Core.V8
    • CoreExtensions
    • OnboxExceptionBase
  • Onbox.Core.V8.Http
    • HttpExtensions
    • HttpInterceptor
    • HttpService
    • HttpSettings
    • IHttpInterceptor
  • Onbox.Core.V8.Json
    • JsonExtensions
    • JsonService
  • Onbox.Core.V8.Logging
    • FileLoggingService
    • FileLoggingSettings
  • Onbox.Core.V8.Mapping
    • IMapperActionManager
    • IMapperOperator
    • Mapper
    • MapperActionManager
    • MapperOperator
  • Onbox.Core.V8.Messaging
    • MessageDebugService
  • Onbox.Core.V8.ReactFactory
    • Debouncer
    • Interval
    • ReactFactory
  • Onbox.Core.V8.Reporting
    • ProgressCancelledException
    • ProgressConsoleDebugIndicator
  • Onbox.Di.V8
    • Container
  • Onbox.Mvc.Abstractions.V8
    • IMvcComponent
    • IMvcLifecycleComponent
    • IMvcLifecycleView
    • IMvcView
    • IMvcViewModal
    • IMvcViewModeless
  • Onbox.Mvc.Revit.Abstractions.V8
    • IRevitMvcViewBase
  • Onbox.Mvc.V8
    • TitleVisibility
  • Onbox.Revit.Abstractions.V8
    • IRevitAppData
  • Onbox.Revit.V8
    • ContainerProviderAttribute
    • IRevitContext
    • IRevitExternalApp
    • RevitAppData
    • RevitContainerProviderBase
    • RevitLanguage
  • Onbox.Revit.V8.Applications
    • ContainerPipelineExtensions
    • RevitApp
    • RevitAppBase<TContainer>
  • Onbox.Revit.V8.Async
    • IRevitEventHandler
    • RevitAsyncExtensions
    • RevitAsyncSettings
    • RevitExternalHandler
  • Onbox.Revit.V8.Commands
    • IRevitDestroyableCommand
    • RevitAppCommand<TApplication>
    • RevitContainerCommand<TContainerPipeline>
    • RevitContainerCommandBase<TContainerPipeline, TContainer>
  • Onbox.Revit.V8.ExtensibleStorage
    • AccessLevel
    • IRevitJsonStorage<T>
    • RevitExtensibleStorageEntensions
    • RevitExtensibleStorageSettings
    • RevitJsonStorage<T>
    • RevitSchemaSettings
    • RevitStorageBuilder
  • Onbox.Revit.V8.UI
    • ImageManager
    • IRibbonManager
    • IRibbonPanelManager
    • IRibbonTabManager
    • RibbonHelpers
    • RibbonManager
    • RibbonPanelManager
    • RibbonTabManager
  • Onbox.Store.V8
    • IStorageSubscription
    • IStore<TState>
    • IStoreAction<TState, TSlice>
    • StateEntry<TState>
    • StorageSubscription
    • Store<TState>
    • StoreExtensions

Class Container

Onbox's IOC container implementation

Inheritance
System.Object
Container
Implements
IContainer
IContainerResolver
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Onbox.Di.V8
Assembly: Onbox.Di.dll
Syntax
public class Container : IContainer, IContainerResolver, IDisposable

Fields

| Improve this Doc View Source

scopedInstances

The list of current scoped instances currently registered

Declaration
protected readonly IDictionary<Type, object> scopedInstances
Field Value
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Object>
| Improve this Doc View Source

scopedTypes

The list of current scoped types currently registered

Declaration
protected IDictionary<Type, Type> scopedTypes
Field Value
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Type>
| Improve this Doc View Source

singletonInstances

The list of current singleton instances currently registered

Declaration
protected IDictionary<Type, object> singletonInstances
Field Value
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Object>
| Improve this Doc View Source

singletonTypes

The list of current singleton types currently registered

Declaration
protected IDictionary<Type, Type> singletonTypes
Field Value
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Type>
| Improve this Doc View Source

transientTypes

The list of current transient types currently registered

Declaration
protected IDictionary<Type, Type> transientTypes
Field Value
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Type>

Methods

| Improve this Doc View Source

AddScoped<TImplementation>()

Adds a scoped implementation on the container.

Declaration
public void AddScoped<TImplementation>()
    where TImplementation : class
Type Parameters
Name Description
TImplementation
| Improve this Doc View Source

AddScoped<TContract, TImplementation>()

Adds a scoped implementation to a contract on the container.

Declaration
public void AddScoped<TContract, TImplementation>()
    where TImplementation : class, TContract
Type Parameters
Name Description
TContract
TImplementation
| Improve this Doc View Source

AddSingleton<TImplementation>()

Adds an implementation as a singleton on the container.

Declaration
public void AddSingleton<TImplementation>()
    where TImplementation : class
Type Parameters
Name Description
TImplementation
Remarks

It can not be an abstract or interface type

Exceptions
Type Condition
System.InvalidOperationException

Thrown when using a abstract class or an interface

| Improve this Doc View Source

AddSingleton<TImplementation>(TImplementation)

Adds an instance as a singleton on the container

Declaration
public void AddSingleton<TImplementation>(TImplementation instance)
    where TImplementation : class
Parameters
Type Name Description
TImplementation instance
Type Parameters
Name Description
TImplementation
| Improve this Doc View Source

AddSingleton<TContract, TImplementation>()

Adds an implementation to a contract as a singleton on the container

Declaration
public void AddSingleton<TContract, TImplementation>()
    where TImplementation : class, TContract
Type Parameters
Name Description
TContract
TImplementation
Remarks

It can not be an abstract or interface type

Exceptions
Type Condition
System.InvalidOperationException

Thrown when using a abstract class or an interface

| Improve this Doc View Source

AddSingleton<TContract, TImplementation>(TImplementation)

Adds an instance as a singleton on the container

Declaration
public void AddSingleton<TContract, TImplementation>(TImplementation instance)
    where TImplementation : TContract
Parameters
Type Name Description
TImplementation instance
Type Parameters
Name Description
TContract
TImplementation
| Improve this Doc View Source

AddTransient<TImplementation>()

Adds an implementation as a transient on the container.

Declaration
public void AddTransient<TImplementation>()
    where TImplementation : class
Type Parameters
Name Description
TImplementation
Remarks

It can not be an abstract or interface type

Exceptions
Type Condition
System.InvalidOperationException

Thrown when using a abstract class or an interface

| Improve this Doc View Source

AddTransient<TContract, TImplementation>()

Adds an implementation to a contract as transient on the container

Declaration
public void AddTransient<TContract, TImplementation>()
    where TImplementation : class, TContract
Type Parameters
Name Description
TContract
TImplementation
Remarks

It can not be an abstract or interface type

Exceptions
Type Condition
System.InvalidOperationException

Thrown when using a abstract class or an interface

| Improve this Doc View Source

Clear()

Clears and releases resources from the container

Declaration
public void Clear()
| Improve this Doc View Source

CreateScope()

Creates a scoped context copy of this container

Declaration
public IContainerResolver CreateScope()
Returns
Type Description
IContainerResolver
| Improve this Doc View Source

Dispose()

Clears and releases resources from the container

Declaration
public void Dispose()
| Improve this Doc View Source

Resolve(Type)

Asks the container for a new instance of a type

Declaration
public object Resolve(Type type)
Parameters
Type Name Description
System.Type type
Returns
Type Description
System.Object
| Improve this Doc View Source

Resolve<T>()

Asks the container for a new instance of a type

Declaration
public T Resolve<T>()
Returns
Type Description
T
Type Parameters
Name Description
T

Implements

IContainer
IContainerResolver
System.IDisposable

Extension Methods

CoreExtensions.AddOnboxCore(IContainer)
CoreExtensions.AddFileLogging(IContainer, Action<FileLoggingSettings>)
CoreExtensions.AddMapper(IContainer, Action<MapperActionManager>)
HttpExtensions.AddHttp(IContainer)
HttpExtensions.AddHttp(IContainer, Action<HttpSettings>)
HttpExtensions.AddHttp(IContainer, IHttpInterceptor, Action<HttpSettings>)
HttpExtensions.AddHttp<TInterceptor>(IContainer, Action<HttpSettings>)
HttpExtensions.AddHttp(IContainer, Action<HttpSettings>, Action<HttpRequestMessage>, Action<HttpResponseMessage>)
HttpExtensions.ConfigureHttp(IContainer, Action<HttpSettings>)
JsonExtensions.AddJson(IContainer)
JsonExtensions.AddJson(IContainer, Action<JsonSerializerSettings>)
JsonExtensions.ConfigureJson(IContainer, Action<JsonSerializerSettings>)
StoreExtensions.AddStore<T>(IContainer)
ContainerPipelineExtensions.Pipe<T>(IContainer)
ContainerPipelineExtensions.Pipe<T>(IContainerResolver)
RevitAsyncExtensions.AddRevitAsync(IContainer, Action<RevitAsyncSettings>)
RevitExtensibleStorageEntensions.CreateExtensibleStorageBuilder(IContainer)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX