Exemplo n.º 1
0
            public void CopyDirectory(DirectoryInfo srcDir, DirectoryInfo dstDir)
            {
                _stack.Clear();
                _stack.Add(dstDir);
                _stack.Add(srcDir);

                _detector.OnOperationFound(new CreateDirectoryOperation(dstDir));

                if (ContainsSpecialDirectoryAttributes(srcDir.Attributes))
                {
                    _detector.OnOperationFound(new EditAttributesOperation(dstDir, srcDir.Attributes));
                }

                GetOperations();
            }
Exemplo n.º 2
0
            private void PostOperations()
            {
                for (var i = _operationsStack.Count - 1; i >= 0; i--)
                {
                    _detector._token.ThrowIfCancellationRequested();
                    _detector.OnOperationFound(_operationsStack[i]);
                }

                _operationsStack.Clear();
            }