IRepositorySelector CreateRepository Method (String, Type) | Apache log4net™ SDK Documentation

Creates a new repository with the name specified.

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

C#
VB
C++
F#
Copy

    ILoggerRepository CreateRepository(
    	string repositoryName,
    	Type repositoryType
    )

    Function CreateRepository (
    	repositoryName As String,
    	repositoryType As Type
    ) As ILoggerRepository

    ILoggerRepository^ CreateRepository(
    	String^ repositoryName,
    	Type^ repositoryType
    )

    abstract CreateRepository :
            repositoryName : string *
            repositoryType : Type -> ILoggerRepository

#### Parameters

repositoryName
  Type: System
  String
  The name to associate with the ILoggerRepository.
repositoryType
  Type: System
  Type
  The type of repository to create, must implement ILoggerRepository.

#### Return Value

Type: ILoggerRepository
The repository created.
Remarks

The ILoggerRepository created will be associated with the name specified such that a call to [M:GetRepository(string)] with the same name will return the same repository instance.

See Also

#### Reference

IRepositorySelector Interface
CreateRepository Overload
log4net.Core Namespace