Пример #1
0
        /// <summary>Makes a deep copy of this object.</summary>
        /// <returns>A copy of this object.</returns>
        public AuditConfiguration Clone()
        {
            var audit = new AuditConfiguration
            {
                AuditEntryFactory                = AuditEntryFactory,
                AuditEntryPropertyFactory        = AuditEntryPropertyFactory,
                AutoSavePreAction                = AutoSavePreAction,
                IgnoreEntityAdded                = IgnoreEntityAdded,
                IgnoreEntityModified             = IgnoreEntityModified,
                IgnoreEntityDeleted              = IgnoreEntityDeleted,
                IgnoreEntitySoftAdded            = IgnoreEntitySoftAdded,
                IgnoreEntitySoftDeleted          = IgnoreEntitySoftDeleted,
                IgnorePropertyUnchanged          = IgnorePropertyUnchanged,
                IgnoreRelationshipAdded          = IgnoreRelationshipAdded,
                IgnoreRelationshipDeleted        = IgnoreRelationshipDeleted,
                EntityValueFormatters            = new List <Func <object, string, Func <object, object> > >(EntityValueFormatters),
                ExcludeIncludeEntityPredicates   = new List <Func <object, bool?> >(ExcludeIncludeEntityPredicates),
                ExcludeIncludePropertyPredicates = new List <Func <object, string, bool?> >(ExcludeIncludePropertyPredicates),
                SoftAddedPredicates              = new List <Func <object, bool> >(SoftAddedPredicates),
                SoftDeletedPredicates            = new List <Func <object, bool> >(SoftDeletedPredicates),
#if EF5 || EF6
                UseNullForDBNullValue = UseNullForDBNullValue
#endif
            };

            return(audit);
        }
Пример #2
0
 /// <summary>Default constructor.</summary>
 public Audit()
 {
     Configuration = new AuditConfiguration();
     Entries = new List<AuditEntry>();
 }
Пример #3
0
 /// <summary>Default constructor.</summary>
 public Audit()
 {
     Configuration = new AuditConfiguration();
     Entries       = new List <AuditEntry>();
 }
        /// <summary>Static constructor.</summary>
        static AuditManager()
        {
            EntityFrameworkManager.IsEntityFrameworkPlus = true;

            DefaultConfiguration = new AuditConfiguration();
        }
Пример #5
0
 /// <summary>Static constructor.</summary>
 static AuditManager()
 {
     AuditSet             = new ConcurrentDictionary <Type, PropertyInfo>();
     DefaultConfiguration = new AuditConfiguration();
 }
        /// <summary>Makes a deep copy of this object.</summary>
        /// <returns>A copy of this object.</returns>
        public AuditConfiguration Clone()
        {
            var audit = new AuditConfiguration
            {
                AutoSavePreAction = AutoSavePreAction,
                IgnoreEntityAdded = IgnoreEntityAdded,
                IgnoreEntityModified = IgnoreEntityModified,
                IgnoreEntityDeleted = IgnoreEntityDeleted,
                IgnoreEntitySoftAdded = IgnoreEntitySoftAdded,
                IgnoreEntitySoftDeleted = IgnoreEntitySoftDeleted,
                IgnorePropertyUnchanged = IgnorePropertyUnchanged,
                IgnoreRelationshipAdded = IgnoreRelationshipAdded,
                IgnoreRelationshipDeleted = IgnoreRelationshipDeleted,
                EntityValueFormatters = new List<Func<object, string, Func<object, object>>>(EntityValueFormatters),
                ExcludeIncludeEntityPredicates = new List<Func<object, bool?>>(ExcludeIncludeEntityPredicates),
                ExcludeIncludePropertyPredicates = new List<Func<object, string, bool?>>(ExcludeIncludePropertyPredicates),
                SoftAddedPredicates = new List<Func<object, bool>>(SoftAddedPredicates),
                SoftDeletedPredicates = new List<Func<object, bool>>(SoftDeletedPredicates)
            };

            return audit;
        }