private void AuditServices_RecordPublished(object sender, AuditRecordEventArgs e) { var record = new DatabaseAuditRecord( WindowsIdentity.GetCurrent().Name, (BusinessObject)e.Record.Target, e.Record.MemberName, e.Record.Text ); record.AppendToDatabase(); }
private static void OnAuditRecordPublished(object sender, AuditRecordEventArgs e) { var extendedRecord = (ExtendedAuditRecord)e.Record; var record = new DbAuditRecord( WindowsIdentity.GetCurrent().Name, ((BusinessObject)extendedRecord.Target).Id, extendedRecord.RelatedBusinessObjects.Select(r => r.Id), extendedRecord.MemberName, extendedRecord.Text ); record.AppendToDatabase(); }
private static void OnAuditRecordPublished(object sender, AuditRecordEventArgs e) { // Typically, you would write this into a database. Console.WriteLine("AUDIT: " + e.Record.Text); }
private static void AuditServices_RecordPublished(object sender, AuditRecordEventArgs e) { var message = $"Audit: [Member Name: {e.Record.MemberName}, Operation: {e.Record.Text}, Time: {e.Record.Time}]"; Console.WriteLine(message); }
private static void AuditServices_RecordPublished(object sender, AuditRecordEventArgs e) { Logger.GetLogger().Write(LogLevel.Trace, "AuditServices_RecordPublished:" + e.Record.Text); }