Exemplo n.º 1
0
 /// <summary>
 /// Add information about the instance for serialization
 /// </summary>
 /// <param name="info">The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context">he System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.</param>
 public override void GetObjectData(SerializationInfo info, StreamingContext context)
 {
     info.AddValue(ERROR_CODE, this.ErrorCode);
     info.AddValue(PARAMS, ModuleException.WriteParamCollection(this.Params));
     base.GetObjectData(info, context);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the System.Exception class with serialized data.
 /// </summary>
 /// <param name="info">The System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context">he System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination.</param>
 protected ModuleException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.ErrorCode = info.GetInt64(ERROR_CODE);
     this.Params    = ModuleException.GetParamCollection(info.GetString(PARAMS));
 }