internal static void TrackProperty(Expression <Func <T, object> > property) { PropertyInfo info = property.GetPropertyInfo(); TrackingConfigurationValue newValue = new TrackingConfigurationValue(true, TrackingConfigurationPriority.High); TrackingDataStore.PropertyConfigStore.AddOrUpdate( new PropertyConfiguerationKey(info.Name, info.DeclaringType.FullName), newValue, (key, value) => newValue); }
public OverrideTrackingResponse <T> Disable() { TrackingConfigurationValue newvalue = new TrackingConfigurationValue(false, TrackingConfigurationPriority.High); TrackingDataStore.EntityConfigStore.AddOrUpdate( typeof(T).FullName, (key) => newvalue, (key, existingValue) => newvalue); return(this); }
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); }
internal static bool IsTrackingEnabled(PropertyConfiguerationKey property, Type entityType) { if (typeof(IUnTrackable).IsAssignableFrom(entityType)) { return(false); } TrackingConfigurationValue result = TrackingDataStore.PropertyConfigStore .GetOrAdd(property, (x) => PropertyConfigValueFactory(property.PropertyName, entityType)); return(result.Value); }