public FileOp() { _target = Settings.Default.DefaultRepo; Destiny = new FileServices(); XmlService = new XmlService(); Guid = new FileNameGenerator(); }
public DocumentService() { _targetPath = ConfigurationManager.AppSettings["FileRepoPath"]; Directory.CreateDirectory(_targetPath); _fileService = new FileService(); _xmlService = new XmlService(); }
public FileSystemService() { XmlService = new XmlService(); FilenameGeneratorService = new FilenameGeneratorServiceService(); DirectoryService = new DirectoryService(); GuidGeneratorService = new GuidGeneratorService(); }
public IList <IMetadataItem> LoadMetadata() { var metadataFile = GetAllFiles(); var metadataList = XmlService.XmlToMetadataItems(metadataFile); return(metadataList); }
public void AddFile(IMetadataItem metadataItem, bool isRemoveFileEnabled, string sourcePath) { MetaDataIteam = metadataItem; var documentId = GuidGeneratorService.GetNewGuid(); var extension = DirectoryService.GetExtension(sourcePath); MetaDataIteam.ContentFilename = FilenameGeneratorService.GetContentFilename(documentId, extension); MetaDataIteam.MetadataFilename = FilenameGeneratorService.GetMetadataFilename(documentId); var targetDir = DirectoryService.Combine(TargetPath, MetaDataIteam.ValutaYear); MetaDataIteam.OrginalPath = sourcePath; MetaDataIteam.PathInRepo = targetDir + @"\" + MetaDataIteam.ContentFilename; MetaDataIteam.ContentFileExtension = extension; MetaDataIteam.ContentFilename = MetaDataIteam.ContentFilename; MetaDataIteam.DocumentId = documentId; DirectoryService.CreateDirectoryFolder(targetDir); XmlService.MetadataItemToXml(MetaDataIteam, targetDir); DirectoryService.DeleteFile(MetaDataIteam, isRemoveFileEnabled); }
public DocumentService() { this._targePath = ConfigurationManager.AppSettings["RepositoryDir"]; this._fileService = new FileService(); this._xmlService = new XmlService(); }
public DocumentService() { _targetPath = @"C:\Temp"; //System.Configuration.ConfigurationManager.AppSettings["RepositoryDir"]; (Wegen Unit Test) _fileService = new FileService(); _xmlService = new XmlService(); }