Esempio n. 1
0
 /// <summary>
 /// Gets the message for a specific error code.
 /// </summary>
 /// <param name="errorCode">The error code.</param>
 /// <returns>The error message.</returns>
 private static string GetMessage(Pdb70LoadErrorCode errorCode)
 {
     switch (errorCode)
     {
         case Pdb70LoadErrorCode.UnsupportedFeature: return Resources.LoadException_Message_UnsupportedFeature;
         case Pdb70LoadErrorCode.AssumedCorrupt: return Resources.LoadException_Message_PotentiallyCorrupt;
         default: return Resources.LoadException_Message_Unknown;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pdb70LoadException" /> class.
 /// </summary>
 /// <param name="errorCode">The error code.</param>
 /// <param name="innerException">The inner exception.</param>
 public Pdb70LoadException(Pdb70LoadErrorCode errorCode, Exception innerException)
     : base(GetMessage(errorCode), innerException)
 {
     ErrorCode = errorCode;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pdb70LoadException"/> class.
 /// </summary>
 /// <param name="info">The object that holds the serialized object data.</param>
 /// <param name="context">The contextual information about the source or destination.</param>
 private Pdb70LoadException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     ErrorCode = (Pdb70LoadErrorCode)info.GetInt32("ErrorCode");
 }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Pdb70LoadException" /> class.
        /// </summary>
        /// <param name="errorCode">The error code.</param>
        public Pdb70LoadException(Pdb70LoadErrorCode errorCode)
            : this(errorCode, null)
        {

        }