OperationalTrace Class

Persists an event trace generated during a single "logical operation". The trace can be serialized (i.e., Events property accessed) only after the instance has been disposed, after which no further events can be added. EventsSnapshot can be used to inspect history on an active instance.

Definition

Namespace: Quine.Schemas.Core.Eventing
Assembly: Quine.Schemas.Core (in Quine.Schemas.Core.dll) Version: 1.0.0+0ea0706914ee4edf2b0ed66bec3ab4d062a43b68
C#
[DataContractAttribute(Namespace = "http://schemas.quine.no/core/v3_0.xsd")]
public sealed class OperationalTrace : IDisposable
Inheritance
Object    OperationalTrace
Implements
IDisposable

Constructors

OperationalTrace Constructor.

Properties

Events Retrieves the list of events. If the instance has not been disposed (i.e., more events can arrive), the value is null. Disposed instance with no events will return an empty list.
EventsSnapshot Retrieves the snapshot (shallow copy) of current event list. Unlike, Events, this may be accessed even if the instance is not disposed.
HasErrors True if any errors or exceptions have been recorded. Safe for multi-thread access, but false result may be stale.
HasWarningsOrErrors True if any events with high severity have been recorded (including errors). Safe for multi-thread access, but false result may be stale.
IsDisposed True if the instance has been disposed: no further modifications are allowed, and it is safe to access data members. Safe for multi-threaded access.
IsEmpty True if there are no errors or messages. Safe for multi-thread access, but false result may be stale.
Source Any added events that don't specify a source will get the value of this property as the source. May be null.

Methods

Add(OperationalEvent) Adds a record to the log.
Add(EventId, String, String, Object, Int32) Convenience method that calls OperationalEvent(Int32, String, String, Object, Int32) and forwards the object to Add(OperationalEvent).
AddRange 
Append Appends events to this trace.
Dispose Each invocation marks this as frozen and records the stack trace.

See Also