本文整理汇总了C#中ILogProvider.Get方法的典型用法代码示例。如果您正苦于以下问题:C# ILogProvider.Get方法的具体用法?C# ILogProvider.Get怎么用?C# ILogProvider.Get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILogProvider
的用法示例。
在下文中一共展示了ILogProvider.Get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LogScope
/// <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);
}
示例2: OAuth2AuthenticationFilter
/// <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;
}