DefaultRepositorySelectorCreateRepository Method (String, Type)Apache log4net™ SDK Documentation
Creates a new repository for the specified repository.

Namespace: log4net.Core
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

public ILoggerRepository CreateRepository(
	string repositoryName,
	Type repositoryType
)

Parameters

repositoryName
Type: SystemString
The repository to associate with the ILoggerRepository.
repositoryType
Type: SystemType
The type of repository to create, must implement ILoggerRepository. If this param is then the default repository type is used.

Return Value

Type: ILoggerRepository
The new repository.

Implements

IRepositorySelectorCreateRepository(String, Type)
Exceptions

ExceptionCondition
ArgumentNullExceptionrepositoryName is .
LogExceptionrepositoryName already exists.
Remarks

The ILoggerRepository created will be associated with the repository specified such that a call to [M:GetRepository(string)] with the same repository specified will return the same repository instance.

See Also

Reference