internal LogScope(string name, ILogProvider provider, Action <RuleLevel> dispose) { _name = name; _dispose = dispose; _logProvider = provider; _log = _logProvider.Get(name); }
/// <summary> /// Initializes a new instance of the <see cref="LogScope"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="logProvider">The log provider.</param> public LogScope(string name, ILogProvider logProvider) { _name = name; _logProvider = logProvider; _dispose = level => { }; _log = _logProvider.Get(name); }
internal LogScope(string name, ILogProvider provider, Action<RuleLevel> dispose) { _name = name; _dispose = dispose; _logProvider = provider; _log = _logProvider.Get(name); }
/// <summary> /// Authentication filter for Brightspace OAuth 2.0 /// </summary> /// <param name="logProvider"></param> /// <param name="requestAuthenticator"></param> /// <param name="principalDependencyRegistry">Called to do out-of-band actions like set up ID2LPrincipal for dependency injection.</param> public OAuth2AuthenticationFilter( ILogProvider logProvider, IRequestAuthenticator requestAuthenticator, ID2LPrincipalDependencyRegistry principalDependencyRegistry ) { m_log = logProvider.Get( this.GetType() ); m_requestAuthenticator = requestAuthenticator; m_principalDependencyRegistry = principalDependencyRegistry; }
/// <summary> /// Authentication filter for Brightspace OAuth 2.0 /// </summary> /// <param name="logProvider"></param> /// <param name="requestAuthenticator"></param> /// <param name="principalDependencyRegistry">Called to do out-of-band actions like set up ID2LPrincipal for dependency injection.</param> public OAuth2AuthenticationFilter( ILogProvider logProvider, IRequestAuthenticator requestAuthenticator, ID2LPrincipalDependencyRegistry principalDependencyRegistry ) { m_log = logProvider.Get(this.GetType()); m_requestAuthenticator = requestAuthenticator; m_principalDependencyRegistry = principalDependencyRegistry; }
/// <summary> /// Creates new log with using <see cref="Type.Namespace"/> for the name. /// </summary> /// <param name="logProvider">The log provider.</param> /// <param name="instance">The instance to retrieve type for naming from.</param> /// <returns>new instance of the log</returns> public static ILog LogForNamespace(this ILogProvider logProvider, object instance) { return(logProvider.Get(instance.GetType().Namespace)); }
/// <summary> /// Creates new log with using <see cref="Type.Namespace"/> for the name. /// </summary> /// <typeparam name="T">type to use for naming</typeparam> /// <param name="logProvider">The log provider.</param> /// <returns>new instance of the log</returns> public static ILog LogForNamespace <T>(this ILogProvider logProvider) { return(logProvider.Get(typeof(T).Namespace)); }
/// <summary> /// Creates new log with using <see cref="Type.FullName"/> for the name. /// </summary> /// <typeparam name="T">type to use for naming</typeparam> /// <param name="logProvider">The log provider.</param> /// <returns>new instance of the log</returns> public static ILog LogForType <T>(this ILogProvider logProvider) { return(logProvider.Get(typeof(T).FullName)); }
public Service(ILogProvider logProvider, IApiService apiService, IRepository repository) { _log = logProvider.Get <Service>(nameof(Service)); _apiService = apiService; _repository = repository; }