Exemplo n.º 1
0
        public void Create(bool haveRealTransaction = true)
        {
            _factory = new MockRepository(MockBehavior.Strict);

            var undoRedoOperations = new UndoRedoOperations(VimHost, new StatusUtil(), FSharpOption<ITextUndoHistory>.None, EditorOperationsFactoryService);
            if (haveRealTransaction)
            {
                _realTransaction = _factory.Create<ITextUndoTransaction>();
                _transactionRaw = new NormalUndoTransaction("Undo", FSharpOption.Create(_realTransaction.Object), undoRedoOperations);
            }
            else
            {
                _transactionRaw = new NormalUndoTransaction("Undo", FSharpOption<ITextUndoTransaction>.None, undoRedoOperations);
            }
            _transaction = _transactionRaw;
        }
        public void Create(bool haveRealTransaction = true)
        {
            _factory = new MockRepository(MockBehavior.Strict);

            var undoRedoOperations = new UndoRedoOperations(VimHost, new StatusUtil(), FSharpOption <ITextUndoHistory> .None, EditorOperationsFactoryService);

            if (haveRealTransaction)
            {
                _realTransaction = _factory.Create <ITextUndoTransaction>();
                _transactionRaw  = new NormalUndoTransaction("Undo", FSharpOption.Create(_realTransaction.Object), undoRedoOperations);
            }
            else
            {
                _transactionRaw = new NormalUndoTransaction("Undo", FSharpOption <ITextUndoTransaction> .None, undoRedoOperations);
            }
            _transaction = _transactionRaw;
        }