Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match other converter's validation of CreateInstance in PaddingConverter #571

merged 3 commits into from Mar 13, 2019


None yet
2 participants
Copy link

hughbe commented Mar 12, 2019

  • First commit has no functional changes - it just extracts PaddingConverter to its own file to match coding guidelines for public classes
  • Second commit cleanups up the code but does not fix any bugs. The only piece of dead code removed is the check for if (destinationType == null) because this is checked in the base constructor and there is a test for this.
  • Third PR makes us match other converters (e.g. ListBindingConverter) by fixing the NullRefs and the InvalidCastExceptions, giving us the nice message:
---- System.ArgumentException : One or more entries are not valid in the IDictionary parameter. Verify that all values match up to the object's properties.
-------- System.InvalidCastException : Unable to cast object of type 'System.Object' to type 'System.Int32'.

@hughbe hughbe requested a review from dotnet/dotnet-winforms as a code owner Mar 12, 2019

@JuditRose JuditRose merged commit d0787d8 into dotnet:master Mar 13, 2019

1 check passed

license/cla All CLA requirements met.

@hughbe hughbe deleted the hughbe:converter-fixed branch Mar 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.