コード例 #1
0
ファイル: Log4NetLogger.cs プロジェクト: ngthaiquy/IFramework
 public ScopeProperty(string key, object value)
 {
     _key = key;
     MappedDiagnosticsLogicalContext.Set(key, value);
 }
コード例 #2
0
 /// <summary>
 /// Sets the current logical context item to the specified value.
 /// </summary>
 /// <param name="item">Item name.</param>
 /// <param name="value">Item value.</param>
 /// <returns>&gt;An <see cref="T:System.IDisposable" /> that can be used to remove the item from the current logical context.</returns>
 public static IDisposable SetScoped(string item, object value)
 {
     MappedDiagnosticsLogicalContext.Set(item, value);
     return((IDisposable) new MappedDiagnosticsLogicalContext.ItemRemover(item));
 }