예제 #1
0
        /// <summary>
        /// Invoke the command
        /// </summary>
        /// <param name="command">Command to run</param>
        public void Invoke(CompleteNote command)
        {
            var note = _storage.Load(command.Id);

            note.Complete();
            _storage.Save(note);
        }
예제 #2
0
        /// <summary>
        /// Invoke the command
        /// </summary>
        /// <param name="command">Command to run</param>
        public void Invoke(UpdateNote command)
        {
            var note = _storage.Load(command.Id);

            note.Update(command.NewBody);
            _storage.Save(note);
        }