/// <summary>
        /// Constructor used for deserialization of the exception class.
        /// </summary>
        /// <param name="info">Represents the SerializationInfo of the exception.</param>
        /// <param name="context">Represents the context information of the exception.</param>
        protected WorkflowException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            this.ExceptionNumber = CustomExceptionNumber;

            // Set the exception properties
            this._exCategory = (WorkflowExceptionCategory)info.GetValue("exCategory", typeof(WorkflowExceptionCategory));
            this._exNumber   = info.GetInt32("exNumber");
            this._exCode     = info.GetString("exCode");
        }
 /// <summary>
 /// Constructor allowing the exception message, category, number and code properties to be set.
 /// </summary>
 /// <param name="message">String setting the message of the exception.</param>
 /// <param name="category">The category for the exception.</param>
 /// <param name="number">The number for the exception.</param>
 /// <param name="code">The code for the exception.</param>
 public WorkflowException(string message, WorkflowExceptionCategory category, int number, string code)
     : base(message)
 {
     this.ExceptionNumber = CustomExceptionNumber;
     InitialiseWorkflowInformation(category, number, code);
 }
 /// <summary>
 /// Initialises the private members of the <see cref="WorkflowException"/> exception class.
 /// </summary>
 /// <param name="category">The category for the exception.</param>
 /// <param name="number">The number for the exception.</param>
 /// <param name="code">The code for the exception.</param>
 /// <remarks>
 /// This protected method can be used by derived classes to set the private members of the class
 /// after the class constructor has been called.
 /// </remarks>
 protected void InitialiseWorkflowInformation(WorkflowExceptionCategory category, int number, string code)
 {
     this._exCategory = category;
     this._exNumber = number;
     this._exCode = code;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="message"></param>
 /// <param name="category"></param>
 /// <param name="number"></param>
 /// <param name="code"></param>
 /// <returns></returns>
 public virtual object CreateException(string message, WorkflowExceptionCategory category, int number, string code)
 {
     return new WorkflowException(message, category, number, code);
 }
        /// <summary>
        /// Constructor used for deserialization of the exception class.
        /// </summary>
        /// <param name="info">Represents the SerializationInfo of the exception.</param>
        /// <param name="context">Represents the context information of the exception.</param>
        protected WorkflowException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            this.ExceptionNumber = CustomExceptionNumber;

            // Set the exception properties
            this._exCategory = (WorkflowExceptionCategory)info.GetValue("exCategory", typeof(WorkflowExceptionCategory));
            this._exNumber = info.GetInt32("exNumber");
            this._exCode = info.GetString("exCode");
        }
 /// <summary>
 /// Constructor allowing the exception message, category, number and code properties to be set.
 /// </summary>
 /// <param name="message">String setting the message of the exception.</param>
 /// <param name="category">The category for the exception.</param>
 /// <param name="number">The number for the exception.</param>
 /// <param name="code">The code for the exception.</param>
 public WorkflowException(string message, WorkflowExceptionCategory category, int number, string code)
     : base(message)
 {
     this.ExceptionNumber = CustomExceptionNumber;
     InitialiseWorkflowInformation(category, number, code);
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="message"></param>
 /// <param name="category"></param>
 /// <param name="number"></param>
 /// <param name="code"></param>
 /// <returns></returns>
 public virtual object CreateException(string message, WorkflowExceptionCategory category, int number, string code)
 {
     return(new WorkflowException(message, category, number, code));
 }
 /// <summary>
 /// Initialises the private members of the <see cref="WorkflowException"/> exception class.
 /// </summary>
 /// <param name="category">The category for the exception.</param>
 /// <param name="number">The number for the exception.</param>
 /// <param name="code">The code for the exception.</param>
 /// <remarks>
 /// This protected method can be used by derived classes to set the private members of the class
 /// after the class constructor has been called.
 /// </remarks>
 protected void InitialiseWorkflowInformation(WorkflowExceptionCategory category, int number, string code)
 {
     this._exCategory = category;
     this._exNumber   = number;
     this._exCode     = code;
 }