PostSharp 6.8 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Transactions Namespace / Logging­Transaction Class

LoggingTransaction Class

Represents a top-level application transaction such as a network request.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Diagnostics.Transactions.LoggingTransaction

Namespace:  PostSharp.Patterns.Diagnostics.Transactions
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.8.6.0 (6.8.6.0)
Syntax
C#
public class LoggingTransaction : IDisposable

The LoggingTransaction type exposes the following members.

Constructors
  NameDescription
Protected methodLoggingTransaction
Initializes a new LoggingTransaction.
Properties
  NameDescription
Public propertyCriticalCount
Gets the number of critical errors in the transaction. This may be used by the ITransactionPolicy to decide of the outcome of the transaction.
Public propertyErrorCount
Gets the number of errors in the transaction including critical errors. This may be used by the ITransactionPolicy to decide of the outcome of the transaction.
Public propertyExecutionTime
Gets the transaction execution time in milliseconds, up to this moment. This may be used by the ITransactionPolicy to decide of the outcome of the transaction.
Public propertyIsSampled
Determines whether the current transaction was opened based on a sampling policy.
Public propertyPolicy
Gets the policy assigned to the current transaction. Can be null in the case of MultiplexerBackend.
Public propertyProperties
Gets the list of logging properties associated with activity that created the transaction.
Public propertySource
Gets the LoggingTypeSource that opened the transaction.
Public propertyWarningCount
Gets the number of warnings in the transaction. This may be used by the ITransactionPolicy to decide of the outcome of the transaction.
Methods
  NameDescription
Public methodClose
Closes the current transaction. This method does not call Dispose(). It is called before the corresponding LoggingContext has been disposed.
Public methodDispose()
Disposes the current LoggingTransaction. This is called after the corresponding LoggingContext has been disposed.
Protected methodDispose(Boolean)
Disposes the current LoggingTransaction. This is called after the corresponding LoggingContext has been disposed.
Public methodOpen
Opens the transaction. The default implementation sets the current LoggingVerbosityConfiguration to the one defined by the policy.
See Also