コード例 #1
0
 /// <summary>
 /// Creates a new AJAX request exception instance during the deserialization.
 /// </summary>
 /// <param name="info">The serialization info.</param>
 /// <param name="ctx">The streaming context.</param>
 protected AjaxRequestException(SerializationInfo info, StreamingContext ctx)
     : base(info, ctx)
 {
     this.type = (AjaxRequestExceptionType)info.GetValue("requestExceptionType", typeof(AjaxRequestExceptionType));
 }
コード例 #2
0
 /// <summary>
 /// Creates a new exception instance using the specified message.
 /// </summary>
 /// <param name="type">The exception type.</param>
 public AjaxRequestException(AjaxRequestExceptionType type)
     : base((Attribute.GetCustomAttribute(typeof(AjaxRequestExceptionType).GetField(Enum.GetName(typeof(AjaxRequestExceptionType), type)), typeof(DescriptionAttribute)) as DescriptionAttribute).Description)
 {
     this.type = type;
 }