示例#1
0
 /// <summary>
 /// Constructor: Deserialises the information and recreates the instance.
 /// </summary>
 /// <param name="info">Standard <c>SerializationInfo</c> object</param>
 /// <param name="ctxt">Standard <c>StreamingContext</c> object</param>
 public PINGHeader(SerializationInfo info, StreamingContext ctxt)
 {
     type = (int)info.GetInt32("type");
     bool b_arg = info.GetBoolean("b_arg");
     if (b_arg)
     {
         arg= (PingRsp)info.GetValue("arg",typeof(object));
     }
 }
示例#2
0
        /// <summary>
        /// Constructor: Deserialises the information and recreates the instance.
        /// </summary>
        /// <param name="info">Standard <c>SerializationInfo</c> object</param>
        /// <param name="ctxt">Standard <c>StreamingContext</c> object</param>
        public PINGHeader(SerializationInfo info, StreamingContext ctxt)
        {
            type = (int)info.GetInt32("type");
            bool b_arg = info.GetBoolean("b_arg");

            if (b_arg)
            {
                arg = (PingRsp)info.GetValue("arg", typeof(object));
            }
        }
示例#3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="type">Type of Header</param>
 /// <param name="arg">Response if applicable</param>
 public PINGHeader(int type, PingRsp arg)
 {
     this.type = type;
     this.arg  = arg;
     className = "PING";
 }
示例#4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="type">Type of Header</param>
 /// <param name="arg">Response if applicable</param>
 public PINGHeader(int type, PingRsp arg)
 {
     this.type = type;
     this.arg = arg;
     className = "PING";
 }