Create a new repository for the repository specified
Namespace: log4net.CoreAssembly: log4net (in log4net.dll) Version: 1.2.15.0 (1.2.15.0)
Syntax
Parameters
- repositoryName
- Type: System String
the repository to associate with the ILoggerRepository
- repositoryType
- Type: System Type
the type of repository to create, must implement ILoggerRepository. If this param is null then the default repository type is used.
Return Value
Type: ILoggerRepositorythe repository created
Implements
IRepositorySelector CreateRepository(String, Type)Exceptions
Exception | Condition |
---|---|
System ArgumentNullException | throw if repositoryName is null |
log4net.Core LogException | throw if the repositoryName 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.
If the named repository already exists an exception will be thrown.
If repositoryType is null then the default repository type specified to the constructor is used.
See Also