Error out clearly when trying to use COM objects with the DLR. (dotnet/corefx#40075)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Mon, 23 Sep 2019 23:30:46 +0000 (16:30 -0700)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2019 23:30:46 +0000 (16:30 -0700)
commit38120d9da1a57d6e39cb627a31e441b1b0f01cc6
tree6add3a877d141dbc163308a2bea7158fc7fff871
parentc220123600be462d9ef9323ffac99f5509eb1339
Error out clearly when trying to use COM objects with the DLR. (dotnet/corefx#40075)

* Throw an exception in the dynamic binder when trying to dynamically resolve a COM object without an enabled COM binder.

* Add test for exception throw on dynamic usage with COM.

* Update test to validate the change in each binder.

* PR Feedback.

* Add missing using.

Commit migrated from https://github.com/dotnet/corefx/commit/5ed05b311925509d3cd4b6938d4935ca31cdaf92
12 files changed:
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/BinderHelper.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpConvertBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetIndexBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpGetMemberBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpInvokeMemberBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetIndexBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/CSharpSetMemberBinder.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorCode.cs
src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Errors/ErrorFacts.cs
src/libraries/Microsoft.CSharp/src/Resources/Strings.resx
src/libraries/Microsoft.CSharp/tests/RuntimeBinderTests.cs