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

Creates a repository for the specified assembly and repository type.

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

C#
VB
C++
F#
Copy

    public static ILoggerRepository CreateRepository(
    	Assembly repositoryAssembly,
    	Type repositoryType
    )

    Public Shared Function CreateRepository (
    	repositoryAssembly As Assembly,
    	repositoryType As Type
    ) As ILoggerRepository

    public:
    static ILoggerRepository^ CreateRepository(
    	Assembly^ repositoryAssembly,
    	Type^ repositoryType
    )

    static member CreateRepository :
            repositoryAssembly : Assembly *
            repositoryType : Type -> ILoggerRepository

#### Parameters

repositoryAssembly
  Type: System.Reflection
  Assembly
  The assembly to use to get the name of the repository.
repositoryType
  Type: System
  Type
  A Type that implements ILoggerRepository and has a no arg constructor. An instance of this type will be created to act as the ILoggerRepository for the repository specified.

#### Return Value

Type: ILoggerRepository
The ILoggerRepository created for the repository.
Remarks

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

See Also

#### Reference

LoggerManager Class
CreateRepository Overload
log4net.Core Namespace