DefaultRepositorySelector AliasRepository Method | Apache log4net™ SDK Documentation

Aliases a repository to an existing repository.

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

C#
VB
C++
F#
Copy

    public void AliasRepository(
    	string repositoryAlias,
    	ILoggerRepository repositoryTarget
    )

    Public Sub AliasRepository (
    	repositoryAlias As String,
    	repositoryTarget As ILoggerRepository
    )

    public:
    void AliasRepository(
    	String^ repositoryAlias,
    	ILoggerRepository^ repositoryTarget
    )

    member AliasRepository :
            repositoryAlias : string *
            repositoryTarget : ILoggerRepository -> unit

#### Parameters

repositoryAlias
  Type: System
  String
  The repository to alias.
repositoryTarget
  Type: log4net.Repository
  ILoggerRepository
  The repository that the repository is aliased to.

Exceptions

Exception | Condition
--- | ---
ArgumentNullException | repositoryAlias is . -or- repositoryTarget is .

Remarks

The repository specified will be aliased to the repository when created. The repository must not already exist.

When the repository is created it must utilize the same repository type as the repository it is aliased to, otherwise the aliasing will fail.

See Also

#### Reference

DefaultRepositorySelector Class
log4net.Core Namespace