internal static void TrackProperty(Expression <Func <T, object> > property)
        {
            PropertyInfo info     = property.GetPropertyInfo();
            var          newValue = new TrackingConfigurationValue(true, TrackingConfigurationPriority.High);

            TrackingDataStore.PropertyConfigStore.AddOrUpdate(
                new PropertyConfiguerationKey(info.Name, info.DeclaringType.FullName),
                newValue,
                (key, value) => newValue);
        }
예제 #2
0
        internal static void SkipProperty(Expression <Func <T, object> > property)
        {
            PropertyInfo info     = property.GetPropertyInfo();
            var          newValue = new TrackingConfigurationValue(false, TrackingConfigurationPriority.High);

            TrackingDataStore.PropertyConfigStore.AddOrUpdate(
                new PropertyConfiguerationKey(info.Name, typeof(T).FullName),
                newValue,
                (existingKey, existingvalue) => newValue);
        }
예제 #3
0
        internal static bool IsTrackingEnabled(Type entityType)
        {
            if (typeof(IUnTrackable).IsAssignableFrom(entityType))
            {
                return(false);
            }

            TrackingConfigurationValue value = TrackingDataStore.EntityConfigStore.GetOrAdd(entityType.FullName, (key) => EntityConfigValueFactory(key, entityType));

            return(value.Value);
        }
        public OverrideTrackingResponse <T> Disable()
        {
            var newvalue = new TrackingConfigurationValue(false,
                                                          TrackingConfigurationPriority.High);

            TrackingDataStore.EntityConfigStore.AddOrUpdate(
                typeof(T).FullName,
                (key) => newvalue,
                (key, existingValue) => newvalue);

            return(this);
        }