C# Class DataMigration.FileSystemPublishMonitoringData

Inheritance: IPublishMonitoringData
ファイルを表示 Open project: scoutmedia/DataMigration

Public Methods

Method Description
PublishFailure ( DataSourcePlan plan, IOrderedEnumerable logEntries, Exception exception ) : void

Publishs a file called 'failure' with all the relevant information. It will put one in a directory called 'latest', removing whatever is there ('success' or 'failure') and

PublishSuccess ( DataSourcePlan plan, IOrderedEnumerable logEntries ) : void

Create a file called 'success', with all the relevant information. It will put one file in a directory called 'latest', overwriting.

Private Methods

Method Description
GetLatestAndHistoricalPaths ( DataSourcePlan plan, string &pathForLatest, string &pathForHistorical ) : void

Gets the latest and historical paths. This function simply returns the paths for calling code to use for generating 'latest' and 'historical' files.

WriteLatestAndHistoricalFiles ( DataSourcePlan plan, bool success, IOrderedEnumerable logEntries, Exception exception ) : void

Writes the monitoring report file to both the 'latest', and to a historical directory, which is named in a sortable data format. Thus, there's a complete record of runs, whether they succeeded or failed, and what happened in either case.

WriteMonitoringFile ( DataSourcePlan plan, string monitoredFilePath, bool success, IOrderedEnumerable logEntries, Exception exception ) : void

Writes the monitoring status file out to disk.

WriteSeparatorLine ( StreamWriter writer ) : void

Writes out a separator line to the file.

Method Details

PublishFailure() public method

Publishs a file called 'failure' with all the relevant information. It will put one in a directory called 'latest', removing whatever is there ('success' or 'failure') and
public PublishFailure ( DataSourcePlan plan, IOrderedEnumerable logEntries, Exception exception ) : void
plan DataSourcePlan Plan.
logEntries IOrderedEnumerable Log entries.
exception System.Exception Exception.
return void

PublishSuccess() public method

Create a file called 'success', with all the relevant information. It will put one file in a directory called 'latest', overwriting.
public PublishSuccess ( DataSourcePlan plan, IOrderedEnumerable logEntries ) : void
plan DataSourcePlan Plan.
logEntries IOrderedEnumerable Log entries.
return void