Comments (21)
I've factored the AppDomain APIs into a separate cs file (https://github.com/dotnet/standard/blob/master/netstandard/ref/mscorlib.appdomain.cs) so they will easier to review (it is impossible to review all of mscorlib.cs on the web side) as we factor out the other API sets out of the standard.
from standard.
@jkotas @rahku @DnlHarvey Can you guys take a look at the latest proposed set of AppDomain APIs at https://github.com/dotnet/standard/blob/master/netstandard/ref/mscorlib.appdomain.cs and let me know if you guys see any other issues.
cc @jfree @gkhanna79
from standard.
AppDomainManager and AppDOmainSetup are only applicable if we create new domains. I don't think it is applicable for defaultdomain.
from standard.
Below two are under FEATURE_CLICKONCE. Should we be including these?
public System.ActivationContext ActivationContext { get { throw null; } }
public System.ApplicationIdentity ApplicationIdentity { get { throw null; } }
from standard.
Following seem related to CAS but are not marked as such
public void SetThreadPrincipal(System.Security.Principal.IPrincipal principal) { }
public void SetPrincipalPolicy(System.Security.Principal.PrincipalPolicy policy) { }
Will these be throwing notSupported?
CreateDomain
public static void Unload(System.AppDomain domain) { }
from standard.
I'm still on the fence about AppDomainManager and AppDomainSetup, right now they don't appear to have any value and are heavily sub-setted. Perhaps they are better not being included in netstandard but instead being an extension with all the APIs in the future if we need them @jkota @terrajobst I'm curious if you guys agree with that.
CreateDomain/Unload yes throw PNSE.
SetThreadPrincipal/SetPrinciplaPolicy - They don't look CAS related to me how do they connect to CAS?
ActivationContext/ApplicationIdentity yes those are ClickOnce but I don't believe they really hurt anything, however with that said I'm going to talk a closer look at the ClickOnce APIs.
from standard.
Perhaps they are better not being included in netstandard
Sounds good to me.
SetThreadPrincipal/SetPrinciplaPolicy
Right, these are not tightly coupled with CAS. They control the default value for Thread.CurrentPrincipal.
ActivationContext/ApplicationIdentity
They are in the same logical bucket as AppDomainManager for me. If you trim AppDomainManager, you can trim these as well.
from standard.
Those two commits should do the final clean-up of the AppDomain APIs. Please take another look at https://github.com/dotnet/standard/blob/master/netstandard/ref/mscorlib.appdomain.cs to be sure the rest seems reasonable and then I will close out this issue.
from standard.
Looks reasonable to me.
from standard.
Regarding FirstChanceExceptionEvent. We have never supported this for coreclr https://github.com/dotnet/coreclr/blob/775003a4c72f0acc37eab84628fcef541533ba4e/src/vm/excep.cpp#L12924.
@gkhanna79 do you happen to remember the reason? I will try removing the ifdef and see if it works.
from standard.
Some of the apis like AppDomain.SetShadowCopyPath are marked as obsolete do we need to port these too?
from standard.
Is there a reason for clubbing Activator type with AppDomain?
from standard.
Otherwise looks fine to me.
from standard.
Some of the apis like AppDomain.SetShadowCopyPath are marked as obsolete do we need to port these too?
We have a lot of obsolete methods in netstandard, in the name of compat. If we cannot support it then then throw PNSE.
from standard.
Is there a reason for clubbing Activator type with AppDomain?
I put it in the same file mainly because it was being sliced and diced similar to AppDomain so it would be easier to review in this file.
from standard.
AppDomainUnloadedException
I dont believe this is applicable since DefaultDomain cannot be unloaded. Unless we are planning to support multiple AppDomains, I think we should not expose this.
from standard.
Unload
The only AppDomain this can be made to work upon is DefaultDomain. And since we cannot unload it, we will throw "CannotUnloadAppDomainException".
Are these both required given we do not have multiple AppDomains?
from standard.
I think we should not expose this.
We are exposing everything by default in name of compatibility and easy migration; unless there is very strong reason not to. There is a ton of types getting exposes that are not useful on its own; but they are very useful to get existing code to compile.
from standard.
Are we simply exposing every type that is not in the set of things we do not want to expose (e.g. CAS, Remoting, etc) or do we consider their usage count as well (i.e. do not expose if the usage is 0%)?
from standard.
Are we simply exposing every type that is not in the set of things we do not want to expose (e.g. CAS, Remoting, etc) or do we consider their usage count as well (i.e. do not expose if the usage is 0%)?
Our default answers is that we are just exposing everything that is in the intersection of the platforms we want to support. Usage data is only one data point which we do consider but it is only a supporting data point as opposed to a deciding one.
from standard.
I think we have closed on the set of APIs here so I'm closing this issue.
from standard.
Related Issues (20)
- Build issues when referencing project that targets multiple frameworks C# WPF HOT 1
- Questions about tagging within this repository / future versions HOT 1
- System.Drawing.Printing.PrinterSettings slow HOT 1
- Support with Universal Windows Platform HOT 2
- How to build .NET Standard based library for ARM architecture HOT 6
- Update docs to reflect the status of .NET Standard in 2020 HOT 2
- [BUG] [UWP] GetManifestResourceInfo doesn't work on UWP HOT 3
- Value Tuple Could not load file or assembly 'System.ValueTuple, Version=4.0.1.0, HOT 1
- mono and .NET5+ HOT 8
- Security Vulnerability due to System.Text.RegularExpressions HOT 4
- Issue with resolving between .NET Standard 2.0 and .NET Standard 2.1 HOT 3
- Class ValueTask has different definitions between .Net Standard 2.1 and .Net 5 HOT 1
- Strong name signature not valid HOT 5
- Assembly version for DispatchProxy shim is too low resulting in duplicate types for DispatchProxy HOT 10
- linq using GetValueOrDefault in Where clause problem HOT 3
- DbCommand.ExecuteReaderAsync throws TaskCanceledException with wrong CancellationToken HOT 2
- [Feature Request] Allow Static Method In Interface HOT 3
- [question] Will Garbage Collector Collect Memebers, When Object Is Casted To Parent Type, That Is Now Inaccessible On The Type Of Reference? HOT 2
- [Feature Request] Support for MultiSet & MultiMap in System.Collections.Generic HOT 3
- Support of 'IAsyncComparer' for Linq operations. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from standard.