Table of Contents

Class ClientArtifactsActivator

Namespace
Cratis.Chronicle
Assembly
Cratis.Chronicle.dll

Represents an implementation of IClientArtifactsActivator.

[Singleton]
public class ClientArtifactsActivator : IClientArtifactsActivator
Inheritance
ClientArtifactsActivator
Implements
Inherited Members

Constructors

ClientArtifactsActivator(IServiceProvider, ILoggerFactory)

Represents an implementation of IClientArtifactsActivator.

public ClientArtifactsActivator(IServiceProvider rootServiceProvider, ILoggerFactory loggerFactory)

Parameters

rootServiceProvider IServiceProvider

The root IServiceProvider.

loggerFactory ILoggerFactory

ILoggerFactory for creating loggers.

Methods

Activate(IServiceProvider, Type)

Creates an instance of the specified artifact type using the given service provider.

public Catch<ActivatedArtifact> Activate(IServiceProvider scopedServiceProvider, Type artifactType)

Parameters

scopedServiceProvider IServiceProvider

The scoped IServiceProvider for resolving dependencies.

artifactType Type

The Type of the artifact to create.

Returns

Catch<ActivatedArtifact>

An ActivatedArtifact wrapping the created instance.

Activate(Type)

Creates an instance of the specified artifact type using the root service provider.

public Catch<ActivatedArtifact> Activate(Type artifactType)

Parameters

artifactType Type

The Type of the artifact to create.

Returns

Catch<ActivatedArtifact>

An ActivatedArtifact wrapping the created instance.

ActivateNonDisposable(Type)

Creates an instance of the specified artifact type using the root service provider.

public Catch<object> ActivateNonDisposable(Type artifactType)

Parameters

artifactType Type

The Type of the artifact to create.

Returns

Catch<object>

An ActivatedArtifact wrapping the created instance.

ActivateNonDisposable<T>(Type)

Creates an instance of the specified artifact type using the root service provider.

public Catch<T> ActivateNonDisposable<T>(Type artifactType) where T : class

Parameters

artifactType Type

The Type of the artifact to create.

Returns

Catch<T>

An ActivatedArtifact wrapping the created instance.

Type Parameters

T

The type of the artifact to create.

Activate<T>(IServiceProvider, Type)

Creates an instance of the specified artifact type using the given service provider.

public Catch<ActivatedArtifact<T>> Activate<T>(IServiceProvider scopedServiceProvider, Type artifactType) where T : class

Parameters

scopedServiceProvider IServiceProvider

The scoped IServiceProvider for resolving dependencies.

artifactType Type

The Type of the artifact to create.

Returns

Catch<ActivatedArtifact<T>>

An ActivatedArtifact wrapping the created instance.

Type Parameters

T

The type of the artifact to create.

Activate<T>(Type)

Creates an instance of the specified artifact type using the root service provider.

public Catch<ActivatedArtifact<T>> Activate<T>(Type artifactType) where T : class

Parameters

artifactType Type

The Type of the artifact to create.

Returns

Catch<ActivatedArtifact<T>>

An ActivatedArtifact wrapping the created instance.

Type Parameters

T

The type of the artifact to create.