/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="typeId">The type identifier</param>
 /// <param name="msg">The message that this is responding to</param>
 /// <param name="returnCode">The operation return code</param>
 /// <param name="returnStatus">Additional information on the operation status</param>
 public SpBaseEventResponse(ISpToInt typeId, ISpToInt eventId, SpEventPriority priority, ISpEventMessage msg, ISpToInt returnCode, string returnStatus)
     : base(typeId, eventId, priority)
 {
     // Transfer the message guid to the response for correlation
     this.Uid = msg.Uid;
     this.ReturnCode = returnCode.ToInt();
     this.ReturnStatus = ReturnStatus;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="typeId">The type identifier</param>
 /// <param name="msg">The message that this is responding to</param>
 /// <param name="returnCode">The operation return code</param>
 /// <param name="returnStatus">Additional information on the operation status</param>
 public SpBaseEventResponse(ISpToInt typeId, ISpToInt eventId, SpEventPriority priority, ISpEventMessage msg, ISpToInt returnCode, string returnStatus)
     : base(typeId, eventId, priority)
 {
     // Transfer the message guid to the response for correlation
     this.Uid          = msg.Uid;
     this.ReturnCode   = returnCode.ToInt();
     this.ReturnStatus = ReturnStatus;
 }
 /// <summary>Constructor</summary>
 /// <param name="_type">Message type identifier</param>
 /// <param name="id">Message identifier</param>
 /// <param name="priority">Message priority</param>
 /// <param name="msg">The message</param>
 /// <param name="_return">Return code</param>
 /// <param name="returnStatus">String return status</param>
 public SpBaseEventResponse(TMsgType _type, TMsgId id, SpEventPriority priority, ISpEventMessage msg, TReturn _return, string returnStatus)
     : base(_type, id, priority)
 {
     // Transfer the message guid to the response for correlation
     this.Uid          = msg.Uid;
     this.ReturnCode   = this.GetReturnId(_return);
     this.ReturnStatus = ReturnStatus;
 }
Esempio n. 4
0
        /// <summary>Constructor for Normal Priority messages</summary>
        /// <param name="_type">The type id to cast to derived for payload retrieval</param>
        /// <param name="id">The event identifier</param>
        public SpBaseEventMsg(TMsgType _type, int id)
        {
            WrapErr.ChkTrue(typeof(TMsgType).IsEnum, 9999, () => string.Format("Event type {0} must be Enum", _type.GetType().Name));
            WrapErr.ChkTrue(typeof(TMsgType).GetEnumUnderlyingType() == typeof(int), 9999,
                            () => string.Format("Event type enum {0} must be derived from int", id.GetType().Name));

            this.typeId   = Convert.ToInt32(_type);
            this.eventId  = id;
            this.priority = SpEventPriority.Normal;
        }
Esempio n. 5
0
 /// <summary>Constructor</summary>
 /// <param name="type">The type id to cast to derived for payload retrieval</param>
 /// <param name="eventId">The event identifier</param>
 /// <param name="priority">The priority of the message</param>
 public MyBaseMsg(MyMsgType msgType, MyMsgId msgId, SpEventPriority priority)
     : base(msgType, msgId, priority)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="typeId">The type id to cast to derived for payload retrieval</param>
 /// <param name="eventId">The event identifier</param>
 /// <param name="priority">The priority of the message</param>
 public SpBaseEventMsg(ISpToInt typeId, ISpToInt eventId, SpEventPriority priority)
 {
     this.typeId = typeId.ToInt();
     this.eventId = eventId.ToInt();
     this.priority = priority;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="typeId">The type id to cast to derived for payload retrieval</param>
 /// <param name="eventId">The event identifier</param>
 /// <param name="priority">The priority of the message</param>
 public SpBaseEventMsg(ISpToInt typeId, ISpToInt eventId, SpEventPriority priority)
 {
     this.typeId   = typeId.ToInt();
     this.eventId  = eventId.ToInt();
     this.priority = priority;
 }
Esempio n. 8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="type">The type id to cast to derived for payload retrieval</param>
 /// <param name="eventId">The event identifier</param>
 /// <param name="priority">The priority of the message</param>
 public MyBaseMsg(MyMsgType msgType, MyEventType eventType, SpEventPriority priority)
     : base(new SpEnumToInt(msgType), new SpEnumToInt(eventType), priority)
 {
 }
Esempio n. 9
0
 /// <summary>Constructor</summary>
 /// <param name="msgType">The message type</param>
 /// <param name="msgId">The message identifier</param>
 /// <param name="priority">The message priority</param>
 public DemoMsgBase(DemoMsgType msgType, DemoMsgId msgId, SpEventPriority priority) :
     base(msgType, msgId, priority)
 {
 }