Example #1
0
        public virtual async Task <Uri> SaveAuditRecord(AuditRecord record)
        {
            // Build an audit entry
            var entry = new AuditEntry(record, await GetActor());

            // Serialize to json
            string rendered = RenderAuditEntry(entry);

            // Save the record
            return(await SaveAuditRecord(rendered, record.GetResourceType(), record.GetPath(), record.GetAction(), entry.Actor.TimestampUtc));
        }
Example #2
0
        public virtual async Task<Uri> SaveAuditRecord(AuditRecord record)
        {
            // Build an audit entry
            var entry = new AuditEntry(record, await GetActor());

            // Serialize to json
            string rendered = RenderAuditEntry(entry);

            // Save the record
            return await SaveAuditRecord(rendered, record.GetResourceType(), record.GetPath(), record.GetAction(), entry.Actor.TimestampUtc);
        }
Example #3
0
 public virtual string RenderAuditEntry(AuditEntry entry)
 {
     return(JsonConvert.SerializeObject(entry, _auditRecordSerializerSettings));
 }
Example #4
0
 public virtual string RenderAuditEntry(AuditEntry entry)
 {
     return JsonConvert.SerializeObject(entry, _auditRecordSerializerSettings);
 }