Ejemplo n.º 1
0
        private void ThrowParameterNameChanged(SymbolMismatch mismatch)
        {
            var oldParameter = (MyParameter)mismatch.Expected;
            var newParameter = (MyParameter)mismatch.Received;

            throw new ParameterNameMismatchException(oldParameter, newParameter);
        }
 internal DefinitionMismatchException(SymbolMismatch mismatch, bool withParentInfo = false)
     : base($"A mismatch on the API was found. Expected {(withParentInfo ? mismatch.Expected.Parent : mismatch.Expected)} but received {(withParentInfo ? mismatch.Received.Parent : mismatch.Received)}")
 {
 }
Ejemplo n.º 3
0
 internal TypeKindChangedException(SymbolMismatch mismatch)
     : base($"A mismatch on the API was found. The type of {mismatch.Expected} was changed")
 {
 }
Ejemplo n.º 4
0
 internal MemberAddedToInterfaceException(SymbolMismatch mismatch)
     : base($"A mismatch on the API was found. A member was added to the interface of {mismatch.Expected}")
 {
 }
Ejemplo n.º 5
0
        private void ThrowAttributeMismatch(SymbolMismatch mismatch)
        {
            var attribute = (MyAttribute)(mismatch.Received ?? mismatch.Expected);

            throw new AttributeMismatchException(attribute);
        }
Ejemplo n.º 6
0
 internal ModifierChangedException(SymbolMismatch mismatch)
     : base($"A mismatch on the API was found. A modifier changed on {mismatch.Expected}")
 {
 }
Ejemplo n.º 7
0
 internal ElementRemovedException(SymbolMismatch mismatch)
     : base($"A mismatch on the API was found. The element {mismatch.Expected} was removed")
 {
 }