/// <summary>
		/// Creates an additional logger on demand for a subsection of the application.
		/// </summary>
		/// <param name="type">A type whose full name that will be included in the log file.</param>
		/// <returns>The <see cref="ILog"/> instance created with the given type name.</returns>
		internal static ILog Create(Type type) {
			Requires.NotNull(type, "type");

			return Create(type.FullName);
		}
		/// <summary>
		/// Creates an additional logger on demand for a subsection of the application.
		/// </summary>
		/// <param name="name">A name that will be included in the log file.</param>
		/// <returns>The <see cref="ILog"/> instance created with the given name.</returns>
		internal static ILog Create(string name) {
			Requires.NotNullOrEmpty(name, "name");
			return InitializeFacade(name);
		}
		/// <summary>
		/// Creates the main logger for the library, and emits an INFO message
		/// that is the name and version of the library.
		/// </summary>
		/// <param name="name">A name that will be included in the log file.</param>
		/// <returns>The <see cref="ILog"/> instance created with the given name.</returns>
		internal static ILog CreateWithBanner(string name) {
			Requires.NotNullOrEmpty(name, "name");
			ILog log = Create(name);
			log.Info(Util.LibraryVersion);
			return log;
		}
Exemple #4
0
 internal static void NotNullSubtype <T>(Type type, string parameterName)
 {
     Requires.NotNull(type, parameterName);
     Requires.That(typeof(T).IsAssignableFrom(type), parameterName, MessagingStrings.UnexpectedType, typeof(T).FullName, type.FullName);
 }