Skip to main content
A newer version of this page is available.
All docs
V20.2
.NET Framework 4.5.2+

AuditTrailService.CustomCreateObjectAuditProcessorsFactory Event

Handle this event to replace a default ObjectAuditProcessor for a particular object auditing mode with a custom processor.

Namespace: DevExpress.Persistent.AuditTrail

Assembly: DevExpress.Persistent.BaseImpl.v20.2.dll

Declaration

public event EventHandler<CustomCreateObjectAuditProcessorsFactoryEventArgs> CustomCreateObjectAuditProcessorsFactory

Event Data

The CustomCreateObjectAuditProcessorsFactory event's data class is DevExpress.Persistent.AuditTrail.CustomCreateObjectAuditProcessorsFactoryEventArgs.

Remarks

The following example demonstrates how to handle this event in a WinForms application:

using DevExpress.Persistent.AuditTrail;
// ...
public class Program {
    [STAThread]
    public static void Main(string[] arguments) {
        // ...
        MainDemoWinApplication winApplication = new MainDemoWinApplication();
        AuditTrailService.Instance.CustomCreateObjectAuditProcessorsFactory += 
        new EventHandler<CustomCreateObjectAuditProcessorsFactoryEventArgs>(Instance_CustomCreateObjectAuditProcessorsFactory);
    }
    // ...
    static void Instance_CustomCreateObjectAuditProcessorsFactory(object sender, 
    CustomCreateObjectAuditProcessorsFactoryEventArgs e) {
        e.Factory = new ObjectAuditProcessorsFactory(ObjectAuditingMode.Full, 
        typeof(CustomAuditProcessor));
    }
}
See Also