Exemplo n.º 1
0
        /// <summary>
        /// Sends a change notification to all subscribers, so these can refresh with the new data.
        /// </summary>
        /// <param name="dbactions">The callback of database actions.</param>
        /// <param name="changedCollectionName">the collection that changed.</param>
        /// <returns></returns>
        public RecentProject WriteInDb(DbActions dbactions, string changedCollectionName)
        {
            var res = dbactions?.Invoke();

            // NOTE: It's possible to use a collection with the names of changed collections, if the dbactions performs writes on multiple collections, but let's not go there for now...
            ChangeDatabase(changedCollectionName);
            return(res);
        }