That references a method used to pass back to the application the current sort status. An example of how to create such a delegate where the method referenced is called sort_StatusChanged is as below
StatusChangedEventHandler statusChanged = new SoftwareBureau.SortMessages.StatusChangedEventHandler(sort_StatusChanged);
The Sort API passes progress to this method within an object called TSBStatusChangedEventArgs. The properties of this object are
publicbool Cancelled // If the application wishes to stop processing e.g. because the user requests process cancellation this property should be set to true
publicint Phase // The current Phase of sort processing as an integer value
publicstring PhaseDescription // The current Phase of sort processing as a string value
publicint Progress // The progress through the current phase in number of records processed
publicint SortIndex // Should be ignored until further notice
These properties can be used to display progress information to the user.
Phase can be cast to SortProcessingStage. SortProcessingStage is defined in Appendix 2.
Second Parameter
The second parameter must be a delegate defined as
That references a method used to pass back to the application ad hoc information. An example of how to create such a delegate where the method referenced is called sort_MessageReceived is as below
AuditMessageReceivedHandler messageReceived = new SoftwareBureau.SortMessages. AuditMessageReceivedHandler (sort_MessageReceived);
The Sort API passes ad hoc information via this method within TSBMessageEventArgs. This object has the following property.
publicstring Str // Contains an ad hoc message from the sort process e.g. “Verifying data format”
Third Parameter
string[] parameters = new string[] { “myProjectDefinition.xml” };
The third parameter is an array of string. As a bare minimum the first entry in the string array must be the name of a project definition xml file. Subsequent optional entries in the string array can either be override switches or the name of a text file that contains override switches. The override switch modify the parameter value contained in the project definition xml file.
string[] parameters = new string[] { “myProjectDefinition.xml”, “/Weight=66” }
string[] parameters = new string[] { “myProjectDefinition.xml”, “@X:\ParamFiles\myparams.txt” }
string[] parameters = new string[] { “myProjectDefinition.xml”, “@X:\ParamFiles\myparams.txt”, “/Weight=66” }