log4net SDK Reference

LogManager.CreateDomain Method (Assembly, Type)

NOTE: This method is now obsolete.

Use CreateRepository instead of CreateDomain


Creates a repository for the specified assembly and repository type.

[Visual Basic]
Overloads Public Shared Function CreateDomain( _
   ByVal repositoryAssembly As Assembly, _
   ByVal repositoryType As Type _
) As ILoggerRepository
[C#]
public static ILoggerRepository CreateDomain(
   Assembly repositoryAssembly,
   Type repositoryType
);

Parameters

repositoryAssembly
The assembly to use to get the name of 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 ILoggerRepository created will be associated with the repository specified such that a call to GetRepository with the same assembly specified will return the same repository instance.

See Also

LogManager Class | log4net Namespace | LogManager.CreateDomain Overload List