C# Класс DataMigration.FeedManager

FeedManager implements IFeedManager, an entity which, given an IFeedAccess instance can determine if feed work needs to be done, and move the files from CurrentToArchive, from Drop to Local, and download to the local file system. FeedManager works in tandem with IFeedAccess to manage this process.
Наследование: IFeedManager
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DownloadCurrentToLocal ( bool doDownload = true ) : void

Downloads the feed files in current to the local working directory to process. Alternatively, (if doDownload == false), it will simply locate the files already in the local working directory, and put appropriate FileInfo information in the DataSourcePlan for all files.

MoveCurrentToArchive ( ) : string

Moves all feed files from the 'current' subdirectory to the 'archive' location. The name of the dated subdirectory under archive.

MoveDropToCurrent ( ) : void

Moves all feed files from the 'drop' subfolder to the 'current' location.

NeedsToProcess ( ) : bool

Given a DataSourcePlan and an IFeedAccess instance, an IFeedManager is responsible for determining if there is work to do. This works on LastModifiedDates, comparing what is in the drop to the current.

Приватные методы

Метод Описание
AssureWorkDirExists ( ) : string

Assures the Working Directory exists. It uses Environment.SpecialFolder.Personal, and adds a subdir as described in the Plan.

GetLastModified ( string fileLocation, string subDirectory, string fileName ) : DateTime?

Gets the last modified date for a single file.

GetLastModifiedStates ( ) : DateTime?>>.IList

Gets the last modifiedDate for each file in the current, and the drop.

MoveFeed ( string oldDirectory, string newDirectory, bool abortOnErr ) : void

Moves all files in a particular feed from the specified old dir to new dir.

Описание методов

DownloadCurrentToLocal() публичный Метод

Downloads the feed files in current to the local working directory to process. Alternatively, (if doDownload == false), it will simply locate the files already in the local working directory, and put appropriate FileInfo information in the DataSourcePlan for all files.
public DownloadCurrentToLocal ( bool doDownload = true ) : void
doDownload bool If set to true do download.
Результат void

MoveCurrentToArchive() публичный Метод

Moves all feed files from the 'current' subdirectory to the 'archive' location. The name of the dated subdirectory under archive.
public MoveCurrentToArchive ( ) : string
Результат string

MoveDropToCurrent() публичный Метод

Moves all feed files from the 'drop' subfolder to the 'current' location.
public MoveDropToCurrent ( ) : void
Результат void

NeedsToProcess() публичный Метод

Given a DataSourcePlan and an IFeedAccess instance, an IFeedManager is responsible for determining if there is work to do. This works on LastModifiedDates, comparing what is in the drop to the current.
public NeedsToProcess ( ) : bool
Результат bool