示例#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);
        }
 /// <summary>Default constructor.</summary>
 public Audit()
 {
     Configuration = new AuditConfiguration();
     Entries = new List<AuditEntry>();
 }
 /// <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;
        }