/// <summary> /// Initializes a new instance of the <see cref="ClientException"/> class. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException"> /// The <paramref name="info"/> parameter is null. /// </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException"> /// The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). /// </exception> protected ClientException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info != null) { this.id = (ClientExceptionId)info.GetValue("id", typeof(ClientExceptionId)); } }
/// <summary> /// Initializes a new instance of the <see cref="ClientException"/> class with a specified id and optional parameters. /// </summary> /// <param name="id">Exception id.</param> /// <param name="list">Optional parameters for the error message.</param> public ClientException(ClientExceptionId id, Exception innerException, params string[] list) : base(null, innerException) { this.id = id; if (list != null) { this.parameters = new List <string>(list.Length); foreach (string param in list) { this.parameters.Add(param); } } }
public ClientException(ClientExceptionId id) : this(id, null, null) { }