public LinkedUndoTransaction(LinkedTransactionFlags flags, string description, IServiceProvider host) { if (description == null) throw new ArgumentNullException("description"); if (host == null) throw new ArgumentNullException("host"); _mgr = (IVsLinkedUndoTransactionManager)host.GetService(typeof (IVsLinkedUndoTransactionManager)); if (_mgr == null) throw new ArgumentNullException("host", "The host must provide IVsLinkedUndoTransactionManager service."); ErrorHandler.ThrowOnFailure(_mgr.OpenLinkedUndo((uint)flags, description)); _isActive = true; }
public LinkedUndoTransaction(LinkedTransactionFlags flags, string description, IServiceProvider host) { if (description == null) { throw new ArgumentNullException("description"); } if (host == null) { throw new ArgumentNullException("host"); } _mgr = (IVsLinkedUndoTransactionManager)host.GetService(typeof(IVsLinkedUndoTransactionManager)); if (_mgr == null) { throw new ArgumentNullException("host", "The host must provide IVsLinkedUndoTransactionManager service."); } ErrorHandler.ThrowOnFailure(_mgr.OpenLinkedUndo((uint)flags, description)); _isActive = true; }