/// <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)); } }
/// <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)); } }
/// <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"; }