Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 private static void OnAuditRecordPublished(object sender, AuditRecordEventArgs e)
 {
     // Typically, you would write this into a database.
     Console.WriteLine("AUDIT: " + e.Record.Text);
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 private static void AuditServices_RecordPublished(object sender, AuditRecordEventArgs e)
 {
     Logger.GetLogger().Write(LogLevel.Trace, "AuditServices_RecordPublished:" + e.Record.Text);
 }