CompactRepositorySelector CreateRepository Method (Assembly, Type) | Apache log4net™ SDK Documentation

Create a new repository for the assembly specified

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

C#
VB
C++
F#
Copy

    public ILoggerRepository CreateRepository(
    	Assembly assembly,
    	Type repositoryType
    )

    Public Function CreateRepository (
    	assembly As Assembly,
    	repositoryType As Type
    ) As ILoggerRepository

    public:
    virtual ILoggerRepository^ CreateRepository(
    	Assembly^ assembly,
    	Type^ repositoryType
    ) sealed

    abstract CreateRepository :
            assembly : Assembly *
            repositoryType : Type -> ILoggerRepository
    override CreateRepository :
            assembly : Assembly *
            repositoryType : Type -> ILoggerRepository

#### Parameters

assembly
  Type: System.Reflection
  Assembly
  not used
repositoryType
  Type: System
  Type
  the type of repository to create, must implement ILoggerRepository

#### Return Value

Type: ILoggerRepository
the repository created

#### Implements

IRepositorySelector
CreateRepository(Assembly, Type)
Remarks

The assembly argument is not used. This selector does not create a separate repository for each assembly.

If the repositoryType is null then the default repository type specified to the constructor is used.

As a named repository is not specified the default repository is returned. The default repository is named log4net-default-repository.

See Also

#### Reference

CompactRepositorySelector Class
CreateRepository Overload
log4net.Core Namespace