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
파일 보기 프로젝트 열기: scoutmedia/DataMigration 1 사용 예제들

공개 메소드들

메소드 설명
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