-
Notifications
You must be signed in to change notification settings - Fork 471
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
Add new methods ProxyGenerator.CreateDelegateProxy[WithTarget]
#403
Commits on Aug 9, 2018
-
Configuration menu - View commit details
-
Copy full SHA for cf21193 - Browse repository at this point
Copy the full SHA cf21193View commit details -
Rename
DelegateProxyTestCase
fixtureThe tests in there are really about `DelegateProxyGenerator`.
Configuration menu - View commit details
-
Copy full SHA for 8cf8295 - Browse repository at this point
Copy the full SHA 8cf8295View commit details -
Add tests for
ProxyGenerator.CreateDelegateProxy
Create a new fixture (having the same name as the one we previously renamed) with tests for the new `CreateDelegateProxy` functionality. The tests targeting `in` parameters are currently failing. We'll need to fix this in subsequent commits.
Configuration menu - View commit details
-
Copy full SHA for 3b9c10f - Browse repository at this point
Copy the full SHA 3b9c10fView commit details -
Skip failing tests (runtime bug)
It turns out that the tests from the previous commit fail due to a bug in the runtime (`in` parameters + generic types cause `ldtoken` IL to reference a non-existent method) that we've previously encountered. Skip these tests and replace them with similar ones that do not rely on a generic delegate type. These will pass just fine.
Configuration menu - View commit details
-
Copy full SHA for b3ffda4 - Browse repository at this point
Copy the full SHA b3ffda4View commit details -
Add
ProxyGenerator.CreateDelegateProxyWithTarget
method... and tests verifying that the proxy calls (interceptors and) the target as it should.
Configuration menu - View commit details
-
Copy full SHA for f37e736 - Browse repository at this point
Copy the full SHA f37e736View commit details -
Configuration menu - View commit details
-
Copy full SHA for 188c896 - Browse repository at this point
Copy the full SHA 188c896View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0476ae - Browse repository at this point
Copy the full SHA f0476aeView commit details -
Add tests about delegate proxy type caching
Note that these tests don't opt into the same testing pattern used with other proxy kinds; i.e. we don't expand the `ProxyKind` enum be- cause the tests using it often wouldn't work for delegate proxies. This is because they are more limited than other proxy types and don't support most of the usual things like hooks or additional interfaces.
Configuration menu - View commit details
-
Copy full SHA for d75d05b - Browse repository at this point
Copy the full SHA d75d05bView commit details -
Add tests for
IInvocation.Method
& friendsThese tests attempt to document what `IInvocation.Method` and `IInvoc- ation.MethodInvocationTarget` should be for the various proxy types. These tests essentially document two facts: * `IInvocation.Method` points to the corresponding method in the proxied type. * `IInvocation.MethodInvocationTarget` points to the method that will get invoked when invocation proceeds to the target, or `null` if there is no target. No tests are added for `IInvocation.GetConcreteMethod()` and `IInvoc- ation.GetConcreteMethodInvocationTarget()`. These deal mostly with open generics and don't appear to be relevant for delegate proxies.
Configuration menu - View commit details
-
Copy full SHA for 0bd0960 - Browse repository at this point
Copy the full SHA 0bd0960View commit details
Commits on Aug 10, 2018
-
Add test for
in
parameter being unmodifiableAs requested during the review period for `CreateDelegateProxy`.
Configuration menu - View commit details
-
Copy full SHA for b3b2ea2 - Browse repository at this point
Copy the full SHA b3b2ea2View commit details