Skip to end of metadata
Go to start of metadata

Provides methods to maintain a key/value dictionary that is stored in the System.Runtime.Remoting.Messaging.CallContext.

Definition

public class ContextItems

Summary

The following table summarizes the members exposed in this class.

Public Constructors

ContextItems Constructor() Initializes a new instance of the ContextItems class.

Constants

CallContextSlotName The name of the data slot in the System.Runtime.Remoting.Messaging.CallContext used by the application block.

Public Methods

FlushContextItems() Empties the context items dictionary.
ProcessContextItems(LogEntry) Merges each key/value pair from the context items dictionary with the ExtendedProperties dictionary of the LogEntry.
SetContextItem(object, object) Adds a key/value pair to a dictionary in the System.Runtime.Remoting.Messaging.CallContext. Each context item is recorded with every log entry.

Public Constructors

public ContextItems()

Constants

public const string CallContextSlotName

The name of the data slot in the System.Runtime.Remoting.Messaging.CallContext used by the application block.

Public Methods

public void FlushContextItems()

Empties the context items dictionary.

public void ProcessContextItems(LogEntry log)

Merges each key/value pair from the context items dictionary with the ExtendedProperties dictionary of the LogEntry.

Parameters

log LogEntry object that is being logged.

public void SetContextItem(object key, object value)

Adds a key/value pair to a dictionary in the System.Runtime.Remoting.Messaging.CallContext. Each context item is recorded with every log entry.

Parameters

key Hashtable key.
value Value of the context item. Byte arrays will be base64 encoded.
  • No labels