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

Gets the ILoggerRepository for the specified repository.

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(
    	string repositoryName
    )

    Public Function GetRepository (
    	repositoryName As String
    ) As ILoggerRepository

    public:
    virtual ILoggerRepository^ GetRepository(
    	String^ repositoryName
    ) sealed

    abstract GetRepository :
            repositoryName : string -> ILoggerRepository
    override GetRepository :
            repositoryName : string -> ILoggerRepository

#### Parameters

repositoryName
  Type: System
  String
  The repository to use to lookup the ILoggerRepository.

#### Return Value

Type: ILoggerRepository
The ILoggerRepository for the specified repository.

#### Implements

IRepositorySelector
GetRepository(String)
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | repositoryName is .
LogException | repositoryName does not exist.

Remarks

Returns the named repository. If repositoryName is null a ArgumentNullException is thrown. If the repository does not exist a LogException is thrown.

Use [M:CreateRepository(string, Type)] to create a repository.

See Also

#### Reference

DefaultRepositorySelector Class
GetRepository Overload
log4net.Core Namespace