public JsonSettingsAutosaveInterceptor(JsonSettings settings) { _settings = settings; _settings.Modulation.Attach(_module = new AutosaveModule()); //populate information _monitoredProperties = new HashSet <string>(_settings.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance) .Where(p => p.GetSetMethod()?.IsVirtual == true && p.GetCustomAttribute <JsonIgnoreAttribute>(true) == null && p.GetCustomAttribute <IgnoreAutosaveAttribute>(true) == null && AutosaveModule._frameworkParameters.All(f => f != p.Name)) .Select(prop => prop.Name)); }
public SuspendAutosave(AutosaveModule module) { _module = module; module.AutosavingState = AutosavingState.Suspended; }
public JsonSettingsAutosaveNotificationInterceptor(JsonSettings settings, NotificationBinder notificationsHandler) { _settings = settings; _settings.Modulation.Attach(_module = new AutosaveModule()); _module.NotificationsHandler = notificationsHandler; }