예제 #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="GitHubApiException"/> class.
 /// </summary>
 /// <param name="info">
 /// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
 /// that holds the serialized object data about the exception being thrown.
 /// </param>
 /// <param name="context">
 /// The <see cref="System.Runtime.Serialization.StreamingContext"/>
 /// that contains contextual information about the source or destination.
 /// </param>
 protected GitHubApiException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if (info != null)
     {
         _error = (GitHubApiError)info.GetValue("Error", typeof(GitHubApiError));
     }
 }
예제 #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="GitHubApiException"/> class.
 /// </summary>
 /// <param name="info">
 /// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
 /// that holds the serialized object data about the exception being thrown.
 /// </param>
 /// <param name="context">
 /// The <see cref="System.Runtime.Serialization.StreamingContext"/>
 /// that contains contextual information about the source or destination.
 /// </param>
 protected GitHubApiException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if (info != null)
     {
         _error = (GitHubApiError)info.GetValue("Error", typeof(GitHubApiError));
     }
 }
예제 #3
0
 /// <summary>
 /// Creates a new instance of the <see cref="GitHubApiException"/> class.
 /// </summary>
 /// <param name="message">A message about the exception.</param>
 /// <param name="innerException">The inner exception that is the cause of the current exception.</param>
 public GitHubApiException(string message, Exception innerException)
     : base(message, innerException)
 {
     _error = GitHubApiError.ServerError;
 }
예제 #4
0
 /// <summary>
 /// Creates a new instance of the <see cref="GitHubApiException"/> class.
 /// </summary>
 /// <param name="message">A message about the exception.</param>
 /// <param name="error">The GitHub error.</param>
 public GitHubApiException(string message, GitHubApiError error)
     : base(message)
 {
     _error = error;
 }
예제 #5
0
 /// <summary>
 /// Creates a new instance of the <see cref="GitHubApiException"/> class.
 /// </summary>
 /// <param name="message">A message about the exception.</param>
 /// <param name="innerException">The inner exception that is the cause of the current exception.</param>
 public GitHubApiException(string message, Exception innerException)
     : base(message, innerException)
 {
     _error = GitHubApiError.ServerError;
 }
예제 #6
0
 /// <summary>
 /// Creates a new instance of the <see cref="GitHubApiException"/> class.
 /// </summary>
 /// <param name="message">A message about the exception.</param>
 /// <param name="error">The GitHub error.</param>
 public GitHubApiException(string message, GitHubApiError error)
     : base(message)
 {
     _error = error;
 }