void InvertCustomization(IAuditTrailRule auditTrailRule) { var auditTrailService = AuditTrailService.Instance; if (auditTrailRule.AuditingMode.HasValue) auditTrailService.ObjectAuditingMode = _oldObjectAuditingMode; auditTrailService.Settings.Clear(); foreach (var info in _oldTypesToAudit) { auditTrailService.Settings.AddType(info.ClassInfo.ClassType,info.Properties.Select(memberInfo => memberInfo.Name).ToArray()); } }
void InvertCustomization(IAuditTrailRule auditTrailRule) { var auditTrailService = AuditTrailService.Instance; if (auditTrailRule.AuditingMode.HasValue) { auditTrailService.ObjectAuditingMode = _oldObjectAuditingMode; } auditTrailService.Settings.Clear(); foreach (var info in _oldTypesToAudit) { auditTrailService.Settings.AddType(info.ClassInfo.ClassType, info.Properties.Select(memberInfo => memberInfo.Name).ToArray()); } }
void ApplyCustomization(IAuditTrailRule auditTrailRule) { var auditTrailService = AuditTrailService.Instance; if (auditTrailRule.AuditingMode.HasValue) { _oldObjectAuditingMode = auditTrailService.ObjectAuditingMode; auditTrailService.ObjectAuditingMode = auditTrailRule.AuditingMode.Value; } var auditTrailSettings = auditTrailService.Settings; _oldTypesToAudit = auditTrailSettings.TypesToAudit; var memberNames = GetMembers((AuditTrailRule) auditTrailRule); if (memberNames.Any()) { auditTrailSettings.Clear(); var names = memberNames.Select(info => info.Name).ToArray(); auditTrailSettings.AddType(auditTrailRule.TypeInfo.Type, auditTrailRule.IncludeRelatedTypes, names); } }
void ApplyCustomization(IAuditTrailRule auditTrailRule) { var auditTrailService = AuditTrailService.Instance; if (auditTrailRule.AuditingMode.HasValue) { _oldObjectAuditingMode = auditTrailService.ObjectAuditingMode; auditTrailService.ObjectAuditingMode = auditTrailRule.AuditingMode.Value; } var auditTrailSettings = auditTrailService.Settings; _oldTypesToAudit = auditTrailSettings.TypesToAudit; var memberNames = GetMembers((AuditTrailRule)auditTrailRule); if (memberNames.Any()) { auditTrailSettings.Clear(); var names = memberNames.Select(info => info.Name).ToArray(); auditTrailSettings.AddType(auditTrailRule.TypeInfo.Type, auditTrailRule.IncludeRelatedTypes, names); } }
void ApplyCustomization(IAuditTrailRule auditTrailRule) { var auditTrailService = AuditTrailService.Instance; if (auditTrailRule.AuditingMode.HasValue) { auditTrailService.ObjectAuditingMode = (DevExpress.Persistent.AuditTrail.ObjectAuditingMode)auditTrailRule.AuditingMode.Value; } var auditTrailSettings = auditTrailService.Settings; var memberNames = GetMembers((AuditTrailRule)auditTrailRule); if (memberNames.Any()) { auditTrailSettings.Clear(); var names = memberNames.Select(info => info.Name).ToArray(); auditTrailSettings.AddType(auditTrailRule.TypeInfo.Type, auditTrailRule.IncludeRelatedTypes, names); foreach (var source in auditTrailRule.TypeInfo.Descendants.Where(info => info.IsPersistent && !info.IsAbstract)) { auditTrailSettings.AddType(source.Type, auditTrailRule.IncludeRelatedTypes, names); } } }
void ApplyCustomization(IAuditTrailRule auditTrailRule) { var auditTrailService = AuditTrailService.Instance; if (auditTrailRule.AuditingMode.HasValue) { auditTrailService.ObjectAuditingMode = (DevExpress.Persistent.AuditTrail.ObjectAuditingMode) auditTrailRule.AuditingMode.Value; } var auditTrailSettings = auditTrailService.Settings; var memberNames = GetMembers((AuditTrailRule) auditTrailRule); if (memberNames.Any()) { auditTrailSettings.Clear(); var names = memberNames.Select(info => info.Name).ToArray(); auditTrailSettings.AddType(auditTrailRule.TypeInfo.Type, auditTrailRule.IncludeRelatedTypes, names); foreach (var source in auditTrailRule.TypeInfo.Descendants.Where(info => info.IsPersistent&&!info.IsAbstract)) { auditTrailSettings.AddType(source.Type, auditTrailRule.IncludeRelatedTypes, names); } } }