Beispiel #1
0
        public ComponentResolutionException(string message, Exception inner, ComponentResolutionError error)
            : base(FormatMessage(message, inner), inner)
        {
            Error = error;

            var componentException = inner as ComponentResolutionException;

            if (componentException != null)
            {
                RootCause = componentException.RootCause;
            }
        }
Beispiel #2
0
 private static void AssertThrowsWithRootCause(Action action, ComponentResolutionError rootCause)
 {
     Assert.That(() => action(),
                 Throws.InstanceOf <ComponentResolutionException>()
                 .With.Property("RootCause").EqualTo(rootCause));
 }
Beispiel #3
0
 public ComponentResolutionException(string message, ComponentResolutionError error)
     : base(message)
 {
     Error = RootCause = error;
 }