LogicalThreadContextProperties Class | Apache log4net™ SDK Documentation

Implementation of Properties collection for the LogicalThreadContext
Inheritance Hierarchy

System
Object
log4net.Util
ContextPropertiesBase
log4net.Util
LogicalThreadContextProperties

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

C#
VB
C++
F#
Copy

    public sealed class LogicalThreadContextProperties : ContextPropertiesBase

    Public NotInheritable Class LogicalThreadContextProperties
    	Inherits ContextPropertiesBase

    public ref class LogicalThreadContextProperties sealed : public ContextPropertiesBase

    [<SealedAttribute>]
    type LogicalThreadContextProperties =
        class
            inherit ContextPropertiesBase
        end

The LogicalThreadContextProperties type exposes the following members.

Properties

| Name | Description
--- | --- | ---
| Item | Gets or sets the value of a property (Overrides ContextPropertiesBase Item String .)

Top
Methods

| Name | Description
--- | --- | ---
| Clear | Clear all the context properties
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| Remove | Remove a property
| ToString | 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

log4net.Util Namespace