예제 #1
0
        ///-------------------------------------------------------------------------------------------------------------
        /// <summary>
        ///    Constructor.  Aquires edit lock on document.
        /// </summary>
        ///-------------------------------------------------------------------------------------------------------------
        public LockedDocData(IServiceProvider serviceProvider, string fileName) : base(serviceProvider, fileName)
        {
            _serviceProvider = serviceProvider;
            _rdt = new RunningDocumentTable(serviceProvider);

            // Locate and lock the document
            _rdt.FindDocument(fileName, out _cookie);
            _rdt.LockDocument(_VSRDTFLAGS.RDT_EditLock , _cookie);
        }
예제 #2
0
        ///-------------------------------------------------------------------------------------------------------------
        /// <summary>
        ///    Constructor.  Aquires edit lock on document.
        /// </summary>
        ///-------------------------------------------------------------------------------------------------------------
        public LockedDocData(IServiceProvider serviceProvider, string fileName) : base(serviceProvider, fileName)
        {
            _serviceProvider = serviceProvider;
            _rdt             = new RunningDocumentTable(serviceProvider);

            // Locate and lock the document
            _rdt.FindDocument(fileName, out _cookie);
            _rdt.LockDocument(_VSRDTFLAGS.RDT_EditLock, _cookie);
        }