- Notifications
You must be signed in to change notification settings - Fork748
remove remoting block for .NET standard#1170
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
If this is the only line where it is used, can we replace it with runtime feature detection instead of completely removing a feature? E.g. staticreadonlyFunc<object,bool>IsTransparentProxy=GetIsTransparentProxy();staticboolNever(object_)=>false;staticFunc<object,bool>GetIsTransparentProxy(){varremoting=typeof(int).Assembly.GetType("System.Runtime.Remoting.RemotingServices");if(remotingisnull)returnNever;varisProxy=remoting.GetMethod("IsTransparentProxy",new[]{typeof(object)});if(isProxyisnull)returnNever;return(Func<object,bool>)Delegate.CreateDelegate(typeof(Func<object,bool>),isProxy,throwOnBindFailure:true);} P.S.@filmor Travis CI results are not being picked up... |
@lostmsu its a good idea but this isn't a tested feature and I don't want to build a test for it. Are you confident your code will work without tests? |
lostmsu commentedJun 23, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@koubaa the calls to this method probably have some coverage, so if it crashes, we should see in CI. The feature itself might be broken with this, but IMO it is better, than removing it completely. Besides, I did some testing: .NET Framework>usingSystem;>staticboolNever(object_)=>false;>>staticFunc<object,bool>GetIsTransparentProxy(){.varremoting=typeof(int).Assembly.GetType("System.Runtime.Remoting.RemotingServices");.if(remotingisnull)returnNever;..varisProxy=remoting.GetMethod("IsTransparentProxy",new[]{typeof(object)});.if(isProxyisnull)returnNever;..return(Func<object,bool>)Delegate.CreateDelegate(.typeof(Func<object,bool>),isProxy,.throwOnBindFailure:true);.}>vard=GetIsTransparentProxy();>dFunc<object,bool>{Method=[BooleanIsTransparentProxy(System.Object)],Target=null}>d(newobject())false .NET Core>Console.WriteLine(IsTransparentProxy.Method);BooleanNever(System.Object) Mono>vard=GetIsTransparentProxy();>dFunc<object,bool>{Method=[BooleanIsTransparentProxy(System.Object)],Target=null} |
@lostmsu as long as I'm not signing up for testing remoting, I am ok with that. I'll push an update with your change and remove the changelog entry |
@koubaa , yeah, let's do that. |
codecov-commenter commentedJun 24, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #1170 +/- ##======================================= Coverage 86.25% 86.25% ======================================= Files 1 1 Lines 291 291 ======================================= Hits 251 251 Misses 40 40
Continue to review full report at Codecov.
|
Uh oh!
There was an error while loading.Please reload this page.
What does this implement/fix? Explain your changes.
Remove remoting support
Does this close any currently open issues?
Removes some dependency on .NET framework
Any other comments?
...
Checklist
Check all those that are applicable and complete.
AUTHORS
CHANGELOG