Inheritance: System.Exception
コード例 #1
0
            void ISafeSerializationData.CompleteDeserialization
                (object obj)
            {
                UnmappedItemException exception = (UnmappedItemException)obj;

                exception._state = this;
            }
コード例 #2
0
    public void Serialization ()
    {
      var exception = new UnmappedItemException ("message", new Exception ("inner"));

      var deserializedException = Serializer.SerializeAndDeserialize (exception);

      Assert.That (deserializedException.Message, Is.EqualTo ("message"));
      Assert.That (deserializedException.InnerException, Is.InstanceOf (typeof (Exception)));
      Assert.That (deserializedException.InnerException.Message, Is.EqualTo ("inner"));
    }