LogicalThreadContextProperties ClassApache log4net™ SDK Documentation
Implementation of Properties collection for the LogicalThreadContext
Inheritance Hierarchy

SystemObject
  log4net.UtilContextPropertiesBase
    log4net.UtilLogicalThreadContextProperties

Namespace: log4net.Util
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

public sealed class LogicalThreadContextProperties : ContextPropertiesBase

The LogicalThreadContextProperties type exposes the following members.

Properties

  NameDescription
Public propertyItem
Gets or sets the value of a property
(Overrides ContextPropertiesBaseItemString.)
Top
Methods

  NameDescription
Public methodClear
Clear all the context properties
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRemove
Remove a property
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Remarks

Class implements a collection of properties that is specific to each thread. The class is not synchronized as each thread has its own PropertiesDictionary.

This class stores its properties in a slot on the CallContext named log4net.Util.LogicalThreadContextProperties.

For .NET Standard 1.3 this class uses System.Threading.AsyncLocal rather than CallContext.

The CallContext requires a link time SecurityPermission for the Infrastructure. If the calling code does not have this permission then this context will be disabled. It will not store any property values set on it.

See Also

Reference