Open sandboxFocus

Method CreateRepository

CreateRepository(Assembly, Type)

Creates a new repository for the assembly specified.

Declaration
public ILoggerRepository CreateRepository(Assembly assembly, Type repositoryType)
Parameters
Type Name Description
Assembly assembly

The assembly to use to create the domain to associate with the log4net.Repository.ILoggerRepository.

Type repositoryType

The type of repository to create, must implement log4net.Repository.ILoggerRepository.

Returns
Type Description
ILoggerRepository

The repository created.

Implements
Remarks

The log4net.Repository.ILoggerRepository created will be associated with the domain specified such that a call to GetRepository(Assembly) with the same assembly specified will return the same repository instance.

How the association between Assembly and log4net.Repository.ILoggerRepository is made is not defined. The implementation may choose any method for this association.

CreateRepository(string, Type)

Creates a new repository with the name specified.

Declaration
public ILoggerRepository CreateRepository(string repositoryName, Type repositoryType)
Parameters
Type Name Description
string repositoryName

The name to associate with the log4net.Repository.ILoggerRepository.

Type repositoryType

The type of repository to create, must implement log4net.Repository.ILoggerRepository.

Returns
Type Description
ILoggerRepository

The repository created.

Implements
Remarks

The log4net.Repository.ILoggerRepository created will be associated with the name specified such that a call to GetRepository(string) with the same name will return the same repository instance.