DefaultRepositorySelector GetRepository Method (Assembly) | Apache log4net™ SDK Documentation

Gets the ILoggerRepository for the specified assembly.

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

C#
VB
C++
F#
Copy

    public ILoggerRepository GetRepository(
    	Assembly repositoryAssembly
    )

    Public Function GetRepository (
    	repositoryAssembly As Assembly
    ) As ILoggerRepository

    public:
    virtual ILoggerRepository^ GetRepository(
    	Assembly^ repositoryAssembly
    ) sealed

    abstract GetRepository :
            repositoryAssembly : Assembly -> ILoggerRepository
    override GetRepository :
            repositoryAssembly : Assembly -> ILoggerRepository

#### Parameters

repositoryAssembly
  Type: System.Reflection
  Assembly
  The assembly use to lookup the ILoggerRepository.

#### Return Value

Type: ILoggerRepository
The ILoggerRepository for the assembly

#### Implements

IRepositorySelector
GetRepository(Assembly)
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | repositoryAssembly is .

Remarks

The type of the ILoggerRepository created and the repository to create can be overridden by specifying the RepositoryAttribute attribute on the repositoryAssembly.

The default values are to use the Hierarchy implementation of the ILoggerRepository interface and to use the Name as the name of the repository.

The ILoggerRepository created will be automatically configured using any ConfiguratorAttribute attributes defined on the repositoryAssembly.

See Also

#### Reference

DefaultRepositorySelector Class
GetRepository Overload
log4net.Core Namespace