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)}") { }
internal TypeKindChangedException(SymbolMismatch mismatch) : base($"A mismatch on the API was found. The type of {mismatch.Expected} was changed") { }
internal MemberAddedToInterfaceException(SymbolMismatch mismatch) : base($"A mismatch on the API was found. A member was added to the interface of {mismatch.Expected}") { }
private void ThrowAttributeMismatch(SymbolMismatch mismatch) { var attribute = (MyAttribute)(mismatch.Received ?? mismatch.Expected); throw new AttributeMismatchException(attribute); }
internal ModifierChangedException(SymbolMismatch mismatch) : base($"A mismatch on the API was found. A modifier changed on {mismatch.Expected}") { }
internal ElementRemovedException(SymbolMismatch mismatch) : base($"A mismatch on the API was found. The element {mismatch.Expected} was removed") { }