Flynet Studio Code Generation Properties

InfoDefinitionClass - Custom Code

InfoDefinitionClass - Custom Code

Previous topic Next topic  

InfoDefinitionClass - Custom Code

Previous topic Next topic  

The Custom Type Info class that defines the return data from this Task's web service.  By copying or importing the code to this property, it will be generated in the Tester as well as the full Web Service.

 

Note to Visual Studio developers modifying Unit Test GUI projects: if this class is altered, you will also want to update the Results tab handling, so that the contents of the Info class are properly displayed in the Results tab...in most cases, changes to the Info class will result in compile errors if you don't make changes in the Results tab processing.

 

The Custom Code properties are special code-oriented string properties with a dedicated editor and the capability for import/export functionality between the Tester GUI generations and the full application generation.

 

If the task's Info class is changed during unit testing, the info class region in its entirety should be copied to this property using the clipboard (is it OK to include the #region and #endregion lines)...by doing so, subsequent unit testing as well as generation of the full web service solution will contain the customizations.

 

Sample TransactionsInfo property from the Transactions sample Task:

 

 #region Task TransactionsInfo definition

 /// <summary>

 /// The TransactionsInfo class is a "bucket" or "bag" class designed as a custom return value

 /// for a WebService request.  In SOAP/Web Service terminology these are known as

 /// "Custom Types".

 /// </summary>

 public class TransactionsInfo: InsureUI2.InfoBase

 {                ///<summary>

         /// For projects with pooled or autoLogon session support, the sessionKey will

         /// contain a valid sessionKey for multipart transactions, such 

         /// as update tasks that read a screen then write to the same screen

         ///</summary>

         public string sessionKey;

         ///<summary>

         /// For projects with a state machine for logic, this property

         /// is set to the last logic state performed, which can be useful in

         /// error reporting and resume logic

         ///</summary>

         public string lastStateHandler;

 

         /// <summary>

         /// Contents from the AcctSummaryMap, which is a singleton map

         /// </summary>

         public AcctSummaryMap AcctSummary;

 

         /// <summary>

         /// Contents from the AcctTransMap, which is a singleton map

         /// </summary>

         public AcctTransMap AcctTrans;

 

         /// <summary>

         /// Number of rows returned for the AcctTrans_rowDataMap, a multirow map

         /// </summary>

         public int AcctTrans_rowDataCount;

 

         /// <summary>

         /// Row Array from the AcctTrans_rowDataMap, which is a multirow map

         /// </summary>

         public AcctTrans_rowDataMap[] AcctTrans_rowData;

         /// <summary>

         /// Constructor, InfoBase will set status="none"

         /// </summary>

         public TransactionsInfo():base()

         {

         }

 

         /// <summary>

         /// Constructor allowing the setting of an initial status, such-as "OK"

         /// </summary>

         /// <param name="status">Initial status, typically "OK"</param>

         public TransactionsInfo(string status):base()

         {

                 this.status=status;

         }

         /// <summary>

         /// Constructor allowing the setting of an initial status, such-as "OK" and the sessionKey

         /// </summary>

         /// <param name="status">Initial status, typically "OK"</param>

         /// <param name="sessionKey">Active sessionKey</param>

         public TransactionsInfo(string status, string sessionKey):base()

         {

                 this.status=status;

                 this.sessionKey=sessionKey;

         }

 }

 #endregion Task TransactionsInfo definition