log4net SDK Reference

DefaultRepositorySelector.GetRepository Method (String)

Gets the ILoggerRepository for the specified repository.

[Visual Basic]
NotOverridable Overloads Public Function GetRepository( _
   ByVal repositoryName As String _
) As ILoggerRepository _
    Implements IRepositorySelector.GetRepository
[C#]
public ILoggerRepository GetRepository(
   string repositoryName
);

Parameters

repositoryName
The repository to use to lookup the ILoggerRepository.

Return Value

The ILoggerRepository for the specified repository.

Implements

IRepositorySelector.GetRepository

Remarks

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

Use CreateRepository to create a repository.

Exceptions

Exception TypeCondition
ArgumentNullExceptionrepositoryName is a null reference (Nothing in Visual Basic).
LogExceptionrepositoryName does not exist.

See Also

DefaultRepositorySelector Class | log4net.Core Namespace | DefaultRepositorySelector.GetRepository Overload List