Ejemplo n.º 1
0
        public virtual void ExportFolder(Folder folder, string targetPath, bool recursive)
        {
            if (folder == null)
            {
                throw new ArgumentNullException(nameof(folder));
            }

            if (targetPath == null)
            {
                throw new ArgumentNullException(nameof(targetPath));
            }

            if (!LongPath.DirectoryExists(targetPath))
            {
                throw new ArgumentException("Invalid path.", nameof(targetPath));
            }

            _errorMessages.Clear();
            ExportFolderContent(folder, targetPath, recursive);
        }
Ejemplo n.º 2
0
        public virtual void ExportList(List list, string targetPath)
        {
            if (list == null)
            {
                throw new ArgumentNullException(nameof(list));
            }

            if (targetPath == null)
            {
                throw new ArgumentNullException(nameof(targetPath));
            }

            if (!LongPath.DirectoryExists(targetPath))
            {
                throw new ArgumentException("Invalid path.", nameof(targetPath));
            }

            _errorMessages.Clear();
            string listPath;

            WriteList(list, targetPath, out listPath);
        }
Ejemplo n.º 3
0
        public bool ExportTo(string targetPath)
        {
            if (targetPath == null)
            {
                throw new ArgumentNullException(nameof(targetPath));
            }

            if (!LongPath.DirectoryExists(targetPath))
            {
                throw new ArgumentException("Invalid path.", nameof(targetPath));
            }

            _folder.Server.ShowMessageBoxOnError = false;
            try
            {
                DataExporter.ExportFolder(_folder, targetPath, true);
            }
            finally
            {
                _folder.Server.ShowMessageBoxOnError = true;
            }
            return(DataExporter.ErrorMessages.Count == 0);
        }