/// <summary>
        /// Constructor voor deserializatie.
        /// </summary>
        /// <param name="info">
        /// De serializatie-info
        /// </param>
        /// <param name="context">
        /// De streamingcontext
        /// </param>
        protected FoutNummerException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            if (info == null)
            {
                return;
            }

            _foutNummer = (FoutNummer)info.GetInt32("foutNummer");
            _items      = (IEnumerable <string>)info.GetValue("items", typeof(IEnumerable <string>));
        }
 public ExpectedFoutNummerAttribute(Type expectedException,
                                    FoutNummer errorCode, string noExceptionMessage)
     : base(noExceptionMessage)
 {
     if (expectedException == null)
     {
         throw new ArgumentNullException("exceptionType");
     }
     if (!typeof(Exception).IsAssignableFrom(expectedException))
     {
         throw new ArgumentException("Expected exception type must be "
                                     + "System.Exception or derived from System.Exception.",
                                     "expectedException");
     }
     ExpectedException  = expectedException;
     ExpectedFoutNummer = errorCode;
 }
示例#3
0
 public static FaultException <FoutNummerFault> FoutNummer(FoutNummer nummer, string reason)
 {
     return(new FaultException <FoutNummerFault>(new FoutNummerFault {
         FoutNummer = nummer
     }, new FaultReason(reason)));
 }
 public ExpectedFoutNummerAttribute(Type expectedException,
                                    FoutNummer errorCode)
     : this(expectedException, errorCode, "")
 {
 }
 /// <summary>
 /// Construeer GapException met bericht <paramref name="message"/> en foutnummer
 /// <paramref name="foutNummer"/>
 /// </summary>
 /// <param name="foutNummer">
 /// Foutnummer van de fout die de exception veroorzaakte
 /// </param>
 /// <param name="message">
 /// Technische info over de exception; nuttig voor developer
 /// </param>
 public FoutNummerException(FoutNummer foutNummer, string message)
     : base(message)
 {
     _foutNummer = foutNummer;
 }