C# Class Azavea.NijPredictivePolicing.ACSAlchemist.ImportJob

Encapsulates our command line arguments, and our main 'lifecycle' of how we imagine users will interact with the app. Ensures we have files downloaded, databases created, etc.
Datei anzeigen Open project: azavea/acs-alchemist Class Usage Examples

Public Properties

Property Type Description
ArgumentLine string
Arguments Azavea.NijPredictivePolicing.Common.CmdLineArg[]

Protected Properties

Property Type Description
_cancelled bool
_manager Azavea.NijPredictivePolicing.ACSAlchemistLibrary.Transfer.AcsDataManager
_outputFolder string
_workingFolder string

Public Methods

Method Description
Cancel ( ) : void
ExecuteJob ( ) : bool

Performs our main 'lifecycle'

FindDelimAfterWhitespace ( string str, int idx ) : int

Finds the first of any of our delimiters, but makes sure that the space before the delim contains a whitespace char

ImportJob ( ) : System
IndexOf ( string str, int idx ) : int

Replaced by 'FindDelimAfterWhitespace'

IsCancelled ( ) : bool
Load ( string args ) : bool

Takes a collection of command line arguments, and parses them / loads them onto our properties. Will also accept a single filename, and treat that as if it were provided at the command line

SaveJobFile ( string filename ) : void

Saves a nicely commented job file at the location provided

UpdateProgress ( int value ) : void

Event added so we can provide some basic feedback while this is running in a background thread

Method Details

Cancel() public method

public Cancel ( ) : void
return void

ExecuteJob() public method

Performs our main 'lifecycle'
public ExecuteJob ( ) : bool
return bool

FindDelimAfterWhitespace() public method

Finds the first of any of our delimiters, but makes sure that the space before the delim contains a whitespace char
public FindDelimAfterWhitespace ( string str, int idx ) : int
str string
idx int
return int

ImportJob() public method

public ImportJob ( ) : System
return System

IndexOf() public method

Replaced by 'FindDelimAfterWhitespace'
public IndexOf ( string str, int idx ) : int
str string
idx int
return int

IsCancelled() public method

public IsCancelled ( ) : bool
return bool

Load() public method

Takes a collection of command line arguments, and parses them / loads them onto our properties. Will also accept a single filename, and treat that as if it were provided at the command line
public Load ( string args ) : bool
args string
return bool

SaveJobFile() public method

Saves a nicely commented job file at the location provided
public SaveJobFile ( string filename ) : void
filename string
return void

UpdateProgress() public method

Event added so we can provide some basic feedback while this is running in a background thread
public UpdateProgress ( int value ) : void
value int
return void

Property Details

ArgumentLine public_oe property

public string ArgumentLine
return string

Arguments public_oe static_oe property

public static CmdLineArg[],Azavea.NijPredictivePolicing.Common Arguments
return Azavea.NijPredictivePolicing.Common.CmdLineArg[]

_cancelled protected_oe property

protected bool _cancelled
return bool

_manager protected_oe property

protected AcsDataManager,Azavea.NijPredictivePolicing.ACSAlchemistLibrary.Transfer _manager
return Azavea.NijPredictivePolicing.ACSAlchemistLibrary.Transfer.AcsDataManager

_outputFolder protected_oe property

protected string _outputFolder
return string

_workingFolder protected_oe property

protected string _workingFolder
return string