PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / Log­Event­Data Structure

LogEventData Structure

Specifies the properties of a log event (such as a message, an activity opening or an activity closing). Properties are typically passed in user code as an instance of an anonymous type. Any object can be provided. The properties of the message then stem from the properties of the CLR object. To change the logic that maps the CLR object to the list of property, you can specify a LogEventMetadata.

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.9.1.0 (6.9.1.0)
Syntax
C#
public readonly struct LogEventData : IEquatable<LogEventData>

The LogEventData type exposes the following members.

Properties
  NameDescription
Public propertyData
Gets the raw CLR object. It must be interpreted using the Metadata property.
Public propertyMetadata
Gets the LogEventMetadata, which exposes the Data as a visitable set of name-value properties.
Methods
  NameDescription
Public methodStatic memberCreate(Object)
Creates a new LogEventData and uses the default LogEventMetadata for the run-time type of the specified object.
Public methodStatic memberCreate(Object, LogEventMetadata)
Creates a new LogEventData and specifies a LogEventMetadata.
Public methodStatic memberCreate<T>(T)
Creates a new LogEventData and uses the default LogEventMetadata for the build-time type of the specified object. This overload is faster than the non-generic one.
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueType.Equals(Object).)
Public methodEquals(LogEventData)
Indicates whether the current object is equal to another object of the same type.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueType.GetHashCode().)
Public methodToDictionary
Returns a dictionary containing all properties contained in the current LogEventData.
Public methodToString
Returns the fully qualified type name of this instance.
(Overrides ValueType.ToString().)
Public methodVisitProperties<TVisitorState>
Invokes an action for each property in the current LogEventData.
Public methodWithAdditionalProperty<T>
Returns a LogEventData that augments the current one with an additional property, but does not change the expression model.
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two instances of the type are equal.
Public operatorStatic memberInequality
Determines whether two instances of the type are different.
See Also