Open sandboxFocus

Class LoggingProperty

Represents a property. A property has a name, a value and a few options.

Inheritance
LoggingProperty
Namespace: PostSharp.Patterns.Diagnostics
Assembly: PostSharp.Patterns.Common.dll
Syntax
public sealed class LoggingProperty

Constructors

Name Description
LoggingProperty(string, Func<object>)

Initializes a new instance of the LoggingProperty class with a dynamic value.

LoggingProperty(string, object)

Initializes a new instance of the LoggingProperty class with a constant value.

Properties

Name Description
Formatter

Gets or sets the formatter used to render the Value as a string. By default, the default formatter for the property value type is used.

IsBaggage

Gets or sets a value indicating whether the property is cross-process. The default value is false. When this property is set to true, IsInherited is automatically set to true.

IsInherited

Gets or sets a value indicating whether the property is inherited from the parent activity by child activities and messages. The default value is true. When this property is set to false, IsBaggage is automatically set to false.

IsRendered

Gets or sets a value indicating whether the property is included in the log message. The default value is false.

Name

Gets the property name.

Value

Gets the property value. The property is never rendered when the value is null. If the LoggingProperty has been initialized with a Func<object>, this property evaluates the delegate every time the property getter is invoked.

Methods

Name Description
ToString()