示例#1
0
            protected override IObservable <IPreferences> CallUpdateEndpoint(ITogglApi api, IPreferences entityToUpdate)
            {
                var entityWithUpdates = new Ultrawave.Models.Preferences(entityToUpdate);

                entityWithUpdates.CollapseTimeEntries = !entityWithUpdates.CollapseTimeEntries;

                return(api.Preferences.Update(entityWithUpdates)
                       .SelectMany(_ => api.Preferences.Get()));
            }
示例#2
0
            protected override IDatabasePreferences CreateCleanWithPositiveIdFrom(IDatabasePreferences entity)
            {
                var preferences = new Ultrawave.Models.Preferences(entity);

                return(Preferences.Clean(preferences));
            }