Exemple #1
0
 /// <summary>
 /// Creates a domain with the specified name and repository type.
 /// </summary>
 /// <param name="domain">The name of the domain, this must be unique to the domain.</param>
 /// <param name="repositoryType">A <see cref="Type"/> that implements <see cref="ILoggerRepository"/>
 /// and has a no arg constructor. An instance of this type will be created to act
 /// as the <see cref="ILoggerRepository"/> for the domain specified.</param>
 /// <returns>The <see cref="ILoggerRepository"/> created for the domain.</returns>
 /// <remarks>
 /// <para>
 /// The <paramref name="domain"/> name must be unique. Domains cannot be redefined.
 /// An <see cref="Exception"/> will be thrown if the domain already exists.
 /// </para>
 /// </remarks>
 /// <exception cref="LogException">The specified domain already exists.</exception>
 public static ILoggerRepository CreateDomain(string domain, Type repositoryType)
 {
     return(LoggerManager.CreateDomain(domain, repositoryType));
 }
Exemple #2
0
 /// <summary>
 /// Creates a domain for the specified assembly and repository type.
 /// </summary>
 /// <param name="domainAssembly">The assembly to use to get the name of the domain.</param>
 /// <param name="repositoryType">A <see cref="Type"/> that implements <see cref="ILoggerRepository"/>
 /// and has a no arg constructor. An instance of this type will be created to act
 /// as the <see cref="ILoggerRepository"/> for the domain specified.</param>
 /// <returns>The <see cref="ILoggerRepository"/> created for the domain.</returns>
 /// <remarks>
 /// <para>
 /// The <see cref="ILoggerRepository"/> created will be associated with the domain
 /// specified such that a call to <see cref="GetLoggerRepository(Assembly)"/> with the
 /// same assembly specified will return the same repository instance.
 /// </para>
 /// </remarks>
 public static ILoggerRepository CreateDomain(Assembly domainAssembly, Type repositoryType)
 {
     return(LoggerManager.CreateDomain(domainAssembly, repositoryType));
 }
Exemple #3
0
 /// <summary>
 /// Creates a domain with the specified name.
 /// </summary>
 /// <param name="domain">The name of the domain, this must be unique amongst domain.</param>
 /// <returns>The <see cref="ILoggerRepository"/> created for the domain.</returns>
 /// <remarks>
 /// <para>
 /// Creates the default type of <see cref="ILoggerRepository"/> which is a
 /// <see cref="log4net.Repository.Hierarchy.Hierarchy"/> object.
 /// </para>
 /// <para>
 /// The <paramref name="domain"/> name must be unique. Domains cannot be redefined.
 /// An <see cref="Exception"/> will be thrown if the domain already exists.
 /// </para>
 /// </remarks>
 /// <exception cref="LogException">The specified domain already exists.</exception>
 public static ILoggerRepository CreateDomain(string domain)
 {
     return(LoggerManager.CreateDomain(domain));
 }