Ejemplo n.º 1
0
        public AdminAuditLogEvent(AdminAuditLogEventId identity, string eventLog)
        {
            AdminAuditLogEvent.< > c__DisplayClass4 CS$ < > 8__locals1 = new AdminAuditLogEvent.< > c__DisplayClass4();
            CS$ < > 8__locals1.eventLog = eventLog;
            this..ctor();
            CS$ < > 8__locals1.< > 4__this = this;
            if (identity == null)
            {
                throw new ArgumentNullException("identity");
            }
            if (CS$ < > 8__locals1.eventLog == null)
            {
                throw new ArgumentNullException("eventLog");
            }
            this.propertyBag[SimpleProviderObjectSchema.Identity] = identity;
            Dictionary <string, AdminAuditLogModifiedProperty> modifiedProperties = new Dictionary <string, AdminAuditLogModifiedProperty>(StringComparer.OrdinalIgnoreCase);
            List <PropertyParseSchema> list = new List <PropertyParseSchema>(AdminAuditLogEvent.AdminAuditLogRecordParseSchema);

            list.Add(new PropertyParseSchema("Parameter", AdminAuditLogSchema.CmdletParameters, (string line) => CS$ < > 8__locals1.< > 4__this.ParseCmdletParameter(line, CS$ < > 8__locals1.eventLog)));
            list.Add(new PropertyParseSchema("Property Modified", AdminAuditLogSchema.ModifiedProperties, (string line) => CS$ < > 8__locals1.< > 4__this.ParseModifiedProperty(line, modifiedProperties, true, CS$ < > 8__locals1.eventLog)));
            list.Add(new PropertyParseSchema("Property Original", AdminAuditLogSchema.ModifiedProperties, (string line) => CS$ < > 8__locals1.< > 4__this.ParseModifiedProperty(line, modifiedProperties, false, CS$ < > 8__locals1.eventLog)));
            AuditLogParseSerialize.ParseAdminAuditLogRecord(this, list, CS$ < > 8__locals1.eventLog);
            if (!string.IsNullOrEmpty(this.ObjectModified) && string.IsNullOrEmpty(this.ModifiedObjectResolvedName))
            {
                this.ModifiedObjectResolvedName = this.ObjectModified;
            }
        }
Ejemplo n.º 2
0
            public AdminAuditLogEvent Convert(IReadOnlyPropertyBag propertyBag)
            {
                ObjectId             storeId  = propertyBag[ItemSchema.Id] as ObjectId;
                AdminAuditLogEventId identity = new AdminAuditLogEventId(storeId);

                return(new AdminAuditLogEvent(identity, propertyBag[ItemSchema.TextBody] as string));
            }