コード例 #1
0
 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());    
     }
 }
コード例 #2
0
        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());
            }
        }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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);
                }
            }
        }
コード例 #6
0
        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);
                }
            }
        }