PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​AuditAudit­Attribute
Open sandboxFocus

AuditAttribute Class

Custom attribute that, when applied to a method, causes PostSharp to audit execution of this method. Whenever an audited method is executed, the RecordPublished event is raised. You need to register your own logic to the RecordPublished event, for instance to append the record to a database table.

Namespace: PostSharp.Patterns.Diagnostics.Audit
Assembly: PostSharp.Patterns.Diagnostics.dll
Syntax
public class AuditAttribute : LogAttributeBase, IMethodLevelAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, ILogAspect, IAspect

Constructors

Name Description
AuditAttribute()

Initializes a new AuditAttribute.