* remove SYSLIB0004 warnings by removing obsolete API calls
* Remove SYSLIB0005 warnings by removing calls to GAC
* Remove SYSLIB0028 warning by replacing call to privatekey by GetRSAPrivateKey
* Remove warning SYSLIB0005 for file common with NETFX
* Removing SYSLIB0003 warnings
* Revert "Removing SYSLIB0003 warnings"
This reverts commit e1cd499f1d.
* Reverting because of build fail
* Fixing build failure due to CER
* Fixing as per review comments
* Fix as per review comments to throw exception.
* Throwing exception when privatekey is null.
* Modify C++/CLI files for warnings.
* PR feedback
* Undo replacement of x509Certificate2.PrivateKey until RC2
[main] Update dependencies from dotnet/winforms
- Coherency Updates:
- System.CodeDom: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Configuration.ConfigurationManager: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Diagnostics.EventLog: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.DirectoryServices: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Drawing.Common: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Reflection.MetadataLoadContext: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Security.Cryptography.Xml: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Security.Permissions: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Windows.Extensions: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.Platforms: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.IO.Packaging: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILDAsm: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILAsm: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- System.Resources.Extensions: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Ref: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Runtime.win-x64: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
- VS.Redist.Common.NetCore.SharedFramework.x64.6.0: from 6.0.0-rc.1.21415.6 to 6.0.0-rc.1.21417.1 (parent: Microsoft.Private.Winforms)
There are a bunch of copies around the tree of POINT interop types: some are structs (as they should be), some are classes. The latter are resulting in tons of allocations. This standardizes on using structs for all of them.
GetInvocationList on one or more delegates is being called in response to most any input operation. We can instead call GetInvocationList only when the set of delegates changes, and use that list over and over.
These were calling an ArrayHelper.ForAll, passing in a method group as a delegate, causing each call to allocate the delegate. The CheckAmbient helper being called was only used here, so rather than caching a delegate, I just inlined the code. The other ArrayHelper methods were each only used in one place, also, so I just inlined those, too, and deleted the helper class.
There is one potentially visible change here. If an invalid property was passed in to the public IAmbientProvider.Get*AmbientValues methods via the "properties" parameter, today it's throwing an ArgumentException using an internal name of "xamlProperty", and this change makes it so that the exception contains the actual parameter name "properties".
We can just pass `this` as the argument and let the compiler cache the delegate for the non-capturing lambda, rather than allocating a new delegate for the instance method on each access.
It's currently using a Hashtable with Int32 keys, which means every operation on the Hashtable boxes the int. Switching to a Dictionary removes those costs. It also lets use use TryGetValue to perform a single lookup to get a value rather than first calling ContainsKey and then using the indexer, and avoiding multiple virtual calls (most APIs on Hashtable are virtual) when we're only using the base class.
There are a multitude of call sites to EventTrace.EasyTraceEvent that pass value type arguments as the param1/param2/param3 arguments. These, however, are defined to take `object`, which means the arguments are boxed. And that boxing happens before we even check whether the provider is enabled, as the call sites aren't guarded by checks for IsEnabled. That ends up meaning we potentially do lots of boxing only to immediately find that the data isn't required as tracing is disabled or isn't at a sufficient level. The fix this commit provides is to make these tracing methods generic, such that nothing need be boxed until after we know tracing is enabled.
[main] Update dependencies from dotnet/winforms
- Coherency Updates:
- System.CodeDom: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Configuration.ConfigurationManager: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Diagnostics.EventLog: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.DirectoryServices: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Drawing.Common: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Reflection.MetadataLoadContext: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Security.Cryptography.Xml: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Security.Permissions: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Windows.Extensions: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.Platforms: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.IO.Packaging: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILDAsm: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILAsm: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- System.Resources.Extensions: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Ref: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Runtime.win-x64: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
- VS.Redist.Common.NetCore.SharedFramework.x64.6.0: from 6.0.0-rc.1.21414.4 to 6.0.0-rc.1.21415.6 (parent: Microsoft.Private.Winforms)
[main] Update dependencies from dotnet/winforms
- Coherency Updates:
- System.CodeDom: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Configuration.ConfigurationManager: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Diagnostics.EventLog: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.DirectoryServices: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Drawing.Common: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Reflection.MetadataLoadContext: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Security.Cryptography.Xml: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Security.Permissions: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Windows.Extensions: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.Platforms: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.IO.Packaging: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILDAsm: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILAsm: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- System.Resources.Extensions: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Ref: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Runtime.win-x64: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
- VS.Redist.Common.NetCore.SharedFramework.x64.6.0: from 6.0.0-rc.1.21411.5 to 6.0.0-rc.1.21414.4 (parent: Microsoft.Private.Winforms)
[main] Update dependencies from dotnet/winforms
- Coherency Updates:
- System.CodeDom: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Configuration.ConfigurationManager: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Diagnostics.EventLog: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.DirectoryServices: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Drawing.Common: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Reflection.MetadataLoadContext: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Security.Cryptography.Xml: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Security.Permissions: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Windows.Extensions: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.Platforms: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.IO.Packaging: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILDAsm: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILAsm: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- System.Resources.Extensions: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Ref: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Runtime.win-x64: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
- VS.Redist.Common.NetCore.SharedFramework.x64.6.0: from 6.0.0-rc.1.21411.2 to 6.0.0-rc.1.21411.5 (parent: Microsoft.Private.Winforms)
[main] Update dependencies from dotnet/winforms
- Coherency Updates:
- System.CodeDom: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Configuration.ConfigurationManager: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Diagnostics.EventLog: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.DirectoryServices: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Drawing.Common: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Reflection.MetadataLoadContext: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Security.Cryptography.Xml: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Security.Permissions: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Windows.Extensions: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.Platforms: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.IO.Packaging: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILDAsm: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.ILAsm: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- System.Resources.Extensions: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Ref: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- Microsoft.NETCore.App.Runtime.win-x64: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)
- VS.Redist.Common.NetCore.SharedFramework.x64.6.0: from 6.0.0-rc.1.21406.5 to 6.0.0-rc.1.21411.2 (parent: Microsoft.Private.Winforms)