Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

LoggerManager.CreateDomain�Method�(String, Type)

NOTE: This method is now obsolete.

Use CreateRepository instead of CreateDomain


Creates a repository with the specified name and repository type.

[Visual�Basic]
Overloads�Public�Shared�Function�CreateDomain( _
���ByVal repository�As�String,�_
���ByVal repositoryType�As�Type�_
)�As�ILoggerRepository
[C#]
public�static�ILoggerRepository�CreateDomain(
���stringrepository,
���TyperepositoryType
);

Parameters

repository
The name of the repository, this must be unique to the repository.
repositoryType
A Type that implements ILoggerRepository and has a no arg constructor. An instance of this type will be created to act as the ILoggerRepository for the repository specified.

Return Value

The ILoggerRepository created for the repository.

Remarks

CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.

The repository name must be unique. Repositories cannot be redefined. An Exception will be thrown if the repository already exists.

Exceptions

Exception TypeCondition
LogExceptionThe specified repository already exists.

See Also

LoggerManager Class | log4net.Core Namespace | LoggerManager.CreateDomain Overload List