예제 #1
0
 public ScopeProperty(string key, object value)
 {
     _key = key;
     MappedDiagnosticsLogicalContext.Set(key, value);
 }
 /// <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));
 }