Пример #1
0
        public EditorState Pop()
        {
            EditorState lastItem  = null;
            var         lastIndex = _editorStateList.Count - 1;

            if (lastIndex >= 0)
            {
                lastItem = _editorStateList[lastIndex];
                _editorStateList.Remove(lastItem);
                if (_editorStateList.Count > 0)
                {
                    lastItem = _editorStateList[_editorStateList.Count - 1];
                }
                else
                {
                    lastItem = null;
                }
            }
            return(lastItem);
        }
 public void Restore(EditorState state)
 {
     Content = state != null?state.GetContent() : "";
 }