## FAQ
**Q: What is a .NET Core application?**
-**A:** A .NET Core application is an application that can run on any .NET Core runtime: CoreCLR (current), .NETNative (future). It can run on one of many .NET core platforms (Windows, OSX, Linux). It relies on the host provided by the given runtime. It's a composable framework built from the packages on which the application depends. Its assembly loading policy permits newer versions of dependencies without any application configuration (e.g.: BindingRedirects are not required).
+**A:** A .NET Core application is an application that can run on any .NET Core runtime: CoreCLR (current), Mono (future). It can run on one of many .NET core platforms (Windows, OSX, Linux). It relies on the host provided by the given runtime. It's a composable framework built from the packages on which the application depends. Its assembly loading policy permits newer versions of dependencies without any application configuration (e.g.: BindingRedirects are not required).
**Q: Can I share source between a .NET Core application, and other target frameworks?**
**A:** Yes. Most of the API supported by .NET Core application is also part of .NET Standard. That source could be compiled as a .NET Standard library and shared with a .NET Core application and a .NET Framework application as a binary. Alternatively, the source could be shared and cross-compiled between a .NET Core application and a .NET Framework application.
Below is a list of all the various options we pivot the project builds on:
- **Target Frameworks:** NetFx (aka Desktop), netstandard (aka dotnet/Portable), NETCoreApp (aka .NET Core), UAP (aka UWP/Store/netcore50)
-- **Platform Runtimes:** NetFx (aka CLR/Desktop), CoreCLR, CoreRT (aka NetNative/AOT/MRT)
+- **Platform Runtimes:** NetFx (aka CLR/Desktop), CoreCLR, Mono
- **OS:** Windows_NT, Linux, OSX, FreeBSD, AnyOS
- **Flavor:** Debug, Release
- **Architecture:** x86, x64, arm, arm64, AnyCPU
- Classes that are forked based on a feature set should have file names `<class>.<feature>.cs`.
- Where `<feature>` is the name of something that causes a fork in code that isn't a single configuration. Examples:
- `.CoreCLR.cs` - implementation specific to CoreCLR runtime
- - `.CoreRT.cs` - implementation specific to CoreRT runtime
- `.Win32.cs` - implementation based on [Win32](https://en.wikipedia.org/wiki/Windows_API)
- `.WinRT.cs` - implementation based on [WinRT](https://en.wikipedia.org/wiki/Windows_Runtime)
- `.Uap.cs` - implementation specific to UAP, also known as [UWP](https://en.wikipedia.org/wiki/Universal_Windows_Platform)
### App Domains
-**Justification**. AppDomains require runtime support and are generally quite expensive. They are not implemented in .NET Core or .NET Native. We do not plan on adding this capability in future.
+**Justification**. AppDomains require runtime support and are generally quite expensive. They are not implemented in .NET Core. We do not plan on adding this capability in future.
**Replacement**. AppDomains were used for different features; for isolation we recommend processes and/or containers. For dynamic loading, we provide `AssemblyLoadContext`. Information (such as the name and base directory) is provided by APIs on other types, for instance `AppContext.BaseDirectory`. Some scenarios, such as getting the list of loaded assemblies are unsupported as they are inherently fragile.
-To make code migration from .NET Framework easier, we have exposed some of the `AppDomain` API surface in .NET Core and .NET Native. Some of the APIs work fine (e.g. `UnhandledException`), some of them do nothing (e.g. `SetCachePath`) and some of them throw `PlatformNotSupportedException` (e.g. `CreateDomain`). See more details about particular API differences in [TODO](https://github.com/dotnet/corefx/issues/18405).
+To make code migration from .NET Framework easier, we have exposed some of the `AppDomain` API surface in .NET Core. Some of the APIs work fine (e.g. `UnhandledException`), some of them do nothing (e.g. `SetCachePath`) and some of them throw `PlatformNotSupportedException` (e.g. `CreateDomain`). See more details about particular API differences in [TODO](https://github.com/dotnet/corefx/issues/18405).
### Remoting
### Code Access Security (CAS)
-**Justification**. Sandboxing, i.e. relying on the runtime or the framework to constrain which resources a managed application or library can run is [not supported on .NET Framework](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) and therefore is also not supported on .NET Core or .NET Native. We believe that there are simply too many pieces in the .NET Framework and runtime that can result in elevation of privileges. Thus we don't treat [CAS as security boundary](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) anymore. On top of that, it makes the implementation more complicated and often has correctness performance implications for applications that don’t intend to use it.
+**Justification**. Sandboxing, i.e. relying on the runtime or the framework to constrain which resources a managed application or library can run is [not supported on .NET Framework](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) and therefore is also not supported on .NET Core. We believe that there are simply too many pieces in the .NET Framework and runtime that can result in elevation of privileges. Thus we don't treat [CAS as security boundary](https://msdn.microsoft.com/en-us/library/c5tk9z76(v=vs.110).aspx) anymore. On top of that, it makes the implementation more complicated and often has correctness performance implications for applications that don’t intend to use it.
**Replacement**. Use operating system provided security boundaries, such as virtualization, containers, or user accounts for running processes with the least set of privileges.
When running on the full .NET Framework we only support using public signed assemblies for debugging and testing purposes. Microsoft does not guarantee that you can successfully load public signed assemblies in all scenarios that are required for production use. For list of known scenarios where public signing does not work when running on .NET Framework, see below.
-However, in the context of .NET Core, or .NET Native, Microsoft supports using public signed assemblies for production uses. Make note, however, that while ability to load public signed binaries is supported on these platforms, the API and contents of the assembly itself is unsupported (due to it being privately built).
+However, in the context of .NET Core, Microsoft supports using public signed assemblies for production uses. Make note, however, that while ability to load public signed binaries is supported on these platforms, the API and contents of the assembly itself is unsupported (due to it being privately built).
Known issues when debugging and testing public signed assemblies on .NET Framework:
Want to make your libraries multi-platform? Want to see how much work is required to make your application compatible with other .NET platforms? The [**.NET Portability Analyzer**](http://github.com/microsoft/dotnet-apiport) is a tool that provides you with a detailed report ([example report](http://dotnet.github.io/port-to-core/Moq4_ApiPortabilityAnalysis.htm)) on how portable your code is across .NET platforms by analyzing assemblies. The Portability Analyzer is offered as a Visual Studio Extension and as a console app.
-## New Targets
-
-- [.NET Core 5](https://www.dotnetfoundation.org/netcore): Has a modular design, employs side-by-side, and targets cross-platform scenarios. Side-by-side allows you to adopt new .NET Core versions without breaking other apps.
-- [ASP.NET 5](https://www.dotnetfoundation.org/aspnet-5): is a modern web-framework built on .NET Core 5 thus giving developers the same benefits.
-- [.NET Native](http://blogs.msdn.com/b/dotnet/archive/2014/04/24/dotnetnative-performance.aspx): Improve performance of your Windows Store apps that run on x64 and ARM machines by using .NET Native's static compilation.
-
## How to Use Portability Analyzer
To begin using the .NET Portability Analyzer, download the extension from the Visual Studio Gallery. You can configure it in Visual Studio via *Tools* >> *Options* >> *.NET Portability Analyzer* and select your Target Platforms. For now, please use ASP.NET 5 as a proxy for all .NET Core 5-based platforms (e.g. [Windows 10 .NET UAP apps](http://blogs.windows.com/buildingapps/2015/03/02/a-first-look-at-the-windows-10-universal-app-platform/)).
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-
-namespace System.Runtime.CompilerServices
-{
- // Instructs IL linkers that the method body decorated with this attribute can be removed
- // during publishing.
- //
- // By default, the body gets replaced by throwing code.
- //
- // UseNopBody can be set to suppress the throwing behavior, replacing the throw with
- // a no-operation body.
- [AttributeUsage(AttributeTargets.Method)]
- internal class RemovableFeatureAttribute : Attribute
- {
- public bool UseNopBody;
-
- public string FeatureSwitchName;
-
- public RemovableFeatureAttribute(string featureSwitchName)
- {
- FeatureSwitchName = featureSwitchName;
- }
- }
-}
public static bool IsNetfx470OrNewer { get { throw null; } }
public static bool IsNetfx471OrNewer { get { throw null; } }
public static bool IsNetfx472OrNewer { get { throw null; } }
- public static bool IsNetNative { get { throw null; } }
public static bool IsNonZeroLowerBoundArraySupported { get { throw null; } }
public static bool IsNotArm64Process { get { throw null; } }
public static bool IsNotArmNorArm64Process { get { throw null; } }
public static bool IsNotInAppContainer { get { throw null; } }
public static bool IsNotIntMaxValueArrayIndexSupported { get { throw null; } }
public static bool IsNotMacOsHighSierraOrHigher { get { throw null; } }
- public static bool IsNotNetNative { get { throw null; } }
- public static bool IsNotNetNativeRunningAsConsoleApp { get { throw null; } }
public static bool IsNotOneCoreUAP { get { throw null; } }
public static bool IsNotOSX { get { throw null; } }
public static bool IsNotRedHatFamily { get { throw null; } }
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
IsFullFramework ?
netFxParamName : netCoreParamName;
- if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"))
- Assert.Equal(expectedParamName, exception.ParamName);
+ Assert.Equal(expectedParamName, exception.ParamName);
}
public static void Throws<T>(string netCoreParamName, string netFxParamName, Func<object> testCode)
IsFullFramework ?
netFxParamName : netCoreParamName;
- if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"))
- Assert.Equal(expectedParamName, exception.ParamName);
+ Assert.Equal(expectedParamName, exception.ParamName);
}
public static T Throws<T>(string paramName, Action action)
{
T exception = Assert.Throws<T>(action);
- if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"))
- Assert.Equal(paramName, exception.ParamName);
+ Assert.Equal(paramName, exception.ParamName);
return exception;
}
{
T exception = Assert.Throws<T>(testCode);
- if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"))
- Assert.Equal(paramName, exception.ParamName);
+ Assert.Equal(paramName, exception.ParamName);
return exception;
}
{
T exception = await Assert.ThrowsAsync<T>(testCode);
- if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"))
- Assert.Equal(paramName, exception.ParamName);
+ Assert.Equal(paramName, exception.ParamName);
return exception;
}
if (typeof(ArgumentException).IsAssignableFrom(typeof(TNetFxExceptionType)))
{
Exception exception = Assert.Throws(typeof(TNetFxExceptionType), action);
- if (!RuntimeInformation.FrameworkDescription.StartsWith(".NET Native"))
- {
- Assert.Equal(paramName, ((ArgumentException)exception).ParamName);
- }
+ Assert.Equal(paramName, ((ArgumentException)exception).ParamName);
}
else
{
//
public static bool HasWindowsShell => IsWindows && IsNotWindowsServerCore && IsNotWindowsNanoServer && IsNotWindowsIoTCore;
- public static bool IsUap => IsInAppContainer || IsNetNative;
+ public static bool IsUap => IsInAppContainer;
public static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
- public static bool IsNetNative => RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.OrdinalIgnoreCase);
public static bool IsNetCore => RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase);
public static bool IsMonoRuntime => Type.GetType("Mono.RuntimeStructs") != null;
public static bool IsOSX => RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool IsDomainJoinedMachine => !Environment.MachineName.Equals(Environment.UserDomainName, StringComparison.OrdinalIgnoreCase);
- public static bool IsNotNetNative => !IsNetNative;
-
// Windows - Schannel supports alpn from win8.1/2012 R2 and higher.
// Linux - OpenSsl supports alpn from openssl 1.0.2 and higher.
// OSX - SecureTransport doesn't expose alpn APIs. #30492
// OpenSSL 1.1.1 and above.
public static bool SupportsTls13 => !IsWindows && !IsOSX && (OpenSslVersion.CompareTo(new Version(1,1,1)) >= 0);
- // Officially, .NET Native only supports processes running in an AppContainer. However, the majority of tests still work fine
- // in a normal Win32 process and we often do so as running in an AppContainer imposes a substantial tax in debuggability
- // and investigatability. This predicate is used in ConditionalFacts to disable the specific tests that really need to be
- // running in AppContainer when running on .NetNative.
- public static bool IsNotNetNativeRunningAsConsoleApp => !(IsNetNative && !IsInAppContainer);
-
private static Lazy<bool> m_isWindowsSubsystemForLinux = new Lazy<bool>(GetIsWindowsSubsystemForLinux);
public static bool IsWindowsSubsystemForLinux => m_isWindowsSubsystemForLinux.Value;
private static volatile Tuple<bool> s_lazyNonZeroLowerBoundArraySupported;
- public static bool IsReflectionEmitSupported = !PlatformDetection.IsNetNative;
+ public static bool IsReflectionEmitSupported = true;
- // Tracked in: https://github.com/dotnet/corert/issues/3643 in case we change our mind about this.
- public static bool IsInvokingStaticConstructorsSupported => !PlatformDetection.IsNetNative;
+ public static bool IsInvokingStaticConstructorsSupported => true;
// System.Security.Cryptography.Xml.XmlDsigXsltTransform.GetOutput() relies on XslCompiledTransform which relies
// heavily on Reflection.Emit
</Compile>
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
- <ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Diagnostics.Tools" />
<Compile Include="UtilsTests.cs" />
<Compile Include="VBMathTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
<ItemGroup>
<Compile Include="Win32ExceptionTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="ImmutableSortedSetBuilderTest.nonnetstandard.cs" />
<Compile Include="ImmutableSortedDictionaryTest.nonnetstandard.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
</Compile>
<Compile Include="NameObjectCollectionBase\NameObjectCollectionBase.ConstructorTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Link>Common\System\Collections\IDictionary.NonGeneric.Tests.netcoreapp.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Reference Include="mscorlib" />
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicyTypeConverter.cs" />
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
- <ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Collections.Specialized" />
<PropertyGroup>
<ProjectGuid>{B7697463-7C98-4462-BA09-67B7BF3842B6}</ProjectGuid>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
- <BlockReflectionAttribute>false</BlockReflectionAttribute>
<Configurations>net461-Debug;net461-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Reference Include="System.Security.Cryptography.ProtectedData" />
<Reference Include="System.Security.Permissions" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
<Reference Include="mscorlib" />
<Reference Include="System" />
{
public class ConfigurationLockCollectionTest
{
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void InitialState()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Assert.Equal(col, col.SyncRoot);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void NonExistentItem()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Assert.Throws<ConfigurationErrorsException>(() => col.IsReadOnly("file"));
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void Populate()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Assert.True(col.Contains("file"), "A4");
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void Populate_Error()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Assert.Throws<ConfigurationErrorsException>(() => col.Add("boo"));
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void Enumerator()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Assert.False(e.MoveNext(), "A3");
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void SetFromList()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
Assert.True(col.Contains("file"), "A2");
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
[ActiveIssue("dotnet/corefx #18195", TargetFrameworkMonikers.NetFramework)]
public void DuplicateAdd()
{
Assert.Equal(1, app.LockAttributes.Count);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void IsReadOnly()
{
SysConfig cfg = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
public class ConfigurationManagerTest
{
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] // OpenExeConfiguration (ConfigurationUserLevel)
+ [Fact] // OpenExeConfiguration (ConfigurationUserLevel)
[ActiveIssue("dotnet/corefx #19384", TargetFrameworkMonikers.NetFramework)]
public void OpenExeConfiguration1_UserLevel_None()
{
Assert.Equal(TestUtil.ThisConfigFileName, fi.Name);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void OpenExeConfiguration1_UserLevel_PerUserRoaming()
{
string applicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Assert.Equal("user.config", fi.Name);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp),
- nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752
[ActiveIssue(15065, TestPlatforms.AnyUnix)]
public void OpenExeConfiguration1_UserLevel_PerUserRoamingAndLocal()
{
Assert.Equal(TestUtil.ThisApplicationPath + ".config", config.FilePath);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void exePath_UserLevelPerRoaming()
{
string applicationData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Assert.Equal("user.config", Path.GetFileName(filePath));
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp),
- nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29752
[ActiveIssue(15066, TestPlatforms.AnyUnix)]
public void exePath_UserLevelPerRoamingAndLocal()
{
Assert.Equal("machineconfig", fi.Name);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
// Doesn't pass on Mono
// [Category("NotWorking")]
[ActiveIssue("dotnet/corefx #19384", TargetFrameworkMonikers.NetFramework)]
Assert.Equal("machine.config", fi.Name);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void GetSectionReturnsNativeObject()
{
Assert.True(ConfigurationManager.GetSection("appSettings") is NameValueCollection);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))] // Test for bug #3412
+ [Fact] // Test for bug #3412
// Doesn't pass on Mono
// [Category("NotWorking")]
public void TestAddRemoveSection()
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void TestContext()
{
var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
{
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)),
- InlineData(true),
- InlineData(false)
- ]
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
[ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)]
public void Context_SimpleSettings_InNotNull(bool isSynchronized)
{
Assert.NotNull(settings.Context);
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)),
- InlineData(true),
- InlineData(false)
- ]
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
[ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)]
public void Providers_SimpleSettings_Empty(bool isSynchronized)
{
Assert.NotNull(settings.Providers[typeof(LocalFileSettingsProvider).Name]);
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)),
- InlineData(true),
- InlineData(false)
- ]
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
[ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)]
public void GetSetStringProperty_SimpleSettings_Ok(bool isSynchronized)
{
Assert.Equal("Foo", settings.StringProperty);
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp)),
- InlineData(true),
- InlineData(false)
- ]
+ [Theory]
+ [InlineData(true)]
+ [InlineData(false)]
[ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)]
public void GetSetIntProperty_SimpleSettings_Ok(bool isSynchronized)
{
Assert.Equal(DefaultIntPropertyValue, settings.IntProperty);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
[ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)]
public void Reload_SimpleSettings_Ok()
{
{
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
[ActiveIssue("dotnet/corefx #18832", TargetFrameworkMonikers.NetFramework)]
public void SettingsProperty_SettingsWithAttributes_Ok()
{
{
public class ImplicitMachineConfigTests
{
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void RuntimeAppSettingsAccessible()
{
var appSettings = ConfigurationManager.AppSettings;
};
[ActiveIssue(37364)]
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void GetPropertyValues_NotStoredProperty_ValueEqualsNull()
{
var property = new SettingsProperty("PropertyName");
}
[ActiveIssue(37364)]
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNativeRunningAsConsoleApp))]
+ [Fact]
public void GetPropertyValues_NotStoredConnectionStringProperty_ValueEqualsEmptyString()
{
var property = new SettingsProperty("PropertyName");
+++ /dev/null
-#Exposed publicly in only in uapaot implementation to enable reflection on this type
-TypesMustExist : Type 'System.Data.DataCommonEventSource' does not exist in the reference but it does exist in the implementation.
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Transactions.Local" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
<Reference Include="System.Xml.ReaderWriter" />
<Reference Include="System.Xml.XmlSerializer" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uapaot'">
- <ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap' or '$(TargetGroup)' == 'uapaot'">
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
namespace System.Data
{
[EventSource(Name = "System.Data.DataCommonEventSource")]
-#if uapaot
- public
-#else
- internal
-#endif
- class DataCommonEventSource : EventSource
+ internal class DataCommonEventSource : EventSource
{
internal static readonly DataCommonEventSource Log = new DataCommonEventSource();
private static long s_nextScopeId = 0;
-#if uapaot
- public
-#else
- private
-#endif
- const int TraceEventId = 1;
-
-#if uapaot
- public
-#else
- private
-#endif
- const int EnterScopeId = 2;
-
-#if uapaot
- public
-#else
- private
-#endif
- const int ExitScopeId = 3;
+ private const int TraceEventId = 1;
+
+ private const int EnterScopeId = 2;
+
+ private const int ExitScopeId = 3;
[Event(TraceEventId, Level = EventLevel.Informational)]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace(string message)
+ internal void Trace(string message)
{
WriteEvent(TraceEventId, message);
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0>(string format, T0 arg0)
+ internal void Trace<T0>(string format, T0 arg0)
{
if (!Log.IsEnabled()) return;
Trace(string.Format(format, arg0));
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0, T1>(string format, T0 arg0, T1 arg1)
+ internal void Trace<T0, T1>(string format, T0 arg0, T1 arg1)
{
if (!Log.IsEnabled()) return;
Trace(string.Format(format, arg0, arg1));
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0, T1, T2>(string format, T0 arg0, T1 arg1, T2 arg2)
+ internal void Trace<T0, T1, T2>(string format, T0 arg0, T1 arg1, T2 arg2)
{
if (!Log.IsEnabled()) return;
Trace(string.Format(format, arg0, arg1, arg2));
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0, T1, T2, T3>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
+ internal void Trace<T0, T1, T2, T3>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
{
if (!Log.IsEnabled()) return;
Trace(string.Format(format, arg0, arg1, arg2, arg3));
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0, T1, T2, T3, T4>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
+ internal void Trace<T0, T1, T2, T3, T4>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
{
if (!Log.IsEnabled()) return;
Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4));
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0, T1, T2, T3, T4, T5, T6>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
+ internal void Trace<T0, T1, T2, T3, T4, T5, T6>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
{
if (!Log.IsEnabled()) return;
Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4, arg5, arg6));
}
[Event(EnterScopeId, Level = EventLevel.Verbose)]
-#if uapaot
- public
-#else
- internal
-#endif
- long EnterScope(string message)
+ internal long EnterScope(string message)
{
long scopeId = 0;
if (Log.IsEnabled())
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- long EnterScope<T1>(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0;
+ internal long EnterScope<T1>(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0;
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- long EnterScope<T1, T2>(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0;
+ internal long EnterScope<T1, T2>(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0;
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- long EnterScope<T1, T2, T3>(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0;
+ internal long EnterScope<T1, T2, T3>(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0;
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- long EnterScope<T1, T2, T3, T4>(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0;
+ internal long EnterScope<T1, T2, T3, T4>(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0;
[Event(ExitScopeId, Level = EventLevel.Verbose)]
-#if uapaot
- public
-#else
- internal
-#endif
- void ExitScope(long scopeId)
+ internal void ExitScope(long scopeId)
{
WriteEvent(ExitScopeId, scopeId);
}
private static readonly Func<Stream, XmlReaderSettings, XmlParserContext, XmlReader> s_sqlReaderDelegate = CreateSqlReaderDelegate();
private static readonly XmlReaderSettings s_defaultXmlReaderSettings = new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Fragment };
private static readonly XmlReaderSettings s_defaultXmlReaderSettingsCloseInput = new XmlReaderSettings() { ConformanceLevel = ConformanceLevel.Fragment, CloseInput = true };
-#if !uapaot
private static MethodInfo s_createSqlReaderMethodInfo;
private MethodInfo _createSqlReaderMethodInfo;
-#endif
private bool _fNotNull; // false if null, the default ctor (plain 0) will make it Null
private Stream _stream;
stream.Seek(0, SeekOrigin.Begin);
}
-#if !uapaot
// NOTE: Maintaining createSqlReaderMethodInfo private field member to preserve the serialization of the class
if (_createSqlReaderMethodInfo == null)
{
_createSqlReaderMethodInfo = CreateSqlReaderMethodInfo;
}
Debug.Assert(_createSqlReaderMethodInfo != null, "MethodInfo reference for XmlReader.CreateSqlReader should not be null.");
-#endif
XmlReader r = CreateSqlXmlReader(stream);
_firstCreateReader = false;
}
}
-#if uapaot
- private static Func<Stream, XmlReaderSettings, XmlParserContext, XmlReader> CreateSqlReaderDelegate() => System.Xml.XmlReader.CreateSqlReader;
-#else
private static Func<Stream, XmlReaderSettings, XmlParserContext, XmlReader> CreateSqlReaderDelegate()
{
Debug.Assert(CreateSqlReaderMethodInfo != null, "MethodInfo reference for XmlReader.CreateSqlReader should not be null.");
return s_createSqlReaderMethodInfo;
}
}
-#endif
// INullable
public bool IsNull
<Compile Include="System\Data\Common\DbProviderFactoriesTests.netcoreapp.cs" />
<Compile Include="System\Xml\XmlDataDocumentTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
namespace System.Data
{
[EventSource(Name = "System.Data.DataCommonEventSource")]
-#if uapaot
- public
-#else
- internal
-#endif
- class DataCommonEventSource : EventSource
+ internal class DataCommonEventSource : EventSource
{
internal static readonly DataCommonEventSource Log = new DataCommonEventSource();
-#if uapaot
- public
-#else
- private
-#endif
- const int TraceEventId = 1;
+ private const int TraceEventId = 1;
[Event(TraceEventId, Level = EventLevel.Informational)]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace(string message)
+ internal void Trace(string message)
{
WriteEvent(TraceEventId, message);
}
[NonEvent]
-#if uapaot
- public
-#else
- internal
-#endif
- void Trace<T0>(string format, T0 arg0)
+ internal void Trace<T0>(string format, T0 arg0)
{
if (!Log.IsEnabled())
return;
Trace(string.Format(format, arg0));
}
-
-#if uapaot
- private static long s_nextScopeId = 0;
- public const int EnterScopeId = 2;
- public const int ExitScopeId = 3;
-
- [NonEvent]
- public void Trace<T0, T1>(string format, T0 arg0, T1 arg1)
- {
- if (!Log.IsEnabled())
- return;
- Trace(string.Format(format, arg0, arg1));
- }
-
- [NonEvent]
- public void Trace<T0, T1, T2>(string format, T0 arg0, T1 arg1, T2 arg2)
- {
- if (!Log.IsEnabled())
- return;
- Trace(string.Format(format, arg0, arg1, arg2));
- }
-
- [NonEvent]
- public void Trace<T0, T1, T2, T3>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
- {
- if (!Log.IsEnabled())
- return;
- Trace(string.Format(format, arg0, arg1, arg2, arg3));
- }
-
- [NonEvent]
- public void Trace<T0, T1, T2, T3, T4>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
- {
- if (!Log.IsEnabled())
- return;
- Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4));
- }
-
- [NonEvent]
- public void Trace<T0, T1, T2, T3, T4, T5, T6>(string format, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
- {
- if (!Log.IsEnabled())
- return;
- Trace(string.Format(format, arg0, arg1, arg2, arg3, arg4, arg5, arg6));
- }
-
- [Event(EnterScopeId, Level = EventLevel.Verbose)]
- public long EnterScope(string message)
- {
- long scopeId = 0;
- if (Log.IsEnabled())
- {
- scopeId = Interlocked.Increment(ref s_nextScopeId);
- WriteEvent(EnterScopeId, scopeId, message);
- }
- return scopeId;
- }
-
- [NonEvent]
- public long EnterScope<T1>(string format, T1 arg1) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1)) : 0;
-
- [NonEvent]
- public long EnterScope<T1, T2>(string format, T1 arg1, T2 arg2) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2)) : 0;
-
- [NonEvent]
- public long EnterScope<T1, T2, T3>(string format, T1 arg1, T2 arg2, T3 arg3) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3)) : 0;
-
- [NonEvent]
- public long EnterScope<T1, T2, T3, T4>(string format, T1 arg1, T2 arg2, T3 arg3, T4 arg4) => Log.IsEnabled() ? EnterScope(string.Format(format, arg1, arg2, arg3, arg4)) : 0;
-
- [Event(ExitScopeId, Level = EventLevel.Verbose)]
- public void ExitScope(long scopeId)
- {
- WriteEvent(ExitScopeId, scopeId);
- }
-#endif
}
}
to work with older NuGet clients -->
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8+wpa81</PackageTargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BlockReflectionAttribute>false</BlockReflectionAttribute>
<CLSCompliant>false</CLSCompliant>
<Configurations>net45-Debug;net45-Release;net46-Debug;net46-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<Compile Include="ProcessStreamReadTests.netcoreapp.cs" />
<Compile Include="ProcessTests.netcoreapp.cs" />
</ItemGroup>
- <!-- WINDOWS: Shared CoreCLR and .NET Native -->
+ <!-- WINDOWS: Shared CoreCLR -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="ProcessTests.Windows.cs" />
<Compile Include="ProcessThreadTests.Windows.cs" />
<NoWarn>$(NoWarn);1685</NoWarn>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
- <!-- Default configurations to help VS understand the options -->
<ItemGroup>
+ <Compile Include="System\Diagnostics\StackFrameExtensions.cs" />
+ <Compile Include="System\Diagnostics\StackTraceSymbols.cs" />
<Compile Include="System\Diagnostics\SymbolStore\ISymbolBinder.cs" />
<Compile Include="System\Diagnostics\SymbolStore\ISymbolDocument.cs" />
<Compile Include="System\Diagnostics\SymbolStore\ISymbolMethod.cs" />
<Compile Include="System\Diagnostics\SymbolStore\SymLanguageType.cs" />
<Compile Include="System\Diagnostics\SymbolStore\SymLanguageVendor.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
- <Compile Include="System\Diagnostics\StackTraceSymbols.CoreCLR.cs" />
+ <ItemGroup>
<ProjectReference Include="..\..\System.Collections.Concurrent\src\System.Collections.Concurrent.csproj" />
<ProjectReference Include="..\..\System.Diagnostics.Debug\src\System.Diagnostics.Debug.csproj" />
<ProjectReference Include="..\..\System.IO\src\System.IO.csproj" />
<ProjectReference Include="..\..\System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
<ProjectReference Include="..\..\System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAOT)'!='true'">
- <Compile Include="System\Diagnostics\StackFrameExtensions.cs" />
- </ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="Microsoft.Diagnostics.Tracing.TraceEvent" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="Common.cs" />
<Compile Include="ErrorVerifier.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Compile Include="ISOWeek\ISOWeekTests.netcoreapp.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<EmbeddedResource Include="Normalization\Data\win7.txt">
<LogicalName>NormalizationDataWin7</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <UWPCompatible Condition="'$(TargetGroup)' == 'uap' or '$(TargetGroup)' == 'uapaot'">true</UWPCompatible>
+ <UWPCompatible Condition="'$(TargetGroup)' == 'uap'">true</UWPCompatible>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetsUnix)' == 'true'">
<Reference Include="mscorlib" />
<Reference Include="Windows" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="TextWriter\TextWriterTests.cs" />
<Compile Include="TextWriter\TextWriterTests.netcoreapp.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<ProjectGuid>{AEF718E9-D4FC-418F-A7AE-ED6B2C7B3787}</ProjectGuid>
<AssemblyName>System.Linq.Expressions</AssemblyName>
<RootNamespace>System.Linq.Expressions</RootNamespace>
- <IsInterpreting Condition="'$(TargetsAOT)'=='true'">true</IsInterpreting>
- <!-- These defines are disabled on Aot due to https://github.com/dotnet/corefx/issues/29745 -->
- <DefineConstants Condition="'$(TargetsAOT)'!='true'"> $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE</DefineConstants>
+ <IsInterpreting>false</IsInterpreting>
+ <DefineConstants> $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE</DefineConstants>
<DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
<DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetsAOT)'=='true'">
- <DefineConstants>$(DefineConstants);FEATURE_DYNAMIC_DELEGATE</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition="'$(TargetsAOT)'=='true'">
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<ProjectReference Include="..\..\System.Diagnostics.Tools\src\System.Diagnostics.Tools.csproj" />
<Link>Common\System\Linq\SkipTakeData.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="ToLookupTests.DebuggerAttributes.cs" />
<Compile Include="EnumerableDebugViewTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-Compat issues with assembly System.Memory:
-CannotRemoveBaseTypeOrInterface : Type 'System.Memory<T>' does not implement interface 'System.IEquatable<System.Memory<T>>' in the implementation but it does in the contract.
-CannotRemoveBaseTypeOrInterface : Type 'System.ReadOnlyMemory<T>' does not implement interface 'System.IEquatable<System.ReadOnlyMemory<T>>' in the implementation but it does in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Memory<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlyMemory<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Memory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Memory<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlyMemory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlyMemory<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlySpan<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Span<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Span<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Memory<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlyMemory<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Memory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Memory<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlyMemory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlyMemory<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlySpan<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Span<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Span<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Memory<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlyMemory<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Memory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Memory<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlyMemory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlyMemory<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlySpan<T>, T)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Span<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Span<T>, T)' does not exist in the implementation but it does exist in the contract.
-Total issues: 35
<Link>Common\System\MutableDecimal.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Link>Common\System\Threading\Tasks\TaskTimeoutExtensions.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\System.Net.HttpListener.Tests.rd.xml" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetsOSX)'=='true'">
<TestCommandLines Include="ulimit -n 7000" />
</ItemGroup>
<Link>Interop\Unix\System.Native\Interop.SocketAddress.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' == 'uap'">
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<ItemGroup>
<Reference Include="System.Memory" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
</Compile>
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
- <!-- Windows: CoreCLR and .NET Native -->
+ <!-- Windows: CoreCLR -->
<Compile Include="System\Net\Sockets\AcceptOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\BaseOverlappedAsyncResult.Windows.cs" />
<Compile Include="System\Net\Sockets\ConnectOverlappedAsyncResult.Windows.cs" />
<Link>Common\System\Net\Logging\NetEventSource.Common.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
<DebugSymbols>true</DebugSymbols>
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);FEATURE_SERIALIZATION</DefineConstants>
- <DefineConstants Condition="'$(TargetsAOT)'=='true'">$(DefineConstants);uapaot</DefineConstants>
- <!-- We do not want to block reflection for this assembly -->
- <BlockReflectionAttribute Condition="'$(TargetsAOT)'=='true'">false</BlockReflectionAttribute>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<Compile Include="$(CommonPath)\System\NotImplemented.cs">
<Link>Common\System\NotImplemented.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\System\Runtime\CompilerServices\RemovableFeatureAttribute.cs">
- <Link>System\Runtime\CompilerServices\RemovableFeatureAttribute</Link>
- </Compile>
<Compile Include="$(RuntimeSerializationSources)\Attributes.cs" />
<Compile Include="$(RuntimeSerializationSources)\CodeGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\ClassDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\Globals.cs" />
<Compile Include="$(RuntimeSerializationSources)\GenericParameterDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\HybridObjectCache.cs" />
- <Compile Include="$(RuntimeSerializationSources)\InvalidDataContract.cs" Condition="'$(TargetsAOT)'=='true'" />
<Compile Include="$(RuntimeSerializationSources)\ObjectToIdCache.cs" />
<Compile Include="$(RuntimeSerializationSources)\ObjectReferenceStack.cs" />
<Compile Include="$(RuntimeSerializationSources)\PrimitiveDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\KnownTypeDataContractResolver.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerReadContextComplex.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerWriteContextComplex.cs" />
- <Compile Include="$(RuntimeSerializationSources)\BitFlagsGenerator.cs" Condition="'$(TargetsAOT)'!='true'" />
+ <Compile Include="$(RuntimeSerializationSources)\BitFlagsGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSurrogateCaller.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSerializerExtensions.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlSerializableServices.cs" />
<Compile Include="$(JsonSources)\IXmlJsonWriterInitializer.cs" />
<Compile Include="$(JsonSources)\ByteArrayHelperWithString.cs" />
<Compile Include="$(JsonSources)\JsonEncodingStreamWrapper.cs" />
- <Compile Include="$(JsonSources)\JsonFormatGeneratorStatics.cs" Condition="'$(TargetsAOT)'!='true'" />
+ <Compile Include="$(JsonSources)\JsonFormatGeneratorStatics.cs" />
<Compile Include="System\Runtime\Serialization\AccessorBuilder.cs" />
<Compile Include="$(CommonPath)\System\CodeDom\CodeTypeReference.cs" />
<Compile Include="$(CommonPath)\System\CodeDom\CodeTypeReferenceCollection.cs" />
<Compile Include="System\Xml\XmlCanonicalWriter.cs" />
<Compile Include="System\Xml\XmlSigningNodeWriter.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAOT)'=='true'">
- <EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
<ItemGroup>
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Concurrent" />
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, DataContract>;
using System.Linq;
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public sealed class ClassDataContract : DataContract
#else
internal sealed class ClassDataContract : DataContract
private bool _isScriptObject;
-#if uapaot
- public ClassDataContract() : base(new ClassDataContractCriticalHelper())
- {
- InitClassDataContract();
- }
-#endif
-
internal ClassDataContract(Type type) : base(new ClassDataContractCriticalHelper(type))
{
InitClassDataContract();
get { return _helper.ExtensionDataSetMethod; }
}
-#if !uapaot
public override DataContractDictionary KnownDataContracts
{
get
{ return _helper.KnownDataContracts; }
}
-#endif
public override bool IsISerializable
{
{ return _helper.IsNonAttributedType; }
}
-#if uapaot
- public bool HasDataContract
- {
- get
- { return _helper.HasDataContract; }
- set { _helper.HasDataContract = value; }
- }
-#endif
public bool HasExtensionData
{
get
return true;
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatClassWriterDelegate CreateXmlFormatWriterDelegate()
{
return new XmlFormatWriterGenerator().GenerateClassWriter(this);
}
-#if uapaot
- private XmlFormatClassWriterDelegate _xmlFormatWriterDelegate;
- public XmlFormatClassWriterDelegate XmlFormatWriterDelegate
-#else
internal XmlFormatClassWriterDelegate XmlFormatWriterDelegate
-#endif
{
get
{
-#if uapaot
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly
- || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatWriterDelegate != null))
- {
- return _xmlFormatWriterDelegate;
- }
-#endif
if (_helper.XmlFormatWriterDelegate == null)
{
lock (this)
}
set
{
-#if uapaot
- _xmlFormatWriterDelegate = value;
-#endif
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatClassReaderDelegate CreateXmlFormatReaderDelegate()
{
return new XmlFormatReaderGenerator().GenerateClassReader(this);
}
-#if uapaot
- private XmlFormatClassReaderDelegate _xmlFormatReaderDelegate;
- public XmlFormatClassReaderDelegate XmlFormatReaderDelegate
-#else
internal XmlFormatClassReaderDelegate XmlFormatReaderDelegate
-#endif
{
get
{
-#if uapaot
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly
- || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatReaderDelegate != null))
- {
- return _xmlFormatReaderDelegate;
- }
-#endif
if (_helper.XmlFormatReaderDelegate == null)
{
lock (this)
}
set
{
-#if uapaot
- _xmlFormatReaderDelegate = value;
-#endif
}
}
//
// We wanted to enable the fix for the issue described above only when SG generated DataContracts are available.
// Currently we don't have a good way of detecting usage of SG (either globally or per data contract).
- // But since SG is currently only used by .NET Native, so we used the "#if uapaot" to target the fix for .Net
- // Native only.
-#if uapaot
- DataContract baseContract = DataContract.GetDataContractCreatedAtRuntime(baseType);
-#else
+
DataContract baseContract = DataContract.GetDataContract(baseType);
-#endif
if (baseContract is CollectionDataContract)
+ {
this.BaseContract = ((CollectionDataContract)baseContract).SharedTypeContract as ClassDataContract;
+ }
else
+ {
this.BaseContract = baseContract as ClassDataContract;
+ }
+
if (this.BaseContract != null && this.BaseContract.IsNonAttributedType && !_isNonAttributedType)
{
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError
internal bool HasDataContract
{
get { return _hasDataContract; }
-#if uapaot
- set { _hasDataContract = value; }
-#endif
}
internal bool HasExtensionData
internal static DataMemberComparer Singleton = new DataMemberComparer();
}
-#if !uapaot
/// <summary>
/// Get object type for Xml/JsonFormmatReaderGenerator
/// </summary>
return type;
}
}
-#endif
-
internal ClassDataContract Clone()
{
using System.Security;
using System.Diagnostics;
-#if !uapaot
namespace System.Runtime.Serialization
{
internal class CodeGenerator
}
}
-#if !uapaot
private static MethodInfo s_objectToString;
private static MethodInfo ObjectToString
{
return s_stringFormat;
}
}
-#endif
private Type _delegateType;
private enum CodeGenTrace { None, Save, Tron };
private CodeGenTrace _codeGenTrace;
-
-#if !uapaot
private LocalBuilder _stringFormatArray;
-#endif
internal CodeGenerator()
{
If(Cmp.NotEqualTo);
}
-#if !uapaot
internal void BeginWhileCondition()
{
Label startWhile = DefineLabel();
Call(ObjectToString);
}
}
-#endif
}
-
internal class ArgBuilder
{
internal int Index;
}
}
}
-}
-#endif
+}
\ No newline at end of file
}
}
-#if uapaot
- public enum CollectionKind : byte
-#else
internal enum CollectionKind : byte
-#endif
{
None,
GenericDictionary,
Array,
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public sealed class CollectionDataContract : DataContract
#else
internal sealed class CollectionDataContract : DataContract
{ return _helper.InvalidCollectionInSharedContractMessage; }
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatCollectionWriterDelegate CreateXmlFormatWriterDelegate()
{
return new XmlFormatWriterGenerator().GenerateCollectionWriter(this);
}
-#if uapaot
- private XmlFormatCollectionWriterDelegate _xmlFormatWriterDelegate;
- public XmlFormatCollectionWriterDelegate XmlFormatWriterDelegate
-#else
internal XmlFormatCollectionWriterDelegate XmlFormatWriterDelegate
-#endif
{
get
{
-#if uapaot
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly
- || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatWriterDelegate != null))
- {
- return _xmlFormatWriterDelegate;
- }
-#endif
if (_helper.XmlFormatWriterDelegate == null)
{
lock (this)
}
set
{
-#if uapaot
- _xmlFormatWriterDelegate = value;
-#endif
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatCollectionReaderDelegate CreateXmlFormatReaderDelegate()
{
return new XmlFormatReaderGenerator().GenerateCollectionReader(this);
}
-#if uapaot
- private XmlFormatCollectionReaderDelegate _xmlFormatReaderDelegate;
- public XmlFormatCollectionReaderDelegate XmlFormatReaderDelegate
-#else
internal XmlFormatCollectionReaderDelegate XmlFormatReaderDelegate
-#endif
{
get
{
-#if uapaot
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly
- || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatReaderDelegate != null))
- {
- return _xmlFormatReaderDelegate;
- }
-#endif
if (_helper.XmlFormatReaderDelegate == null)
{
lock (this)
}
set
{
-#if uapaot
- _xmlFormatReaderDelegate = value;
-#endif
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatGetOnlyCollectionReaderDelegate CreateXmlFormatGetOnlyCollectionReaderDelegate()
{
return new XmlFormatReaderGenerator().GenerateGetOnlyCollectionReader(this);
}
-#if uapaot
- private XmlFormatGetOnlyCollectionReaderDelegate _xmlFormatGetOnlyCollectionReaderDelegate;
- public XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate
-#else
internal XmlFormatGetOnlyCollectionReaderDelegate XmlFormatGetOnlyCollectionReaderDelegate
-#endif
{
get
{
-#if uapaot
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly
- || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _xmlFormatGetOnlyCollectionReaderDelegate != null))
- {
- return _xmlFormatGetOnlyCollectionReaderDelegate;
- }
-#endif
if (_helper.XmlFormatGetOnlyCollectionReaderDelegate == null)
{
lock (this)
}
set
{
-#if uapaot
- _xmlFormatGetOnlyCollectionReaderDelegate = value;
-#endif
}
}
{
// IsGetOnlyCollection value has already been used to create current collectiondatacontract, value can now be reset.
context.IsGetOnlyCollection = false;
-#if uapaot
- if (XmlFormatGetOnlyCollectionReaderDelegate == null)
- {
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, UnderlyingType));
- }
-#endif
XmlFormatGetOnlyCollectionReaderDelegate(xmlReader, context, CollectionItemName, Namespace, this);
}
else
using Xml.Schema;
using System.Collections.Concurrent;
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public abstract class DataContract
#else
internal abstract class DataContract
internal static DataContract GetDataContractFromGeneratedAssembly(Type type)
{
-#if uapaot
- if (DataContractSerializer.Option == SerializationOption.ReflectionOnly)
- {
- return null;
- }
-
- type = GetDataContractAdapterTypeForGeneratedAssembly(type);
- DataContract dataContract = GetGeneratedDataContract(type);
- if (dataContract == null)
- {
- if (type.IsInterface && !CollectionDataContract.IsCollectionInterface(type))
- {
- type = Globals.TypeOfObject;
- dataContract = GetGeneratedDataContract(type);
- }
- if (dataContract == null)
- {
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly)
- {
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, type));
- }
- }
- }
-
- if (dataContract is InvalidDataContract && DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- return null;
- }
-
- return dataContract;
-#else
return null;
-#endif
- }
-
-#if uapaot
- // This method returns adapter types used to get DataContract from
- // generated assembly.
- private static Type GetDataContractAdapterTypeForGeneratedAssembly(Type type)
- {
- if (type == Globals.TypeOfDateTimeOffset)
- {
- return Globals.TypeOfDateTimeOffsetAdapter;
- }
-
- return type;
}
-#endif
internal MethodInfo ParseMethod
{
{
return DataContractCriticalHelper.GetDataContractSkipValidation(id, typeHandle, type);
}
-#if uapaot
- internal static DataContract GetDataContractCreatedAtRuntime(Type type, SerializationMode mode = SerializationMode.SharedContract)
- {
- DataContract dataContract = DataContractCriticalHelper.GetDataContractCreatedAtRuntime(type);
- return dataContract.GetValidContract(mode);
- }
-#endif
internal static DataContract GetGetOnlyCollectionDataContract(int id, RuntimeTypeHandle typeHandle, Type type, SerializationMode mode)
{
DataContractCriticalHelper.ThrowInvalidDataContractException(message, type);
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
internal DataContractCriticalHelper Helper
#else
protected DataContractCriticalHelper Helper
{ return _helper.TypeForInitialization; }
}
-#if uapaot
- /// <summary>
- /// Invoked once immediately before attempting to read, permitting additional setup or verification
- /// </summary>
- /// <param name="xmlReader">The reader from which the next read will occur.</param>
- public virtual void PrepareToRead(XmlReaderDelegator xmlReader)
- {
- // Base class does no work. Intended for derived types to execute before serializer attempts to read.
- }
-#endif
-
public virtual void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
{
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(this.GetType()), DataContract.GetClrTypeFullName(UnderlyingType))));
get { return false; }
}
-#if uapaot
- public bool TypeIsInterface;
- public bool TypeIsCollectionInterface;
- public Type GenericTypeDefinition;
-#endif
-
internal virtual void WriteRootElement(XmlWriterDelegator writer, XmlDictionaryString name, XmlDictionaryString ns)
{
if (object.ReferenceEquals(ns, DictionaryGlobals.SerializationNamespace) && !IsPrimitive)
{
private static Dictionary<TypeHandleRef, IntRef> s_typeToIDCache = new Dictionary<TypeHandleRef, IntRef>(new TypeHandleRefEqualityComparer());
private static DataContract[] s_dataContractCache = new DataContract[32];
-#if uapaot
- private static ConcurrentDictionary<Type, DataContract> s_dataContractCacheCreatedAtRuntime = new ConcurrentDictionary<Type, DataContract>();
-#endif
private static int s_dataContractID;
private static Dictionary<Type, DataContract> s_typeToBuiltInContract;
private static Dictionary<XmlQualifiedName, DataContract> s_nameToBuiltInContract;
internal static DataContract GetDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type)
{
-#if uapaot
- // The generated serialization assembly uses different ids than the running code.
- // We should have 'dataContractCache' from 'Type' to 'DataContract', since ids are not used at runtime.
- id = GetId(typeHandle);
-#endif
-
DataContract dataContract = s_dataContractCache[id];
if (dataContract == null)
{
return dataContract;
}
-#if uapaot
- internal static DataContract GetDataContractCreatedAtRuntime(Type type)
- {
- if (type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
-
- DataContract dataContract = s_dataContractCacheCreatedAtRuntime.GetOrAdd(type, (t) =>
- {
- return CreateDataContract(t);
- });
-
- return dataContract.GetValidContract();
- }
-#endif
-
internal static DataContract GetGetOnlyCollectionDataContractSkipValidation(int id, RuntimeTypeHandle typeHandle, Type type)
{
-#if uapaot
- // The generated serialization assembly uses different ids than the running code.
- // We should have 'dataContractCache' from 'Type' to 'DataContract', since ids are not used at runtime.
- id = GetId(typeHandle);
-#endif
-
DataContract dataContract = s_dataContractCache[id];
if (dataContract == null)
{
internal virtual DataContractDictionary KnownDataContracts
{
-#if uapaot
- get; set;
-#else
get { return null; }
set { /* do nothing */ }
-#endif
}
internal virtual bool IsISerializable
return false;
}
-#if !uapaot
internal static string SanitizeTypeName(string typeName)
{
return typeName.Replace('.', '_');
}
-#endif
}
internal interface IGenericNameProvider
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name, UseNopBody = true)]
-#endif
private static bool IsReflectionBackupAllowed()
{
- // The RemovableFeature annotation above is going to replace this with
- // "return false" if reflection based serialization feature was removed
- // at publishing time.
return true;
}
Initialize(type, rootName, rootNamespace, knownTypes, int.MaxValue, false, false, null, false);
}
-#if uapaot
- public DataContractSerializer(Type type, IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences)
-#else
internal DataContractSerializer(Type type, IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences)
-#endif
{
Initialize(type, knownTypes, maxItemsInObjectGraph, ignoreExtensionDataObject, preserveObjectReferences, null, false);
}
if (dataContractResolver == null)
dataContractResolver = this.DataContractResolver;
-#if uapaot
- // Give the root contract a chance to initialize or pre-verify the read
- RootContract.PrepareToRead(xmlReader);
-#endif
if (verifyObjectName)
{
if (!InternalIsStartObject(xmlReader))
namespace System.Runtime.Serialization
{
-#if uapaot
- public class DataMember
-#else
internal class DataMember
-#endif
{
private CriticalHelper _helper;
namespace System.Runtime.Serialization
{
-#if uapaot
- public sealed class EnumDataContract : DataContract
-#else
internal sealed class EnumDataContract : DataContract
-#endif
{
private EnumDataContractCriticalHelper _helper;
{
private IList<ExtensionDataMember> _members;
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public ExtensionDataObject()
#else
internal ExtensionDataObject()
{
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public IList<ExtensionDataMember> Members
#else
internal IList<ExtensionDataMember> Members
}
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class ExtensionDataMember
#else
internal class ExtensionDataMember
}
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public interface IDataNode
#else
internal interface IDataNode
}
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class AttributeData
#else
internal class AttributeData
public string value;
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class ElementData
#else
internal class ElementData
private static Type s_typeOfXmlDataNode;
internal static Type TypeOfXmlDataNode => s_typeOfXmlDataNode ?? (s_typeOfXmlDataNode = typeof(XmlDataNode));
-#if uapaot
- private static Type s_typeOfSafeSerializationManager;
- private static bool s_typeOfSafeSerializationManagerSet;
- internal static Type TypeOfSafeSerializationManager
- {
- get
- {
- if (!s_typeOfSafeSerializationManagerSet)
- {
- s_typeOfSafeSerializationManager = TypeOfInt.Assembly.GetType("System.Runtime.Serialization.SafeSerializationManager");
- s_typeOfSafeSerializationManagerSet = true;
- }
- return s_typeOfSafeSerializationManager;
- }
- }
-#endif
-
private static Type s_typeOfNullable;
internal static Type TypeOfNullable
{
_helper = base.Helper as JsonClassDataContractCriticalHelper;
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private JsonFormatClassReaderDelegate CreateJsonFormatReaderDelegate()
{
return new ReflectionJsonClassReader(TraditionalClassDataContract).ReflectionReadClass;
{
tempDelegate = CreateJsonFormatReaderDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract)?.ClassReaderDelegate;
- tempDelegate = tempDelegate ?? CreateJsonFormatReaderDelegate();
-
- if (tempDelegate == null)
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalClassDataContract.UnderlyingType));
- }
-#endif
else
{
-#if uapaot
- tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract).ClassReaderDelegate;
-#else
tempDelegate = new JsonFormatReaderGenerator().GenerateClassReader(TraditionalClassDataContract);
-#endif
}
Interlocked.MemoryBarrier();
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private JsonFormatClassWriterDelegate CreateJsonFormatWriterDelegate()
{
return new ReflectionJsonFormatWriter().ReflectionWriteClass;
{
tempDelegate = CreateJsonFormatWriterDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract)?.ClassWriterDelegate;
- tempDelegate = tempDelegate ?? CreateJsonFormatWriterDelegate();
-
- if (tempDelegate == null)
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalClassDataContract.UnderlyingType));
- }
-#endif
else
{
-#if uapaot
- tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalClassDataContract).ClassWriterDelegate;
-#else
tempDelegate = new JsonFormatWriterGenerator().GenerateClassWriter(TraditionalClassDataContract);
-#endif
}
Interlocked.MemoryBarrier();
_helper = base.Helper as JsonCollectionDataContractCriticalHelper;
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private JsonFormatCollectionReaderDelegate CreateJsonFormatReaderDelegate()
{
return new ReflectionJsonCollectionReader().ReflectionReadCollection;
{
tempDelegate = CreateJsonFormatReaderDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract)?.CollectionReaderDelegate;
- tempDelegate = tempDelegate ?? CreateJsonFormatReaderDelegate();
-
- if (tempDelegate == null)
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalCollectionDataContract.UnderlyingType));
- }
-#endif
else
{
-#if uapaot
- tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract).CollectionReaderDelegate;
-#else
tempDelegate = new JsonFormatReaderGenerator().GenerateCollectionReader(TraditionalCollectionDataContract);
-#endif
}
Interlocked.MemoryBarrier();
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private JsonFormatGetOnlyCollectionReaderDelegate CreateJsonFormatGetOnlyReaderDelegate()
{
return new ReflectionJsonCollectionReader().ReflectionReadGetOnlyCollection;
{
tempDelegate = CreateJsonFormatGetOnlyReaderDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract)?.GetOnlyCollectionReaderDelegate;
- tempDelegate = tempDelegate ?? CreateJsonFormatGetOnlyReaderDelegate();
-
- if (tempDelegate == null)
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalCollectionDataContract.UnderlyingType));
- }
-#endif
else
{
-#if uapaot
- tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract).GetOnlyCollectionReaderDelegate;
-#else
tempDelegate = new JsonFormatReaderGenerator().GenerateGetOnlyCollectionReader(TraditionalCollectionDataContract);
-#endif
}
Interlocked.MemoryBarrier();
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private JsonFormatCollectionWriterDelegate CreateJsonFormatWriterDelegate()
{
return new ReflectionJsonFormatWriter().ReflectionWriteCollection;
{
tempDelegate = CreateJsonFormatWriterDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- tempDelegate = JsonDataContract.TryGetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract)?.CollectionWriterDelegate;
- tempDelegate = tempDelegate ?? CreateJsonFormatWriterDelegate();
-
- if (tempDelegate == null)
- throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, TraditionalCollectionDataContract.UnderlyingType));
- }
-#endif
else
{
-#if uapaot
- tempDelegate = JsonDataContract.GetReadWriteDelegatesFromGeneratedAssembly(TraditionalCollectionDataContract).CollectionWriterDelegate;
-#else
tempDelegate = new JsonFormatWriterGenerator().GenerateCollectionWriter(TraditionalCollectionDataContract);
-#endif
}
Interlocked.MemoryBarrier();
// with the restructuring for multi-file, this is no longer true - instead
// this has become a normal method
JsonReadWriteDelegates result;
-#if uapaot
- // The c passed in could be a clone which is different from the original key,
- // We'll need to get the original key data contract from generated assembly.
- DataContract keyDc = (c?.UnderlyingType != null) ?
- DataContract.GetDataContractFromGeneratedAssembly(c.UnderlyingType)
- : null;
- return (keyDc != null && JsonReadWriteDelegates.GetJsonDelegates().TryGetValue(keyDc, out result)) ? result : null;
-#else
return JsonReadWriteDelegates.GetJsonDelegates().TryGetValue(c, out result) ? result : null;
-#endif
}
internal static JsonReadWriteDelegates GetReadWriteDelegatesFromGeneratedAssembly(DataContract c)
}
}
-#if uapaot
- public class JsonReadWriteDelegates
-#else
internal class JsonReadWriteDelegates
-#endif
{
// this is the global dictionary for JSON delegates introduced for multi-file
private static Dictionary<DataContract, JsonReadWriteDelegates> s_jsonDelegates = new Dictionary<DataContract, JsonReadWriteDelegates>();
using System;
using System.Xml;
-#if uapaot
-namespace System.Runtime.Serialization.Json
-{
- public delegate object JsonFormatClassReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString[] memberNames);
- public delegate object JsonFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract);
- public delegate void JsonFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract);
-}
-#else
namespace System.Runtime.Serialization.Json
{
using System;
}
}
}
-#endif
using System;
using System.Xml;
-#if uapaot
-namespace System.Runtime.Serialization.Json
-{
- public delegate void JsonFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, ClassDataContract dataContract, XmlDictionaryString[] memberNames);
- public delegate void JsonFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, CollectionDataContract dataContract);
-}
-#else
namespace System.Runtime.Serialization.Json
{
using System;
}
}
}
-#endif
namespace System.Runtime.Serialization.Json
{
-#if uapaot
- public class XmlObjectSerializerReadContextComplexJson : XmlObjectSerializerReadContextComplex
-#else
internal class XmlObjectSerializerReadContextComplexJson : XmlObjectSerializerReadContextComplex
-#endif
{
private string _extensionDataValueType;
private DataContractJsonSerializer _jsonSerializer;
return name;
}
-#if !uapaot
public static void ThrowDuplicateMemberException(object obj, XmlDictionaryString[] memberNames, int memberIndex)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SerializationException(
{
return BitFlagsGenerator.IsBitSet(bytes, bitIndex);
}
-#endif
}
}
namespace System.Runtime.Serialization.Json
{
-#if uapaot
- public class XmlObjectSerializerWriteContextComplexJson : XmlObjectSerializerWriteContextComplex
-#else
internal class XmlObjectSerializerWriteContextComplexJson : XmlObjectSerializerWriteContextComplex
-#endif
{
private DataContractJsonSerializer _jsonSerializer;
private EmitTypeInformation _emitXsiType;
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public sealed class KnownTypeDataContractResolver : DataContractResolver
#else
internal sealed class KnownTypeDataContractResolver : DataContractResolver
namespace System.Runtime.Serialization
{
-#if uapaot
- public abstract class PrimitiveDataContract : DataContract
-#else
internal abstract class PrimitiveDataContract : DataContract
-#endif
{
internal static readonly PrimitiveDataContract NullContract = new NullPrimitiveDataContract();
}
}
-#if uapaot
- public class CharDataContract : PrimitiveDataContract
-#else
internal class CharDataContract : PrimitiveDataContract
-#endif
{
public CharDataContract() : this(DictionaryGlobals.CharLocalName, DictionaryGlobals.SerializationNamespace)
{
}
}
-#if uapaot
- public class AsmxCharDataContract : CharDataContract
-#else
internal class AsmxCharDataContract : CharDataContract
-#endif
{
internal AsmxCharDataContract() : base(DictionaryGlobals.CharLocalName, DictionaryGlobals.AsmxTypesNamespace) { }
}
-#if uapaot
- public class BooleanDataContract : PrimitiveDataContract
-#else
internal class BooleanDataContract : PrimitiveDataContract
-#endif
{
public BooleanDataContract() : base(typeof(bool), DictionaryGlobals.BooleanLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class SignedByteDataContract : PrimitiveDataContract
-#else
internal class SignedByteDataContract : PrimitiveDataContract
-#endif
{
public SignedByteDataContract() : base(typeof(sbyte), DictionaryGlobals.SignedByteLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class UnsignedByteDataContract : PrimitiveDataContract
-#else
internal class UnsignedByteDataContract : PrimitiveDataContract
-#endif
{
public UnsignedByteDataContract() : base(typeof(byte), DictionaryGlobals.UnsignedByteLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class ShortDataContract : PrimitiveDataContract
-#else
internal class ShortDataContract : PrimitiveDataContract
-#endif
{
public ShortDataContract() : base(typeof(short), DictionaryGlobals.ShortLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class UnsignedShortDataContract : PrimitiveDataContract
-#else
internal class UnsignedShortDataContract : PrimitiveDataContract
-#endif
{
public UnsignedShortDataContract() : base(typeof(ushort), DictionaryGlobals.UnsignedShortLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class IntDataContract : PrimitiveDataContract
-#else
internal class IntDataContract : PrimitiveDataContract
-#endif
{
public IntDataContract() : base(typeof(int), DictionaryGlobals.IntLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class UnsignedIntDataContract : PrimitiveDataContract
-#else
internal class UnsignedIntDataContract : PrimitiveDataContract
-#endif
{
public UnsignedIntDataContract() : base(typeof(uint), DictionaryGlobals.UnsignedIntLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class LongDataContract : PrimitiveDataContract
-#else
internal class LongDataContract : PrimitiveDataContract
-#endif
{
public LongDataContract() : this(DictionaryGlobals.LongLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class IntegerDataContract : LongDataContract
-#else
internal class IntegerDataContract : LongDataContract
-#endif
{
internal IntegerDataContract() : base(DictionaryGlobals.integerLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class PositiveIntegerDataContract : LongDataContract
-#else
internal class PositiveIntegerDataContract : LongDataContract
-#endif
{
internal PositiveIntegerDataContract() : base(DictionaryGlobals.positiveIntegerLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NegativeIntegerDataContract : LongDataContract
-#else
internal class NegativeIntegerDataContract : LongDataContract
-#endif
{
internal NegativeIntegerDataContract() : base(DictionaryGlobals.negativeIntegerLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NonPositiveIntegerDataContract : LongDataContract
-#else
internal class NonPositiveIntegerDataContract : LongDataContract
-#endif
{
internal NonPositiveIntegerDataContract() : base(DictionaryGlobals.nonPositiveIntegerLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NonNegativeIntegerDataContract : LongDataContract
-#else
internal class NonNegativeIntegerDataContract : LongDataContract
-#endif
{
internal NonNegativeIntegerDataContract() : base(DictionaryGlobals.nonNegativeIntegerLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class UnsignedLongDataContract : PrimitiveDataContract
-#else
internal class UnsignedLongDataContract : PrimitiveDataContract
-#endif
{
public UnsignedLongDataContract() : base(typeof(ulong), DictionaryGlobals.UnsignedLongLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class FloatDataContract : PrimitiveDataContract
-#else
internal class FloatDataContract : PrimitiveDataContract
-#endif
{
public FloatDataContract() : base(typeof(float), DictionaryGlobals.FloatLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class DoubleDataContract : PrimitiveDataContract
-#else
internal class DoubleDataContract : PrimitiveDataContract
-#endif
{
public DoubleDataContract() : base(typeof(double), DictionaryGlobals.DoubleLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class DecimalDataContract : PrimitiveDataContract
-#else
internal class DecimalDataContract : PrimitiveDataContract
-#endif
{
public DecimalDataContract() : base(typeof(decimal), DictionaryGlobals.DecimalLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class DateTimeDataContract : PrimitiveDataContract
-#else
internal class DateTimeDataContract : PrimitiveDataContract
-#endif
{
public DateTimeDataContract() : base(typeof(DateTime), DictionaryGlobals.DateTimeLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class StringDataContract : PrimitiveDataContract
-#else
internal class StringDataContract : PrimitiveDataContract
-#endif
{
public StringDataContract() : this(DictionaryGlobals.StringLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class TimeDataContract : StringDataContract
-#else
internal class TimeDataContract : StringDataContract
-#endif
{
internal TimeDataContract() : base(DictionaryGlobals.timeLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class DateDataContract : StringDataContract
-#else
internal class DateDataContract : StringDataContract
-#endif
{
internal DateDataContract() : base(DictionaryGlobals.dateLocalName, DictionaryGlobals.SchemaNamespace) { }
}
internal HexBinaryDataContract() : base(DictionaryGlobals.hexBinaryLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class GYearMonthDataContract : StringDataContract
-#else
internal class GYearMonthDataContract : StringDataContract
-#endif
{
internal GYearMonthDataContract() : base(DictionaryGlobals.gYearMonthLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class GYearDataContract : StringDataContract
-#else
internal class GYearDataContract : StringDataContract
-#endif
{
internal GYearDataContract() : base(DictionaryGlobals.gYearLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class GMonthDayDataContract : StringDataContract
-#else
internal class GMonthDayDataContract : StringDataContract
-#endif
{
internal GMonthDayDataContract() : base(DictionaryGlobals.gMonthDayLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class GDayDataContract : StringDataContract
-#else
internal class GDayDataContract : StringDataContract
-#endif
{
internal GDayDataContract() : base(DictionaryGlobals.gDayLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class GMonthDataContract : StringDataContract
-#else
internal class GMonthDataContract : StringDataContract
-#endif
{
internal GMonthDataContract() : base(DictionaryGlobals.gMonthLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NormalizedStringDataContract : StringDataContract
-#else
internal class NormalizedStringDataContract : StringDataContract
-#endif
{
internal NormalizedStringDataContract() : base(DictionaryGlobals.normalizedStringLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class TokenDataContract : StringDataContract
-#else
internal class TokenDataContract : StringDataContract
-#endif
{
internal TokenDataContract() : base(DictionaryGlobals.tokenLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class LanguageDataContract : StringDataContract
-#else
internal class LanguageDataContract : StringDataContract
-#endif
{
internal LanguageDataContract() : base(DictionaryGlobals.languageLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NameDataContract : StringDataContract
-#else
internal class NameDataContract : StringDataContract
-#endif
{
internal NameDataContract() : base(DictionaryGlobals.NameLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NCNameDataContract : StringDataContract
-#else
internal class NCNameDataContract : StringDataContract
-#endif
{
internal NCNameDataContract() : base(DictionaryGlobals.NCNameLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class IDDataContract : StringDataContract
-#else
internal class IDDataContract : StringDataContract
-#endif
{
internal IDDataContract() : base(DictionaryGlobals.XSDIDLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class IDREFDataContract : StringDataContract
-#else
internal class IDREFDataContract : StringDataContract
-#endif
{
internal IDREFDataContract() : base(DictionaryGlobals.IDREFLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class IDREFSDataContract : StringDataContract
-#else
internal class IDREFSDataContract : StringDataContract
-#endif
{
internal IDREFSDataContract() : base(DictionaryGlobals.IDREFSLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class ENTITYDataContract : StringDataContract
-#else
internal class ENTITYDataContract : StringDataContract
-#endif
{
internal ENTITYDataContract() : base(DictionaryGlobals.ENTITYLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class ENTITIESDataContract : StringDataContract
-#else
internal class ENTITIESDataContract : StringDataContract
-#endif
{
internal ENTITIESDataContract() : base(DictionaryGlobals.ENTITIESLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NMTOKENDataContract : StringDataContract
-#else
internal class NMTOKENDataContract : StringDataContract
-#endif
{
internal NMTOKENDataContract() : base(DictionaryGlobals.NMTOKENLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class NMTOKENSDataContract : StringDataContract
-#else
internal class NMTOKENSDataContract : StringDataContract
-#endif
{
internal NMTOKENSDataContract() : base(DictionaryGlobals.NMTOKENSLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class ByteArrayDataContract : PrimitiveDataContract
-#else
internal class ByteArrayDataContract : PrimitiveDataContract
-#endif
{
public ByteArrayDataContract() : base(typeof(byte[]), DictionaryGlobals.ByteArrayLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class ObjectDataContract : PrimitiveDataContract
-#else
internal class ObjectDataContract : PrimitiveDataContract
-#endif
{
public ObjectDataContract() : base(typeof(object), DictionaryGlobals.ObjectLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class TimeSpanDataContract : PrimitiveDataContract
-#else
internal class TimeSpanDataContract : PrimitiveDataContract
-#endif
{
public TimeSpanDataContract() : this(DictionaryGlobals.TimeSpanLocalName, DictionaryGlobals.SerializationNamespace)
{
}
}
-#if uapaot
- public class XsDurationDataContract : TimeSpanDataContract
-#else
internal class XsDurationDataContract : TimeSpanDataContract
-#endif
{
public XsDurationDataContract() : base(DictionaryGlobals.TimeSpanLocalName, DictionaryGlobals.SchemaNamespace) { }
}
-#if uapaot
- public class GuidDataContract : PrimitiveDataContract
-#else
internal class GuidDataContract : PrimitiveDataContract
-#endif
{
public GuidDataContract() : this(DictionaryGlobals.GuidLocalName, DictionaryGlobals.SerializationNamespace)
{
}
}
-#if uapaot
- public class AsmxGuidDataContract : GuidDataContract
-#else
internal class AsmxGuidDataContract : GuidDataContract
-#endif
{
internal AsmxGuidDataContract() : base(DictionaryGlobals.GuidLocalName, DictionaryGlobals.AsmxTypesNamespace) { }
}
-#if uapaot
- public class UriDataContract : PrimitiveDataContract
-#else
internal class UriDataContract : PrimitiveDataContract
-#endif
{
public UriDataContract() : base(typeof(Uri), DictionaryGlobals.UriLocalName, DictionaryGlobals.SchemaNamespace)
{
}
}
-#if uapaot
- public class QNameDataContract : PrimitiveDataContract
-#else
internal class QNameDataContract : PrimitiveDataContract
-#endif
{
public QNameDataContract() : base(typeof(XmlQualifiedName), DictionaryGlobals.QNameLocalName, DictionaryGlobals.SchemaNamespace)
{
{
internal enum SerializationMode
{
- SharedContract,
-#if uapaot
- SharedType
-#endif
+ SharedContract
}
}
using System.Linq;
using System.Runtime.CompilerServices;
-#if uapaot
- public delegate IXmlSerializable CreateXmlSerializableDelegate();
- public sealed class XmlDataContract : DataContract
-#else
internal delegate IXmlSerializable CreateXmlSerializableDelegate();
internal sealed class XmlDataContract : DataContract
-#endif
{
private XmlDataContractCriticalHelper _helper;
set { _helper.IsTopLevelElementNullable = value; }
}
-#if uapaot
- private CreateXmlSerializableDelegate _createXmlSerializableDelegate;
- public CreateXmlSerializableDelegate CreateXmlSerializableDelegate
-#else
internal CreateXmlSerializableDelegate CreateXmlSerializableDelegate
-#endif
{
-#if !uapaot
get
{
// We create XmlSerializableDelegate via CodeGen when CodeGen is enabled;
return () => ReflectionCreateXmlSerializable(this.UnderlyingType);
}
-#else
- get
- {
- if (DataContractSerializer.Option == SerializationOption.CodeGenOnly
- || (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup && _createXmlSerializableDelegate != null))
- {
- return _createXmlSerializableDelegate;
- }
-
- return () => ReflectionCreateXmlSerializable(this.UnderlyingType);
- }
- set
- {
- _createXmlSerializableDelegate = value;
- }
-#endif
}
internal override bool CanContainReferences => false;
return ctor;
}
-#if !uapaot
internal CreateXmlSerializableDelegate GenerateCreateXmlSerializableDelegate()
{
Type type = this.UnderlyingType;
return false;
}
-#endif
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
internal IXmlSerializable ReflectionCreateXmlSerializable(Type type)
{
if (type.IsValueType)
}
}
-#if !uapaot
private static MethodInfo s_getTypeHandleMethod;
internal static MethodInfo GetTypeHandleMethod
{
return s_collectionSerializationExceptionMessageProperty;
}
}
-#endif
}
}
\ No newline at end of file
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public delegate object XmlFormatClassReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[] memberNamespaces);
public delegate object XmlFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, CollectionDataContract collectionContract);
public delegate void XmlFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString itemName, XmlDictionaryString itemNamespace, CollectionDataContract collectionContract);
/// </SecurityNote>
private class CriticalHelper
{
-#if !uapaot
private CodeGenerator _ilg;
private LocalBuilder _objectLocal;
private Type _objectType;
private ArgBuilder _memberNamesArg;
private ArgBuilder _memberNamespacesArg;
private ArgBuilder _collectionContractArg;
-#endif
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatClassReaderDelegate CreateReflectionXmlClassReader(ClassDataContract classContract)
{
return new ReflectionXmlClassReader(classContract).ReflectionReadClass;
{
return CreateReflectionXmlClassReader(classContract);
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- return CreateReflectionXmlClassReader(classContract);
- }
-#endif
else
{
-#if uapaot
- throw new InvalidOperationException("Cannot generate class reader");
-#else
_ilg = new CodeGenerator();
bool memberAccessFlag = classContract.RequiresMemberAccessForRead(null);
try
}
}
return (XmlFormatClassReaderDelegate)_ilg.EndMethod();
-#endif
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatCollectionReaderDelegate CreateReflectionXmlCollectionReader()
{
return new ReflectionXmlCollectionReader().ReflectionReadCollection;
{
return CreateReflectionXmlCollectionReader();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- return CreateReflectionXmlCollectionReader();
- }
-#endif
else
{
-#if uapaot
- throw new InvalidOperationException("Cannot generate class reader");
-#else
_ilg = GenerateCollectionReaderHelper(collectionContract, false /*isGetOnlyCollection*/);
ReadCollection(collectionContract);
_ilg.Load(_objectLocal);
_ilg.ConvertValue(_objectLocal.LocalType, _ilg.CurrentMethod.ReturnType);
return (XmlFormatCollectionReaderDelegate)_ilg.EndMethod();
-#endif
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatGetOnlyCollectionReaderDelegate CreateReflectionReadGetOnlyCollectionReader()
{
return new ReflectionXmlCollectionReader().ReflectionReadGetOnlyCollection;
{
return CreateReflectionReadGetOnlyCollectionReader();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- return CreateReflectionReadGetOnlyCollectionReader();
- }
-#endif
else
{
-#if uapaot
- throw new InvalidOperationException("Cannot generate class reader");
-#else
_ilg = GenerateCollectionReaderHelper(collectionContract, true /*isGetOnlyCollection*/);
ReadGetOnlyCollection(collectionContract);
return (XmlFormatGetOnlyCollectionReaderDelegate)_ilg.EndMethod();
-#endif
}
}
-#if !uapaot
private CodeGenerator GenerateCollectionReaderHelper(CollectionDataContract collectionContract, bool isGetOnlyCollection)
{
_ilg = new CodeGenerator();
_ilg.Call(XmlFormatGeneratorStatics.CreateSerializationExceptionMethod);
_ilg.Throw();
}
-#endif
}
internal static object UnsafeGetUninitializedObject(Type type)
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public delegate void XmlFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, ClassDataContract dataContract);
public delegate void XmlFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context, CollectionDataContract dataContract);
public sealed class XmlFormatWriterGenerator
/// </SecurityNote>
private class CriticalHelper
{
-#if !USE_REFEMIT && !uapaot
+#if !USE_REFEMIT
private CodeGenerator _ilg;
private ArgBuilder _xmlWriterArg;
private ArgBuilder _contextArg;
private int _childElementIndex = 0;
#endif
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatClassWriterDelegate CreateReflectionXmlFormatClassWriterDelegate()
{
return new ReflectionXmlFormatWriter().ReflectionWriteClass;
{
return CreateReflectionXmlFormatClassWriterDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- return CreateReflectionXmlFormatClassWriterDelegate();
- }
-#endif
else
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
throw new InvalidOperationException("Cannot generate class writer");
#else
_ilg = new CodeGenerator();
}
}
-#if uapaot
- [RemovableFeature(ReflectionBasedSerializationFeature.Name)]
-#endif
private XmlFormatCollectionWriterDelegate CreateReflectionXmlFormatCollectionWriterDelegate()
{
return new ReflectionXmlFormatWriter().ReflectionWriteCollection;
{
return CreateReflectionXmlFormatCollectionWriterDelegate();
}
-#if uapaot
- else if (DataContractSerializer.Option == SerializationOption.ReflectionAsBackup)
- {
- return CreateReflectionXmlFormatCollectionWriterDelegate();
- }
-#endif
else
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
throw new InvalidOperationException("Cannot generate class writer");
#else
_ilg = new CodeGenerator();
}
}
-#if !USE_REFEMIT && !uapaot
+#if !USE_REFEMIT
private void InitArgs(Type objType)
{
_xmlWriterArg = _ilg.GetArg(0);
using System.Xml;
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, DataContract>;
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class XmlObjectSerializerContext
#else
internal class XmlObjectSerializerContext
DataContract dataContract = PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace);
if (dataContract == null)
{
-#if uapaot
- if (typeName.Name == Globals.SafeSerializationManagerName && typeName.Namespace == Globals.SafeSerializationManagerNamespace && Globals.TypeOfSafeSerializationManager != null)
- {
- return GetDataContract(Globals.TypeOfSafeSerializationManager);
- }
-#endif
dataContract = scopedKnownTypes.GetDataContract(typeName);
if (dataContract == null)
{
using System.Security;
using DataContractDictionary = System.Collections.Generic.Dictionary<System.Xml.XmlQualifiedName, DataContract>;
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class XmlObjectSerializerReadContext : XmlObjectSerializerContext
#else
internal class XmlObjectSerializerReadContext : XmlObjectSerializerContext
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NullValueReturnedForGetOnlyCollection, DataContract.GetClrTypeFullName(type))));
}
-#if uapaot
- // Referenced from generated code in .NET Native's SerializationAssemblyGenerator
- internal static void ThrowNoDefaultConstructorForCollectionException(Type type)
- {
- throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoDefaultConstructorForCollection, DataContract.GetClrTypeFullName(type))));
- }
-#endif
-
#if USE_REFEMIT
public static void ThrowArrayExceededSizeException(int arraySize, Type type)
#else
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.Format(SR.UnexpectedElementExpectingElements, xmlReader.NodeType, xmlReader.LocalName, xmlReader.NamespaceURI, stringBuilder.ToString()))));
}
-#if uapaot
- public static void ThrowMissingRequiredMembers(object obj, XmlDictionaryString[] memberNames, byte[] expectedElements, byte[] requiredElements)
- {
- StringBuilder stringBuilder = new StringBuilder();
- int missingMembersCount = 0;
- for (int i = 0; i < memberNames.Length; i++)
- {
- if (IsBitSet(expectedElements, i) && IsBitSet(requiredElements, i))
- {
- if (stringBuilder.Length != 0)
- stringBuilder.Append(", ");
- stringBuilder.Append(memberNames[i]);
- missingMembersCount++;
- }
- }
-
- if (missingMembersCount == 1)
- {
- throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonOneRequiredMemberNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString())));
- }
- else
- {
- throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonRequiredMembersNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString())));
- }
- }
-
- public static void ThrowDuplicateMemberException(object obj, XmlDictionaryString[] memberNames, int memberIndex)
- {
- throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonDuplicateMemberInInput, DataContract.GetClrTypeFullName(obj.GetType()), memberNames[memberIndex])));
- }
-
- private static bool IsBitSet(byte[] bytes, int bitIndex)
- {
- throw new NotImplementedException();
- //return BitFlagsGenerator.IsBitSet(bytes, bitIndex);
- }
-#endif
-
protected void HandleMemberNotFound(XmlReaderDelegator xmlReader, ExtensionDataObject extensionData, int memberIndex)
{
xmlReader.MoveToContent();
namespace System.Runtime.Serialization
{
-#if uapaot
- public class XmlObjectSerializerReadContextComplex : XmlObjectSerializerReadContext
-#else
internal class XmlObjectSerializerReadContextComplex : XmlObjectSerializerReadContext
-#endif
{
private bool _preserveObjectReferences;
private SerializationMode _mode;
using System.Xml.Serialization;
using System.Security;
using System.Runtime.CompilerServices;
-#if !uapaot
using ExtensionDataObject = System.Object;
-#endif
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class XmlObjectSerializerWriteContext : XmlObjectSerializerContext
#else
internal class XmlObjectSerializerWriteContext : XmlObjectSerializerContext
_unsafeTypeForwardingEnabled = true;
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
internal ObjectToIdCache SerializedObjects
#else
protected ObjectToIdCache SerializedObjects
DataContract dataContract;
if (declaredType.IsInterface && CollectionDataContract.IsCollectionInterface(declaredType))
{
-#if !uapaot
dataContract = GetDataContractSkipValidation(DataContract.GetId(objectTypeHandle), objectTypeHandle, objectType);
if (OnHandleIsReference(xmlWriter, dataContract, obj))
return;
dataContract = GetDataContract(declaredTypeHandle, declaredType);
-#else
- dataContract = DataContract.GetDataContract(declaredType);
- if (OnHandleIsReference(xmlWriter, dataContract, obj))
- return;
- if (this.Mode == SerializationMode.SharedType && dataContract.IsValidContract(this.Mode))
- dataContract = dataContract.GetValidContract(this.Mode);
- else
- dataContract = GetDataContract(declaredTypeHandle, declaredType);
-
-#endif
if (!WriteClrTypeInfo(xmlWriter, dataContract) && DataContractResolver != null)
{
if (objectType == null)
knownTypesAddedInCurrentScope = true;
}
-#if !uapaot
if (verifyKnownType)
{
if (!IsKnownType(dataContract, declaredType))
}
}
}
-#endif
+
WriteDataContractValue(dataContract, xmlWriter, obj, declaredTypeHandle);
if (knownTypesAddedInCurrentScope)
return false;
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteAnyType(XmlWriterDelegator xmlWriter, object value)
#else
internal virtual void WriteAnyType(XmlWriterDelegator xmlWriter, object value)
xmlWriter.WriteAnyType(value);
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteString(XmlWriterDelegator xmlWriter, string value)
#else
internal virtual void WriteString(XmlWriterDelegator xmlWriter, string value)
{
xmlWriter.WriteString(value);
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns)
#else
internal virtual void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns)
}
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value)
#else
internal virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value)
{
xmlWriter.WriteBase64(value);
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns)
#else
internal virtual void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns)
}
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value)
#else
internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value)
{
xmlWriter.WriteUri(value);
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns)
#else
internal virtual void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns)
}
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value)
#else
internal virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value)
{
xmlWriter.WriteQName(value);
}
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns)
#else
internal virtual void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns)
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class XmlObjectSerializerWriteContextComplex : XmlObjectSerializerWriteContext
#else
internal class XmlObjectSerializerWriteContextComplex : XmlObjectSerializerWriteContext
return false;
}
-#if uapaot
- public override void WriteAnyType(XmlWriterDelegator xmlWriter, object value)
-#else
internal override void WriteAnyType(XmlWriterDelegator xmlWriter, object value)
-#endif
{
if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/))
xmlWriter.WriteAnyType(value);
}
-#if uapaot
- public override void WriteString(XmlWriterDelegator xmlWriter, string value)
-#else
internal override void WriteString(XmlWriterDelegator xmlWriter, string value)
-#endif
{
if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/))
xmlWriter.WriteString(value);
}
-#if uapaot
- public override void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns)
-#else
internal override void WriteString(XmlWriterDelegator xmlWriter, string value, XmlDictionaryString name, XmlDictionaryString ns)
-#endif
{
if (value == null)
WriteNull(xmlWriter, typeof(string), true/*isMemberTypeSerializable*/, name, ns);
}
}
-#if uapaot
- public override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value)
-#else
internal override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value)
-#endif
{
if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/))
xmlWriter.WriteBase64(value);
}
-#if uapaot
- public override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns)
-#else
internal override void WriteBase64(XmlWriterDelegator xmlWriter, byte[] value, XmlDictionaryString name, XmlDictionaryString ns)
-#endif
{
if (value == null)
WriteNull(xmlWriter, typeof(byte[]), true/*isMemberTypeSerializable*/, name, ns);
}
}
-#if uapaot
- public override void WriteUri(XmlWriterDelegator xmlWriter, Uri value)
-#else
internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value)
-#endif
{
if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/))
xmlWriter.WriteUri(value);
}
-#if uapaot
- public override void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns)
-#else
internal override void WriteUri(XmlWriterDelegator xmlWriter, Uri value, XmlDictionaryString name, XmlDictionaryString ns)
-#endif
{
if (value == null)
WriteNull(xmlWriter, typeof(Uri), true/*isMemberTypeSerializable*/, name, ns);
}
}
-#if uapaot
- public override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value)
-#else
internal override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value)
-#endif
{
if (!OnHandleReference(xmlWriter, value, false /*canContainCyclicReference*/))
xmlWriter.WriteQName(value);
}
-#if uapaot
- public override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns)
-#else
internal override void WriteQName(XmlWriterDelegator xmlWriter, XmlQualifiedName value, XmlDictionaryString name, XmlDictionaryString ns)
-#endif
{
if (value == null)
WriteNull(xmlWriter, typeof(XmlQualifiedName), true/*isMemberTypeSerializable*/, name, ns);
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class XmlReaderDelegator
#else
internal class XmlReaderDelegator
namespace System.Runtime.Serialization
{
-#if USE_REFEMIT || uapaot
+#if USE_REFEMIT
public class XmlWriterDelegator
#else
internal class XmlWriterDelegator
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Debug|Any CPU.ActiveCfg = uapaot-Windows_NT-Debug|Any CPU
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Debug|Any CPU.Build.0 = uapaot-Windows_NT-Debug|Any CPU
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Release|Any CPU.ActiveCfg = uapaot-Windows_NT-Release|Any CPU
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Release|Any CPU.Build.0 = uapaot-Windows_NT-Release|Any CPU
- EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
<NoWarn>$(NoWarn);3021</NoWarn>
<DefineConstants>$(DefineConstants);CORERT</DefineConstants>
<SystemReflectionMetadataPath>..\..\System.Reflection.Metadata\src\</SystemReflectionMetadataPath>
- <Configurations>uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="System\Uri.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAOT)'=='true'">
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>
</ProjectReference>
<ProjectReference Include="..\XDocument.Test.ModuleCore\XDocument.Test.ModuleCore.csproj" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.Xml</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573;649;169;414</NoWarn>
- <FeatureCompiledXsl Condition="'$(TargetGroup)' != 'uap' AND '$(TargetGroup)' != 'uapaot'">true</FeatureCompiledXsl>
+ <FeatureCompiledXsl Condition="'$(TargetGroup)' != 'uap'">true</FeatureCompiledXsl>
<DefineConstants Condition="'$(FeatureCompiledXsl)' == 'true'">$(DefineConstants);FEATURE_COMPILED_XSL</DefineConstants>
- <DefineConstants Condition="'$(TargetsAOT)' == 'true'">$(DefineConstants);FEATURE_SERIALIZATION_UAPAOT;UAPAOT</DefineConstants>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="System\Xml\XmlCharType.bin">
<LogicalName>XmlCharType.bin</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uapaot'">
+ <ItemGroup>
<Reference Include="System.Reflection.Emit" />
<Reference Include="System.Reflection.Emit.ILGeneration" />
<Reference Include="System.Reflection.Emit.Lightweight" />
</Compile>
<Compile Include="System\Xml\Core\LocalAppContextSwitches.cs" />
<Compile Include="$(CommonPath)\System\CSharpHelpers.cs" />
- <Compile Include="$(CommonPath)\System\Runtime\CompilerServices\RemovableFeatureAttribute.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)'=='true'">
<Compile Include="System\Xml\Xsl\Runtime\XmlCollation.Windows.cs" />
// NOTE: This method is called via reflection from System.Data.dll and from Analysis Services in Yukon.
// Do not change its signature without notifying the appropriate teams!
// !!!!!!
-#if UAPAOT
- public static XmlReader CreateSqlReader(Stream input, XmlReaderSettings settings, XmlParserContext inputContext)
-#else
internal static XmlReader CreateSqlReader(Stream input, XmlReaderSettings settings, XmlParserContext inputContext)
-#endif
{
if (input == null)
{
using System.Resources;
using System.Runtime.CompilerServices;
-#if !FEATURE_SERIALIZATION_UAPAOT
namespace System.Xml.Serialization
{
using System;
}
}
}
-#endif
internal TempAssembly(XmlMapping[] xmlMappings, Type[] types, string defaultNamespace, string location)
{
-#if !FEATURE_SERIALIZATION_UAPAOT
bool containsSoapMapping = false;
for (int i = 0; i < xmlMappings.Length; i++)
{
{
throw new PlatformNotSupportedException("Compiling JScript/CSharp scripts is not supported");
}
-#endif
#if DEBUG
// use exception in the place of Debug.Assert to avoid throwing asserts from a server process such as aspnet_ewp.exe
return null;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
if (!IsSerializerVersionMatch(serializer, type, defaultNamespace))
{
XmlSerializationEventSource.Log.XmlSerializerExpired(serializerName, type.FullName);
return null;
}
-#endif
}
else
{
return null;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
private static bool IsSerializerVersionMatch(Assembly serializer, Type type, string defaultNamespace)
{
if (serializer == null)
return writerType.Assembly;
}
-#endif
private static MethodInfo GetMethodFromType(Type type, string methodName)
{
private bool _debugEnabled = DiagnosticsSwitches.KeepTempFiles.Enabled;
private StringWriter _writer = new StringWriter(CultureInfo.InvariantCulture);
-#if !FEATURE_SERIALIZATION_UAPAOT
// SxS: This method does not take any resource name and does not expose any resources to the caller.
// It's OK to suppress the SxS warning.
internal void AddImport(Type type, Hashtable types)
{
get { return _writer; }
}
-#endif
internal static string GetTempAssemblyName(AssemblyName parent, string ns)
{
}
}
- // This class and it's contained members must be public so that reflection metadata is available on uapaot
- public static class ReflectionXmlSerializationReaderHelper
+ internal static class ReflectionXmlSerializationReaderHelper
{
public delegate void SetMemberValueDelegate(object o, object val);
using System.Text.RegularExpressions;
using System.Xml.Extensions;
-#if !FEATURE_SERIALIZATION_UAPAOT
namespace System.Xml.Serialization
{
internal class SourceInfo
}
}
}
-#endif
return typeDesc;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
internal TypeMapping GetTypeMappingFromTypeDesc(TypeDesc typeDesc)
{
foreach (TypeMapping typeMapping in TypeMappings)
}
return null;
}
-#endif
private TypeDesc ImportTypeDesc(Type type, MemberInfo memberInfo, bool directReference)
{
{
}
}
-#if !FEATURE_SERIALIZATION_UAPAOT
internal class XmlSerializationCodeGen
{
private IndentedWriter _writer;
return mapping.TypeDesc.CanBeElementValue;
}
}
-#endif
}
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#if !FEATURE_SERIALIZATION_UAPAOT
namespace System.Xml.Serialization
{
using System;
}
}
}
-}
-#endif
\ No newline at end of file
+}
\ No newline at end of file
protected abstract void InitIDs();
-#if FEATURE_SERIALIZATION_UAPAOT
- // this method must be called before any generated deserialization methods are called
- internal void Init(XmlReader r, XmlDeserializationEvents events, string encodingStyle)
- {
- _events = events;
- _r = r;
- _soap12 = (encodingStyle == Soap12.Encoding);
-
- _schemaNsID = r.NameTable.Add(XmlSchema.Namespace);
- _schemaNs2000ID = r.NameTable.Add("http://www.w3.org/2000/10/XMLSchema");
- _schemaNs1999ID = r.NameTable.Add("http://www.w3.org/1999/XMLSchema");
- _schemaNonXsdTypesNsID = r.NameTable.Add(UrtTypes.Namespace);
- _instanceNsID = r.NameTable.Add(XmlSchema.InstanceNamespace);
- _instanceNs2000ID = r.NameTable.Add("http://www.w3.org/2000/10/XMLSchema-instance");
- _instanceNs1999ID = r.NameTable.Add("http://www.w3.org/1999/XMLSchema-instance");
- _soapNsID = r.NameTable.Add(Soap.Encoding);
- _soap12NsID = r.NameTable.Add(Soap12.Encoding);
- _schemaID = r.NameTable.Add("schema");
- _wsdlNsID = r.NameTable.Add(Wsdl.Namespace);
- _wsdlArrayTypeID = r.NameTable.Add(Wsdl.ArrayType);
- _nullID = r.NameTable.Add("null");
- _nilID = r.NameTable.Add("nil");
- _typeID = r.NameTable.Add("type");
- _arrayTypeID = r.NameTable.Add("arrayType");
- _itemTypeID = r.NameTable.Add("itemType");
- _arraySizeID = r.NameTable.Add("arraySize");
- _arrayID = r.NameTable.Add("Array");
- _urTypeID = r.NameTable.Add(Soap.UrType);
- InitIDs();
- }
-#endif
-
// this method must be called before any generated deserialization methods are called
internal void Init(XmlReader r, XmlDeserializationEvents events, string encodingStyle, TempAssembly tempAssembly)
{
///<internalonly/>
public delegate object XmlSerializationReadCallback();
-#if !FEATURE_SERIALIZATION_UAPAOT
internal class XmlSerializationReaderCodeGen : XmlSerializationCodeGen
{
private Hashtable _idNames = new Hashtable();
RaCodeGen.WriteLocalDecl(typeFullName, variableName, initValue, useReflection);
}
}
-#endif
}
// See the LICENSE file in the project root for more information.
-#if !FEATURE_SERIALIZATION_UAPAOT
namespace System.Xml.Serialization
{
using System;
}
}
}
-#endif
private bool _soap12;
private bool _escapeName = true;
-#if FEATURE_SERIALIZATION_UAPAOT
- // this method must be called before any generated serialization methods are called
- internal void Init(XmlWriter w, XmlSerializerNamespaces namespaces, string encodingStyle, string idBase)
- {
- _w = w;
- _namespaces = namespaces;
- }
-#endif
-
// this method must be called before any generated serialization methods are called
internal void Init(XmlWriter w, XmlSerializerNamespaces namespaces, string encodingStyle, string idBase, TempAssembly tempAssembly)
{
return (bool)oIsTypeDynamic;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
internal static bool IsTypeDynamic(Type[] arguments)
{
foreach (Type t in arguments)
}
}
}
-#endif
internal static Assembly Get(string fullName)
{
return s_nameToAssemblyMap != null ? (Assembly)s_nameToAssemblyMap[fullName] : null;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
internal static string GetName(Assembly a)
{
return s_assemblyToNameMap != null ? (string) s_assemblyToNameMap[a] : null;
}
-#endif
}
-#if !FEATURE_SERIALIZATION_UAPAOT
internal class ReflectionAwareCodeGen
{
private const string hexDigits = "0123456789ABCDEF";
return enumValue;
}
}
-#endif
}
using System.Xml.Schema;
using System.Xml.Extensions;
-#if !FEATURE_SERIALIZATION_UAPAOT
namespace System.Xml.Serialization
{
internal class XmlSerializationWriterILGen : XmlSerializationILGen
}
}
}
-#endif
// of XmlSerializer, then any access to this enum would be treated by AOT compilers as access to the XmlSerializer
// as well, which has a large static ctor which brings in a lot of code. So keeping the enum separate
// makes sure that using just the enum itself doesn't bring in the whole of serialization code base.
-#if FEATURE_SERIALIZATION_UAPAOT
- public enum SerializationMode
-#else
internal enum SerializationMode
-#endif
{
CodeGenOnly,
ReflectionOnly,
public class XmlSerializer
{
-#if FEATURE_SERIALIZATION_UAPAOT
- public static SerializationMode Mode { get; set; } = SerializationMode.ReflectionAsBackup;
-#else
internal static SerializationMode Mode { get; set; } = SerializationMode.ReflectionAsBackup;
-#endif
private static bool ReflectionMethodEnabled
{
private Type _primitiveType;
private XmlMapping _mapping;
private XmlDeserializationEvents _events = new XmlDeserializationEvents();
-#if FEATURE_SERIALIZATION_UAPAOT
- private XmlSerializer innerSerializer;
- public string DefaultNamespace = null;
-#else
internal string DefaultNamespace = null;
-#endif
private Type _rootType;
private bool _isReflectionBasedSerializer = false;
if (xmlTypeMapping == null)
throw new ArgumentNullException(nameof(xmlTypeMapping));
-#if !FEATURE_SERIALIZATION_UAPAOT
_tempAssembly = GenerateTempAssembly(xmlTypeMapping);
-#endif
_mapping = xmlTypeMapping;
}
_primitiveType = type;
return;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
_tempAssembly = s_cache[defaultNamespace, type];
if (_tempAssembly == null)
{
{
_mapping = XmlReflectionImporter.GetTopLevelMapping(type, defaultNamespace);
}
-#else
- XmlSerializerImplementation contract = GetXmlSerializerContractFromGeneratedAssembly();
-
- if (contract != null)
- {
- this.innerSerializer = contract.GetSerializer(type);
- }
-#endif
}
public XmlSerializer(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace, string location)
DefaultNamespace = defaultNamespace;
_rootType = type;
_mapping = GenerateXmlTypeMapping(type, overrides, extraTypes, root, defaultNamespace);
-#if !FEATURE_SERIALIZATION_UAPAOT
_tempAssembly = GenerateTempAssembly(_mapping, type, defaultNamespace, location);
-#endif
}
private XmlTypeMapping GenerateXmlTypeMapping(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace)
{
SerializeUsingReflection(xmlWriter, o, namespaces, encodingStyle, id);
}
-#if !FEATURE_SERIALIZATION_UAPAOT
else if (_tempAssembly == null || _typedSerializer)
{
// The contion for the block is never true, thus the block is never hit.
}
else
_tempAssembly.InvokeWriter(_mapping, xmlWriter, o, namespaces == null || namespaces.Count == 0 ? DefaultNamespaces : namespaces, encodingStyle, id);
-#else
- else
- {
- if (this.innerSerializer != null)
- {
- if (!string.IsNullOrEmpty(this.DefaultNamespace))
- {
- this.innerSerializer.DefaultNamespace = this.DefaultNamespace;
- }
-
- XmlSerializationWriter writer = this.innerSerializer.CreateWriter();
- writer.Init(xmlWriter, namespaces == null || namespaces.Count == 0 ? DefaultNamespaces : namespaces, encodingStyle, id);
- try
- {
- this.innerSerializer.Serialize(o, writer);
- }
- finally
- {
- writer.Dispose();
- }
- }
- else if (ReflectionMethodEnabled)
- {
- SerializeUsingReflection(xmlWriter, o, namespaces, encodingStyle, id);
- }
- else
- {
- throw new InvalidOperationException(SR.Format(SR.Xml_MissingSerializationCodeException, this._rootType, typeof(XmlSerializer).Name));
- }
- }
-#endif
}
catch (Exception e)
{
{
return DeserializeUsingReflection(xmlReader, encodingStyle, events);
}
-#if !FEATURE_SERIALIZATION_UAPAOT
else if (_tempAssembly == null || _typedSerializer)
{
XmlSerializationReader reader = CreateReader();
{
return _tempAssembly.InvokeReader(_mapping, xmlReader, events, encodingStyle);
}
-#else
- else
- {
- if (this.innerSerializer != null)
- {
- if (!string.IsNullOrEmpty(this.DefaultNamespace))
- {
- this.innerSerializer.DefaultNamespace = this.DefaultNamespace;
- }
-
- XmlSerializationReader reader = this.innerSerializer.CreateReader();
- reader.Init(xmlReader, events, encodingStyle);
- try
- {
- return this.innerSerializer.Deserialize(reader);
- }
- finally
- {
- reader.Dispose();
- }
- }
- else if (ReflectionMethodEnabled)
- {
- return DeserializeUsingReflection(xmlReader, encodingStyle, events);
- }
- else
- {
-
- throw new InvalidOperationException(SR.Format(SR.Xml_MissingSerializationCodeException, this._rootType, typeof(XmlSerializer).Name));
- }
- }
-#endif
}
catch (Exception e)
{
TypeDesc typeDesc = (TypeDesc)TypeScope.PrimtiveTypes[_primitiveType];
return xmlReader.IsStartElement(typeDesc.DataType.Name, string.Empty);
}
-#if !FEATURE_SERIALIZATION_UAPAOT
else if (_tempAssembly != null)
{
return _tempAssembly.CanRead(_mapping, xmlReader);
{
return false;
}
-#else
- if (this.innerSerializer != null)
- {
- return this.innerSerializer.CanDeserialize(xmlReader);
- }
- else
- {
- return ReflectionMethodEnabled;
- }
-#endif
}
public static XmlSerializer[] FromMappings(XmlMapping[] mappings)
public static XmlSerializer[] FromMappings(XmlMapping[] mappings, Type type)
{
if (mappings == null || mappings.Length == 0) return Array.Empty<XmlSerializer>();
-#if FEATURE_SERIALIZATION_UAPAOT
- XmlSerializer[] serializers = GetReflectionBasedSerializers(mappings, type);
- return serializers;
-#else
bool anySoapMapping = false;
foreach (var mapping in mappings)
{
serializers[i] = (XmlSerializer)contract.TypedSerializers[mappings[i].Key];
return serializers;
}
-#endif
}
private static XmlSerializer[] GetReflectionBasedSerializers(XmlMapping[] mappings, Type type)
return serializers;
}
-#if !FEATURE_SERIALIZATION_UAPAOT
internal static bool GenerateSerializer(Type[] types, XmlMapping[] mappings, Stream stream)
{
if (types == null || types.Length == 0)
return TempAssembly.GenerateSerializerToStream(mappings, types, null, assembly, new Hashtable(), stream);
}
-#endif
private static XmlSerializer[] GetSerializersFromCache(XmlMapping[] mappings, Type type)
{
if (types == null)
return Array.Empty<XmlSerializer>();
-#if FEATURE_SERIALIZATION_UAPAOT
- var serializers = new XmlSerializer[types.Length];
- for (int i = 0; i < types.Length; i++)
- {
- serializers[i] = new XmlSerializer(types[i]);
- }
- return serializers;
-#else
XmlReflectionImporter importer = new XmlReflectionImporter();
XmlTypeMapping[] mappings = new XmlTypeMapping[types.Length];
for (int i = 0; i < types.Length; i++)
mappings[i] = importer.ImportTypeMapping(types[i]);
}
return FromMappings(mappings);
-#endif
- }
-
-#if FEATURE_SERIALIZATION_UAPAOT
- // this the global XML serializer contract introduced for multi-file
- private static XmlSerializerImplementation xmlSerializerContract;
-
- internal static XmlSerializerImplementation GetXmlSerializerContractFromGeneratedAssembly()
- {
- // hack to pull in SetXmlSerializerContract which is only referenced from the
- // code injected by MainMethodInjector transform
- // there's probably also a way to do this via [DependencyReductionRoot],
- // but I can't get the compiler to find that...
- if (xmlSerializerContract == null)
- SetXmlSerializerContract(null);
-
- // this method body used to be rewritten by an IL transform
- // with the restructuring for multi-file, it has become a regular method
- return xmlSerializerContract;
- }
-
- public static void SetXmlSerializerContract(XmlSerializerImplementation xmlSerializerImplementation)
- {
- xmlSerializerContract = xmlSerializerImplementation;
}
-#endif
public static string GetXmlSerializerAssemblyName(Type type)
{
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#if !FEATURE_SERIALIZATION_UAPAOT
namespace System.Xml.Serialization
{
using System.IO;
}
}
}
-#endif
}
}
- // This method is marked Removable because WebRequest has a lot of dependencies that will bloat
- // self-contained distributions of .NET Apps.
// This code is statically reachable from any place that uses XmlReaderSettings (i.e. every app that
// does something XML related is going to have this in their transitive call graph). People rarely need
// this functionality though.
- [RemovableFeature("System.Xml.XmlUrlResolver.NonFileUrlSupport")]
private static WebRequest CreateWebRequestOrThrowIfRemoved(Uri uri, ICredentials credentials, IWebProxy proxy,
RequestCachePolicy cachePolicy)
{
<Compile Include="$(TestSourceFolder)..\XmlSerializerTests.cs" />
<Compile Include="$(TestSourceFolder)..\XmlSerializerTests.RuntimeOnly.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="$(TestSourceFolder)XmlSerializerTests.Internal.cs" />
<Compile Include="$(TestSourceFolder)XmlSerializerTests.RuntimeOnly.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-Compat issues with assembly System.Reflection.Primitives:
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.OpCode' in the contract but not the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.OpCode' does not implement interface 'System.IEquatable<System.Reflection.Emit.OpCode>' in the implementation but it does in the contract.
-TypeCannotChangeClassification : Type 'System.Reflection.Emit.OpCode' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-Total Issues: 3
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib" Condition="'$(TargetsNetFx)' == 'true'" />
- <ReferenceFromRuntime Include="System.Private.CoreLib" Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap' OR '$(TargetGroup)' == 'uapaot'" />
+ <ReferenceFromRuntime Include="System.Private.CoreLib" Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3' OR '$(TargetGroup)' == 'netstandard1.5'">
<Reference Include="System.Reflection" />
</None>
</ItemGroup>
<ItemGroup>
- <Compile Include="MemberInfoTests.CoreCLR.cs" />
- <Compile Include="ModuleTests.CoreCLR.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
+ <Compile Include="MemberInfoTests.cs" />
+ <Compile Include="ModuleTests.cs" />
</ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-Compat issues with assembly System.Reflection:
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeNamedArgument' in the contract but not the implementation.
-TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the contract but not the implementation.
-TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-Total Issues: 4
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UWP")]
public static void GetAssemblyName()
{
AssertExtensions.Throws<ArgumentNullException>("assemblyFile", () => AssemblyName.GetAssemblyName(null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "AssemblyName.GetAssemblyName() not supported on UWP")]
public static void GetAssemblyName_LockedFile()
{
using (var tempFile = new TempFile(Path.GetTempFileName(), 100))
Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_3, Version=1.1.1.1")));
- Constructor_String_LoadVersionTest_ReferenceVersionAssemblies();
- }
-
- [MethodImpl(MethodImplOptions.NoInlining)] // delay type loading so that the test above can run first
- private static void Constructor_String_LoadVersionTest_ReferenceVersionAssemblies()
- {
- // The purpose of this function is only to have a static reference to each of the test assemblies required by
- // Constructor_String_LoadVersionTest so that the compiler does not optimize away the project references and ILC can
- // include them in the closure. Otherwise, the test does not work on UapAot.
Assert.NotNull(typeof(AssemblyVersion.Program_0_0_0_0));
Assert.NotNull(typeof(AssemblyVersion.Program_1_0_0_0));
Assert.NotNull(typeof(AssemblyVersion.Program_1_1_0_0));
public AssemblyTests()
{
- // Assembly.Location not supported (properly) on uapaot.
+ // Assembly.Location does not return the file path for single-file deployment targets.
DestTestAssemblyPath = Path.Combine(base.TestDirectory, "TestAssembly.dll");
LoadFromTestPath = Path.Combine(base.TestDirectory, "System.Reflection.Tests.dll");
File.Copy(SourceTestAssemblyPath, DestTestAssemblyPath);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UWP")]
public void LoadFile()
{
Assembly currentAssembly = typeof(AssemblyTests).Assembly;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UWP")]
public void LoadFile_NoSuchPath_ThrowsArgumentException()
{
AssertExtensions.Throws<ArgumentException>("path", null, () => Assembly.LoadFile("System.Runtime.Tests.dll"));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UWP")]
public void AssemblyLoadFromBytes()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UWP")]
public void AssemblyLoadFromBytesNeg()
{
Assert.Throws<ArgumentNullException>(() => Assembly.Load((byte[])null));
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.Load(byte[]) not supported on UWP")]
public void AssemblyLoadFromBytesWithSymbols()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
Assert.Equal(assembly.FullName, loadedAssembly.FullName);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UWP")]
public void AssemblyReflectionOnlyLoadFromString()
{
AssemblyName an = typeof(AssemblyTests).Assembly.GetName();
Assert.Throws<NotSupportedException>(() => Assembly.ReflectionOnlyLoad(an.FullName));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UWP")]
public void AssemblyReflectionOnlyLoadFromBytes()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
Assert.Throws<NotSupportedException>(() => Assembly.ReflectionOnlyLoad(aBytes));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UapAot")]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.ReflectionOnlyLoad() not supported on UWP")]
public void AssemblyReflectionOnlyLoadFromNeg()
{
Assert.Throws<ArgumentNullException>(() => Assembly.ReflectionOnlyLoad((string)null));
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
- <Compile Include="AssemblyTests.CoreCLR.cs" />
+ <Compile Include="AssemblyTests.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\..\Common\tests\Data\TinyAssembly.dll">
<ProjectGuid>{F8C8FBFC-CA6E-4BDA-A1B3-FA4E17C10D9E}</ProjectGuid>
<Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
- <!-- Shared CoreCLR and .NET Native -->
+ <!-- Shared CoreCLR -->
<ItemGroup>
<Compile Include="System\Runtime\CompilerServices\Attributes.cs" />
</ItemGroup>
+++ /dev/null
-MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToNegativeInfinity' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToPositiveInfinity' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.MidpointRounding System.MidpointRounding.ToZero' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Numerics.BitOperations' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.IO.Path.EndsInDirectorySeparator(System.ReadOnlySpan<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.IO.Path.EndsInDirectorySeparator(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.IO.Path.TrimEndingDirectorySeparator(System.ReadOnlySpan<System.Char>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.IO.Path.TrimEndingDirectorySeparator(System.String)' does not exist in the implementation but it does exist in the contract.
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
- <GenFacadesIgnoreMissingTypes Condition="'$(TargetsAOT)'=='true' OR '$(TargetGroup)' == 'uap'">true</GenFacadesIgnoreMissingTypes>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<Link>Common\CoreLib\Interop\Windows\Interop.BOOL.cs</Link>
</Compile>
</ItemGroup>
- <!-- WINDOWS: Shared CoreCLR and .NET Native -->
+ <!-- WINDOWS: Shared CoreCLR -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\Runtime\Versioning\VersioningHelper.Windows.cs" />
<Compile Include="System\Diagnostics\Stopwatch.Windows.cs" />
<ProjectReference Include="..\..\System.Diagnostics.Debug\src\System.Diagnostics.Debug.csproj" />
<ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uapaot' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
<Reference Include="mscorlib" />
<Reference Include="Windows" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAOT)'=='true'">
- <ReferenceFromRuntime Include="System.Private.Interop" />
- </ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap' and '$(TargetGroup)' != 'uapaot'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap'">
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlGetVersion.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlGetVersion.cs</Link>
</Compile>
{
if (null == s_osDescription)
{
-#if uap || uapaot // all these are subject to WACK
+#if uap // all these are subject to WACK
s_osDescription = "Microsoft Windows";
#else
s_osDescription = Interop.NtDll.RtlGetVersion();
{
public static partial class RuntimeInformation
{
-#if uapaot
- private const string FrameworkName = ".NET Native";
-#else // uap || netcoreapp
private const string FrameworkName = ".NET Core";
-#endif
-
private static string s_frameworkDescription;
public static string FrameworkDescription
<Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <ReferenceFromRuntime Include="System.Private.Interop" Condition="'$(TargetGroup)' == 'uapaot'" />
<ReferenceFromRuntime Include="System.Private.CoreLib" Condition="'$(TargetsWindows)'=='true'" />
<Reference Include="System.Resources.ResourceManager" Condition="'$(TargetsWindows)'!='true'" />
<Reference Include="System.Runtime" Condition="'$(TargetsWindows)'!='true'" />
+++ /dev/null
-Compat issues with assembly System.Runtime.InteropServices:
-CannotRemoveBaseTypeOrInterface : Type 'System.IO.UnmanagedMemoryStream' does not inherit from base type 'System.MarshalByRefObject' in the implementation but it does in the contract.
-TypesMustExist : Type 'System.Runtime.InteropServices.DllImportResolver' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateGuidForType(System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateProgIdForType(System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetComObjectData(System.Object, System.Object)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Module)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetIDispatchForObject(System.Object)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(System.IntPtr, System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.PtrToStringUTF8(System.IntPtr)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.PtrToStringUTF8(System.IntPtr, System.Int32)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.SetComObjectData(System.Object, System.Object, System.Object)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.StringToCoTaskMemUTF8(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.ZeroFreeCoTaskMemUTF8(System.IntPtr)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.UnmanagedType System.Runtime.InteropServices.UnmanagedType.LPUTF8Str' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetExceptionPointers()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetEndComSlot(System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.IsTypeVisibleFromCom(System.Type)' does not exist in the implementation but it does exist in the contract.
-TypeCannotChangeClassification : Type 'System.Runtime.InteropServices.HandleRef' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-TypesMustExist : Type 'System.Runtime.InteropServices.NativeLibrary' does not exist in the implementation but it does exist in the contract.
-Total Issues: 19
<AssemblyName>System.Runtime.InteropServices</AssemblyName>
<OutputType>Library</OutputType>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <GenFacadesIgnoreMissingTypes Condition="'$(TargetsAOT)' == 'true'">true</GenFacadesIgnoreMissingTypes>
- <NoWarn Condition="'$(TargetsAOT)' == 'true'">$(NoWarn);0436;3001</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</Compile>
<Compile Include="System\Runtime\CompilerServices\IDispatchConstantAttribute.cs" />
<Compile Include="System\Runtime\CompilerServices\IUnknownConstantAttribute.cs" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\ADVF.cs" Condition="'$(TargetsAOT)' != 'true'" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\DATADIR.cs" Condition="'$(TargetsAOT)' != 'true'" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\DVASPECT.cs" Condition="'$(TargetsAOT)' != 'true'" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\FORMATETC.cs" Condition="'$(TargetsAOT)' != 'true'" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\IAdviseSink.cs" Condition="'$(TargetsAOT)' != 'true'" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\ADVF.cs" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\DATADIR.cs" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\DVASPECT.cs" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\FORMATETC.cs" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\IAdviseSink.cs" />
<Compile Include="System\Runtime\InteropServices\ComTypes\IDataObject.cs" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\IEnumFormatETC.cs" Condition="'$(TargetsAOT)' != 'true'" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\IEnumFormatETC.cs" />
<Compile Include="System\Runtime\InteropServices\ComTypes\IEnumSTATDATA.cs" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\STATDATA.cs" Condition="'$(TargetsAOT)' != 'true'" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs" Condition="'$(TargetsAOT)' != 'true'" />
- <Compile Include="System\Runtime\InteropServices\ComTypes\TYMED.cs" Condition="'$(TargetsAOT)' != 'true'" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\STATDATA.cs" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs" />
+ <Compile Include="System\Runtime\InteropServices\ComTypes\TYMED.cs" />
<Compile Include="System\Runtime\InteropServices\AssemblyRegistrationFlags.cs" />
<Compile Include="System\Runtime\InteropServices\AutomationProxyAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ComAliasNameAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ComRegisterFunctionAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ComUnregisterFunctionAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\ExporterEventKind.cs" />
- <Compile Include="System\Runtime\InteropServices\HandleCollector.cs" Condition="'$(TargetsAOT)' != 'true'" />
+ <Compile Include="System\Runtime\InteropServices\HandleCollector.cs" />
<Compile Include="System\Runtime\InteropServices\IDispatchImplAttribute.cs" />
<Compile Include="System\Runtime\InteropServices\IDispatchImplType.cs" />
<Compile Include="System\Runtime\InteropServices\IMarshal.cs" />
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<ProjectReference Include="..\..\System.Runtime.Extensions\src\System.Runtime.Extensions.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsAOT)' == 'true'">
- <ReferenceFromRuntime Include="System.Private.Interop" />
- <ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj">
- <TargetGroup>$(TargetGroup)</TargetGroup>
- </ProjectReference>
- </ItemGroup>
</Project>
Assert.Throws<PlatformNotSupportedException>(() => Marshal.BindToMoniker(null));
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))]
+ [Theory]
[PlatformSpecific(TestPlatforms.Windows)]
[InlineData(null)]
[InlineData("")]
yield return new object[] { d };
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))]
+ [Theory]
[PlatformSpecific(TestPlatforms.Windows)]
[MemberData(nameof(ChangeWrapperHandleStrength_TestData))]
public void ChangeWrapperHandleStrength_ValidObject_Success(object otp)
Marshal.ChangeWrapperHandleStrength(otp, fIsWeak: false);
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))]
+ [Fact]
[PlatformSpecific(TestPlatforms.Windows)]
public void ChangeWrapperHandleStrength_NullObject_ThrowsArgumentNullException()
{
+++ /dev/null
-Compat issues with assembly System.Runtime.Loader:
-CannotMakeTypeAbstract : Type 'System.Runtime.Loader.AssemblyLoadContext' is abstract in the implementation but is not abstract in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext..ctor(System.Boolean)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext..ctor(System.String, System.Boolean)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_Resolving(System.Func<System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_ResolvingUnmanagedDll(System.Func<System.Reflection.Assembly, System.String, System.IntPtr>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.add_Unloading(System.Action<System.Runtime.Loader.AssemblyLoadContext>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.All.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Assemblies.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Default.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.GetAssemblyName(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(System.Reflection.Assembly)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.IsCollectible.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Load(System.Reflection.AssemblyName)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(System.Reflection.AssemblyName)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromNativeImagePath(System.String, System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(System.IO.Stream)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(System.IO.Stream, System.IO.Stream)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDll(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Name.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_Resolving(System.Func<System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_ResolvingUnmanagedDll(System.Func<System.Reflection.Assembly, System.String, System.IntPtr>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.remove_Unloading(System.Action<System.Runtime.Loader.AssemblyLoadContext>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.SetProfileOptimizationRoot(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.StartProfileOptimization(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.Unload()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection(System.Reflection.Assembly)' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Metadata.AssemblyExtensions' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Runtime.Loader.AssemblyDependencyResolver' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope' does not exist in the implementation but it does exist in the contract.
-Total Issues: 33
<PropertyGroup>
<AssemblyName>System.Runtime.Loader</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <GenFacadesIgnoreMissingTypes Condition="'$(TargetsAOT)'=='true'">true</GenFacadesIgnoreMissingTypes>
<ProjectGuid>{485A65F0-51C9-4B95-A7A8-A4860C231E67}</ProjectGuid>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ProjectReference Include="..\..\System.Collections.Concurrent\src\System.Collections.Concurrent.csproj" />
<ProjectReference Include="..\..\System.Collections.NonGeneric\src\System.Collections.NonGeneric.csproj" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\System.Runtime.Serialization.Formatters.rd.xml" />
- </ItemGroup>
</Project>
<Link>Common\System\ThreadCultureChange.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="BinaryFormatterTests.rd.xml" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Reference Include="System.Text.Json" />
</ItemGroup>
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using SerializationTypes.CoreCLR;
-using System;
-using System.IO;
-using System.Runtime.Serialization;
-using Xunit;
-
-public static partial class DataContractJsonSerializerTests
-{
- [Fact]
- public static void DCJS_DifferentCollectionsOfSameTypeAsKnownTypes()
- {
- Assert.Throws<InvalidOperationException>(() => {
- (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName());
- });
- }
-}
}
}
+ [Fact]
+ public static void DCJS_DifferentCollectionsOfSameTypeAsKnownTypes()
+ {
+ Assert.Throws<InvalidOperationException>(() => {
+ (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName());
+ });
+ }
+
private static T SerializeAndDeserialize<T>(T value, string baseline, DataContractJsonSerializerSettings settings = null, Func<DataContractJsonSerializer> serializerFactory = null, bool skipStringCompare = false)
{
DataContractJsonSerializer dcjs;
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Compile Include="$(TestSourceFolder)..\..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.cs" />
<Compile Include="$(TestSourceFolder)..\..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.RuntimeOnly.cs" />
- <Compile Include="$(TestSourceFolder)..\DataContractJsonSerializer.CoreCLR.cs" />
- <Compile Include="$(TestSourceFolder)..\..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.CoreCLR.cs" />
<Compile Include="$(TestSourceFolder)..\DataContractJsonSerializer.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
</PropertyGroup>
<ItemGroup>
<Compile Include="$(TestSourceFolder)DataContractJsonSerializer.cs" />
- <Compile Include="$(TestSourceFolder)DataContractJsonSerializer.CoreCLR.cs" />
- <Compile Include="$(TestSourceFolder)..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.CoreCLR.cs" />
<Compile Include="$(TestSourceFolder)..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.cs" />
<Compile Include="$(TestSourceFolder)..\..\System.Runtime.Serialization.Xml\tests\SerializationTypes.RuntimeOnly.cs" />
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using SerializationTypes.CoreCLR;
-using System;
-using System.IO;
-using System.Runtime.Serialization;
-using Xunit;
-
-public static partial class DataContractSerializerTests
-{
- [Fact]
- public static void DCS_DifferentCollectionsOfSameTypeAsKnownTypes()
- {
- Assert.Throws<InvalidOperationException>(() => {
- (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName());
- });
- }
-}
Assert.NotNull(actual);
}
+ [Fact]
+ public static void DCS_DifferentCollectionsOfSameTypeAsKnownTypes()
+ {
+ Assert.Throws<InvalidOperationException>(() => {
+ (new DataContractSerializer(typeof(TypeWithKnownTypesOfCollectionsWithConflictingXmlName))).WriteObject(new MemoryStream(), new TypeWithKnownTypesOfCollectionsWithConflictingXmlName());
+ });
+ }
+
private static T DeserializeString<T>(string stringToDeserialize, bool shouldReportDeserializationExceptions = true, DataContractSerializerSettings settings = null, Func<DataContractSerializer> serializerFactory = null)
{
DataContractSerializer dcs;
<Compile Include="$(TestSourceFolder)..\MyResolver.cs" />
<Compile Include="$(TestSourceFolder)..\XmlDictionaryReaderTests.cs" />
<Compile Include="$(TestSourceFolder)..\XmlDictionaryWriterTest.cs" />
- <Compile Include="$(TestSourceFolder)..\SerializationTypes.CoreCLR.cs" />
- <Compile Include="$(TestSourceFolder)..\DataContractSerializer.CoreCLR.cs" />
<Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
<Link>Common\System\IO\TempFile.cs</Link>
</Compile>
<Link>SerializationTestTypes\SelfRefAndCycles.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Collections.Generic;
-using System.Runtime.Serialization;
-
-namespace SerializationTypes.CoreCLR
-{
- [KnownType(typeof(List<SimpleType>))]
- [KnownType(typeof(SimpleType[]))]
- [DataContract]
- public class TypeWithKnownTypesOfCollectionsWithConflictingXmlName
- {
- [DataMember]
- public object Value1 = new List<SimpleType>();
-
- [DataMember]
- public object Value2 = new SimpleType[1];
-
- }
-}
public string StringField2;
}
+ [KnownType(typeof(List<SimpleType>))]
+ [KnownType(typeof(SimpleType[]))]
+ [DataContract]
+ public class TypeWithKnownTypesOfCollectionsWithConflictingXmlName
+ {
+ [DataMember]
+ public object Value1 = new List<SimpleType>();
+
+ [DataMember]
+ public object Value2 = new SimpleType[1];
+
+ }
}
public class TypeWithXmlElementProperty
<Compile Include="$(TestSourceFolder)SerializationTestTypes\DCRSampleType.cs" />
<Compile Include="$(TestSourceFolder)SerializationTestTypes\DCRTypeLibrary.cs" />
<Compile Include="$(TestSourceFolder)SerializationTestTypes\Primitives.cs" />
- <Compile Include="$(TestSourceFolder)SerializationTypes.CoreCLR.cs" />
- <Compile Include="$(TestSourceFolder)DataContractSerializer.CoreCLR.cs" />
<Compile Include="$(CommonTestPath)\System\IO\TempFile.cs">
<Link>Common\System\IO\TempFile.cs</Link>
</Compile>
<Compile Include="SerializationTestTypes\SampleTypes.cs" />
<Compile Include="SerializationTestTypes\SelfRefAndCycles.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="$(MsBuildThisFileDirectory)Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Reference Include="System.Runtime.WindowsRuntime" />
<Reference Include="System.Runtime.Extensions" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)'=='true'">
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetsNetStandard)' == 'true'">
<Reference Include="System.Runtime" />
<Reference Include="System.IO" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
<ClsCompliant>true</ClsCompliant>
- <IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'uapaot'">true</IsPartialFacadeAssembly>
<!-- CS1698 - Disable warning about reference to 4.0.0.0 System.Runtime.WindowsRuntime having same simple name as target assembly -->
<!-- CS0436 - System.Private.CoreLib has internals visible to System.Runtime.WindowsRuntime and is colliding internals on common shared code -->
<NoWarn>$(NoWarn);1698;0436</NoWarn>
<ProjectGuid>{844A2A0B-4169-49C3-B367-AFDC4894E487}</ProjectGuid>
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.2-Debug;netstandard1.2-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)'=='netcoreapp' or '$(TargetGroup)'=='uap'">
+ <PropertyGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
<DefineConstants>$(DefineConstants);netstandard;FEATURE_APPX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetsNetStandard)' == 'true'">
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.0'">4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.2'">4.0.11.0</AssemblyVersion>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp' or '$(TargetGroup)'=='uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<Reference Include="mscorlib" />
<Reference Include="Windows" />
<ProjectReference Include="..\..\System.Runtime.InteropServices.WindowsRuntime\src\System.Runtime.InteropServices.WindowsRuntime.csproj" />
<ProjectReference Include="..\..\System.ObjectModel\src\System.ObjectModel.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uapaot'">
- <ReferenceFromRuntime Include="System.Private.Interop" />
- <ReferenceFromRuntime Include="System.Private.Corelib" />
- <Reference Include="Windows" />
- <Reference Include="mscorlib" />
- <ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj">
- <TargetGroup>uapaot</TargetGroup>
- </ProjectReference>
- <ProjectReference Include="..\..\System.Runtime.Extensions\src\System.Runtime.Extensions.csproj">
- <Aliases>System_Runtime_Extensions</Aliases>
- <TargetGroup>uapaot</TargetGroup>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNETCoreApp)'=='true' or '$(TargetGroup)'=='uap'">
- <Compile Include="System\InternalHelpers.CoreCLR.cs" />
- <Compile Include="System\IO\StreamOperationAsyncResult.CoreCLR.cs" />
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
+ <Compile Include="System\InternalHelpers.cs" />
+ <Compile Include="System\IO\StreamOperationAsyncResult.cs" />
<Compile Include="System\Runtime\InteropServices\WindowsRuntime\MarshalingHelpers.cs" />
- <Compile Include="System\Threading\Tasks\AsyncInfoToTaskBridge.CoreCLR.cs" />
+ <Compile Include="System\Threading\Tasks\AsyncInfoToTaskBridge.cs" />
<Compile Include="System\Threading\WindowsRuntimeSynchronizationContext.cs" />
- <Compile Include="System\WindowsRuntimeSystemExtensions.CoreCLR.cs" />
- <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.RoGetActivationFactory.cs">
- <Link>Common\Interop\Windows\Mincore\Interop.RoGetActivationFactory.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs">
- <Link>Common\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs</Link>
- </Compile>
+ <Compile Include="System\WindowsRuntimeSystemExtensions.cs" />
<Compile Include="System\Windows\Point.cs" />
<Compile Include="System\Windows\Rect.cs" />
<Compile Include="System\Windows\Size.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='uapaot'">
- <Compile Include="System\InternalHelpers.CoreRT.cs" />
- <Compile Include="System\IO\StreamOperationAsyncResult.CoreRT.cs" />
- <Compile Include="System\Threading\Tasks\AsyncInfoToTaskBridge.CoreRT.cs" />
- <Compile Include="System\WindowsRuntimeSystemExtensions.CoreRT.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNETCoreApp)'=='true' or '$(TargetsUAP)'=='true'">
- <Compile Include="$(CommonPath)\CoreLib\System\WinRTFolderPaths.cs">
- <Link>Common\System\WinRTFolderPaths.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.ResolveLocaleName.cs">
- <Link>Common\Interop\Windows\kernel32\Interop.ResolveLocaleName.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.FormatMessage.cs">
- <Link>Common\Interop\Windows\kernel32\Interop.FormatMessage.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.RoGetBufferMarshaler.cs">
- <Link>Common\Interop\Windows\Mincore\Interop.RoGetBufferMarshaler.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
- <Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Interop.Errors.cs">
- <Link>Common\Interop\Windows\Interop.Errors.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\CoreLib\System\IO\Win32Marshal.cs">
- <Link>Common\CoreLib\System\IO\Win32Marshal.cs</Link>
- </Compile>
<Compile Include="System\IO\HANDLE_ACCESS_OPTIONS.cs" />
<Compile Include="System\IO\HANDLE_CREATION_OPTIONS.cs" />
<Compile Include="System\IO\HANDLE_OPTIONS.cs" />
<Compile Include="System\IO\IStorageFolderHandleAccess.cs" />
<Compile Include="System\IO\IStorageItemHandleAccess.cs" />
<Compile Include="System\IO\NetFxToWinRtStreamAdapter.cs" />
- <Compile Include="System\IO\StreamOperationAsyncResult.cs" />
<Compile Include="System\IO\StreamOperationsImplementation.cs" />
<Compile Include="System\IO\WindowsRuntimeStorageExtensions.cs" />
<Compile Include="System\IO\WindowsRuntimeStreamExtensions.cs" />
<Compile Include="System\VoidTypeParameter.cs" />
<Compile Include="System\Windows\TokenizerHelper.cs" />
<Compile Include="System\Windows\UI\Color.cs" />
+ <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.RoGetActivationFactory.cs">
+ <Link>Common\Interop\Windows\Mincore\Interop.RoGetActivationFactory.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs">
+ <Link>Common\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\CoreLib\System\WinRTFolderPaths.cs">
+ <Link>Common\System\WinRTFolderPaths.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.ResolveLocaleName.cs">
+ <Link>Common\Interop\Windows\kernel32\Interop.ResolveLocaleName.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.FormatMessage.cs">
+ <Link>Common\Interop\Windows\kernel32\Interop.FormatMessage.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.RoGetBufferMarshaler.cs">
+ <Link>Common\Interop\Windows\Mincore\Interop.RoGetBufferMarshaler.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
+ <Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\Interop\Windows\Interop.Errors.cs">
+ <Link>Common\Interop\Windows\Interop.Errors.cs</Link>
+ </Compile>
+ <Compile Include="$(CommonPath)\CoreLib\System\IO\Win32Marshal.cs">
+ <Link>Common\CoreLib\System\IO\Win32Marshal.cs</Link>
+ </Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetStandard)' == 'true'">
<Reference Include="System.Runtime" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Internal.Runtime.InteropServices.WindowsRuntime;
-using System.Runtime.InteropServices.WindowsRuntime;
-
-namespace System.IO
-{
- internal partial class StreamOperationAsyncResult
- {
- private void ThrowWithIOExceptionDispatchInfo(Exception e)
- {
- WinRtIOHelper.NativeExceptionToIOExceptionInfo(ExceptionSupport.AttachRestrictedErrorInfo(_completedOperation.ErrorCode)).Throw();
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Internal.Interop;
-using System.Runtime.InteropServices.WindowsRuntime;
-
-namespace System.IO
-{
- internal partial class StreamOperationAsyncResult
- {
- private void ThrowWithIOExceptionDispatchInfo(Exception e)
- {
- WinRtIOHelper.NativeExceptionToIOExceptionInfo(_completedOperation.ErrorCode.AttachRestrictedErrorInfo()).Throw();
- }
- }
-}
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+using Internal.Runtime.InteropServices.WindowsRuntime;
using System.Diagnostics;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices.WindowsRuntime;
if (_userCompletionCallback != null)
_userCompletionCallback(this);
}
+
+ private void ThrowWithIOExceptionDispatchInfo(Exception e)
+ {
+ WinRtIOHelper.NativeExceptionToIOExceptionInfo(ExceptionSupport.AttachRestrictedErrorInfo(_completedOperation.ErrorCode)).Throw();
+ }
} // class StreamOperationAsyncResult
#endregion class StreamOperationAsyncResult
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.Runtime.InteropServices;
-
-namespace System
-{
- internal static class InternalHelpers
- {
- internal static void SetErrorCode(this Exception ex, int code)
- {
- InteropExtensions.SetExceptionErrorCode(ex, code);
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Internal.Interop;
-using Internal.Threading.Tasks;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using Windows.Foundation;
-
-namespace System.Threading.Tasks
-{
- /// <summary>Provides a bridge between IAsyncOperation* and Task.</summary>
- /// <typeparam name="TResult">Specifies the type of the result of the asynchronous operation.</typeparam>
- internal sealed class AsyncInfoToTaskBridge<TResult> : TaskCompletionSource<TResult>
- {
- /// <summary>The CancellationToken associated with this operation.</summary>
- private readonly CancellationToken _ct;
-
- /// <summary>A registration for cancellation that needs to be disposed of when the operation completes.</summary>
- private CancellationTokenRegistration _ctr;
-
- /// <summary>A flag set to true as soon as the completion callback begins to execute.</summary>
- private bool _completing;
-
- internal AsyncInfoToTaskBridge(CancellationToken cancellationToken)
- {
- if (AsyncCausalitySupport.LoggingOn)
- AsyncCausalitySupport.TraceOperationCreation(this.Task, "WinRT Operation as Task");
- AsyncCausalitySupport.AddToActiveTasks(this.Task);
-
- _ct = cancellationToken;
- }
-
- /// <summary>The synchronization object to use for protecting the state of this bridge.</summary>
- private object StateLock
- {
- get { return this; } // "this" isn't available publicly, so we can safely use it as a syncobj
- }
-
- /// <summary>Registers the async operation for cancellation.</summary>
- /// <param name="asyncInfo">The asynchronous operation.</param>
- internal void RegisterForCancellation(IAsyncInfo asyncInfo)
- {
- Debug.Assert(asyncInfo != null);
-
- try
- {
- if (_ct.CanBeCanceled && !_completing)
- { // benign race on m_completing... it's ok if it's not up-to-date.
- var ctr = _ct.Register(ai => ((IAsyncInfo)ai).Cancel(), asyncInfo); // delegate cached by compiler
-
- // The operation may already be completing by this time, in which case
- // we might need to dispose of our new cancellation registration here.
- bool disposeOfCtr = false;
- lock (StateLock)
- {
- if (_completing) disposeOfCtr = true;
- else _ctr = ctr; // under lock to avoid torn writes
- }
-
- if (disposeOfCtr)
- ctr.Unregister();
- }
- }
- catch (Exception ex)
- {
- // We do not want exceptions propagating out of the AsTask / GetAwaiter calls, as the
- // Completed handler will instead store the exception into the returned Task.
- // Such exceptions should cause the Completed handler to be invoked synchronously and thus the Task should already be completed.
-
- if (!base.Task.IsFaulted)
- {
- Debug.Fail($"Expected base task to already be faulted but found it in state {base.Task.Status}");
- base.TrySetException(ex);
- }
- }
- }
-
-
- /// <summary>Bridge to Completed handler on IAsyncAction.</summary>
- internal void CompleteFromAsyncAction(IAsyncAction asyncInfo, AsyncStatus asyncStatus)
- {
- Complete(asyncInfo, null, asyncStatus);
- }
-
-
- /// <summary>Bridge to Completed handler on IAsyncActionWithProgress{TProgress}.</summary>
- /// <typeparam name="TProgress">Specifies the type of progress notification data.</typeparam>
- internal void CompleteFromAsyncActionWithProgress<TProgress>(IAsyncActionWithProgress<TProgress> asyncInfo, AsyncStatus asyncStatus)
- {
- Complete(asyncInfo, null, asyncStatus);
- }
-
-
- /// <summary>Bridge to Completed handler on IAsyncOperation{TResult}.</summary>
- internal void CompleteFromAsyncOperation(IAsyncOperation<TResult> asyncInfo, AsyncStatus asyncStatus)
- {
- Complete(asyncInfo, ai => ((IAsyncOperation<TResult>)ai).GetResults(), asyncStatus); // delegate cached by compiler
- }
-
-
- /// <summary>Bridge to Completed handler on IAsyncOperationWithProgress{TResult,TProgress}.</summary>
- /// <typeparam name="TProgress">Specifies the type of progress notification data.</typeparam>
- internal void CompleteFromAsyncOperationWithProgress<TProgress>(IAsyncOperationWithProgress<TResult, TProgress> asyncInfo, AsyncStatus asyncStatus)
- {
- // delegate cached by compiler:
- Complete(asyncInfo, ai => ((IAsyncOperationWithProgress<TResult, TProgress>)ai).GetResults(), asyncStatus);
- }
-
-
- /// <summary>Completes the task from the completed asynchronous operation.</summary>
- /// <param name="asyncInfo">The asynchronous operation.</param>
- /// <param name="getResultsFunction">A function used to retrieve the TResult from the async operation; may be null.</param>
- /// <param name="asyncStatus">The status of the asynchronous operation.</param>
- private void Complete(IAsyncInfo asyncInfo, Func<IAsyncInfo, TResult> getResultsFunction, AsyncStatus asyncStatus)
- {
- if (asyncInfo == null)
- throw new ArgumentNullException(nameof(asyncInfo));
-
- AsyncCausalitySupport.RemoveFromActiveTasks(this.Task);
-
- try
- {
- Debug.Assert(asyncInfo.Status == asyncStatus,
- "asyncInfo.Status does not match asyncStatus; are we dealing with a faulty IAsyncInfo implementation?");
-
- // Assuming a correct underlying implementation, the task should not have been
- // completed yet. If it is completed, we shouldn't try to do any further work
- // with the operation or the task, as something is horked.
- bool taskAlreadyCompleted = Task.IsCompleted;
-
- Debug.Assert(!taskAlreadyCompleted, "Expected the task to not yet be completed.");
-
- if (taskAlreadyCompleted)
- throw new InvalidOperationException(SR.InvalidOperation_InvalidAsyncCompletion);
-
- // Clean up our registration with the cancellation token, noting that we're now in the process of cleaning up.
- CancellationTokenRegistration ctr;
- lock (StateLock)
- {
- _completing = true;
- ctr = _ctr; // under lock to avoid torn reads
- _ctr = default(CancellationTokenRegistration);
- }
- ctr.Unregister(); // It's ok if we end up unregistering a not-initialized registration; it'll just be a nop.
-
- try
- {
- // Find out how the async operation completed. It must be in a terminal state.
- bool terminalState = asyncStatus == AsyncStatus.Completed
- || asyncStatus == AsyncStatus.Canceled
- || asyncStatus == AsyncStatus.Error;
-
- Debug.Assert(terminalState, "The async operation should be in a terminal state.");
-
- if (!terminalState)
- throw new InvalidOperationException(SR.InvalidOperation_InvalidAsyncCompletion);
-
- // Retrieve the completion data from the IAsyncInfo.
- TResult result = default(TResult);
- Exception error = null;
- if (asyncStatus == AsyncStatus.Error)
- {
- error = asyncInfo.ErrorCode;
-
- // Defend against a faulty IAsyncInfo implementation:
- if (error == null)
- {
- Debug.Fail("IAsyncInfo.Status == Error, but ErrorCode returns a null Exception (implying S_OK).");
- error = new InvalidOperationException(SR.InvalidOperation_InvalidAsyncCompletion);
- }
- else
- {
- error = asyncInfo.ErrorCode.AttachRestrictedErrorInfo();
- }
- }
- else if (asyncStatus == AsyncStatus.Completed && getResultsFunction != null)
- {
- try
- {
- result = getResultsFunction(asyncInfo);
- }
- catch (Exception resultsEx)
- {
- // According to the WinRT team, this can happen in some egde cases, such as marshalling errors in GetResults.
- error = resultsEx;
- asyncStatus = AsyncStatus.Error;
- }
- }
-
- // Nothing to retrieve for a canceled operation or for a completed operation with no result.
-
- // Complete the task based on the previously retrieved results:
- bool success = false;
- switch (asyncStatus)
- {
- case AsyncStatus.Completed:
- if (AsyncCausalitySupport.LoggingOn)
- AsyncCausalitySupport.TraceOperationCompletedSuccess(this.Task);
- success = base.TrySetResult(result);
- break;
-
- case AsyncStatus.Error:
- Debug.Assert(error != null, "The error should have been retrieved previously.");
- success = base.TrySetException(error);
- break;
-
- case AsyncStatus.Canceled:
- success = base.TrySetCanceled(_ct.IsCancellationRequested ? _ct : new CancellationToken(true));
- break;
- }
-
- Debug.Assert(success, "Expected the outcome to be successfully transfered to the task.");
- }
- catch (Exception exc)
- {
- // This really shouldn't happen, but could in a variety of misuse cases
- // such as a faulty underlying IAsyncInfo implementation.
- Debug.Fail($"Unexpected exception in Complete: {exc}");
-
- if (AsyncCausalitySupport.LoggingOn)
- AsyncCausalitySupport.TraceOperationCompletedError(this.Task);
-
- // For these cases, store the exception into the task so that it makes its way
- // back to the caller. Only if something went horribly wrong and we can't store the exception
- // do we allow it to be propagated out to the invoker of the Completed handler.
- if (!base.TrySetException(exc))
- {
- Debug.Fail("The task was already completed and thus the exception couldn't be stored.");
- throw;
- }
- }
- }
- finally
- {
- // We may be called on an STA thread which we don't own, so make sure that the RCW is released right
- // away. Otherwise, if we leave it up to the finalizer, the apartment may already be gone.
- if (Marshal.IsComObject(asyncInfo))
- Marshal.ReleaseComObject(asyncInfo);
- }
- } // private void Complete(..)
- } // class AsyncInfoToTaskBridge<TResult, TProgress>
-} // namespace
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-using System.Threading;
-using Windows.Foundation;
-
-using Internal.Interop;
-using Internal.Threading.Tasks;
-
-namespace System
-{
- /// <summary>Provides extension methods in the System namespace for working with the Windows Runtime.<br />
- /// Currently contains:<br />
- /// <ul>
- /// <li>Extension methods for conversion between <code>Windows.Foundation.IAsyncInfo</code> and deriving generic interfaces
- /// and <code>System.Threading.Tasks.Task</code>.</li>
- /// <li>Extension methods for conversion between <code>System.Threading.Tasks.Task</code>
- /// and <code>Windows.Foundation.IAsyncInfo</code> and deriving generic interfaces.</li>
- /// </ul></summary>
- [CLSCompliant(false)]
- public static class WindowsRuntimeSystemExtensions
- {
- #region Converters from Windows.Foundation.IAsyncInfo (and interfaces that derive from it) to System.Threading.Tasks.Task
-
- #region Convenience Helpers
-
- private static void ConcatenateCancelTokens(CancellationToken source, CancellationTokenSource sink, Task concatenationLifetime)
- {
- Debug.Assert(sink != null);
-
- CancellationTokenRegistration ctReg = source.Register((state) => { ((CancellationTokenSource)state).Cancel(); },
- sink);
-
- concatenationLifetime.ContinueWith((_, state) => { ((CancellationTokenRegistration)state).Dispose(); },
- ctReg, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
- }
-
-
- private static void ConcatenateProgress<TProgress>(IAsyncActionWithProgress<TProgress> source, IProgress<TProgress> sink)
- {
- // This is separated out into a separate method so that we only pay the costs of compiler-generated closure if progress is non-null.
- source.Progress += new AsyncActionProgressHandler<TProgress>((_, info) => sink.Report(info));
- }
-
-
- private static void ConcatenateProgress<TResult, TProgress>(IAsyncOperationWithProgress<TResult, TProgress> source, IProgress<TProgress> sink)
- {
- // This is separated out into a separate method so that we only pay the costs of compiler-generated closure if progress is non-null.
- source.Progress += new AsyncOperationProgressHandler<TResult, TProgress>((_, info) => sink.Report(info));
- }
-
- #endregion Convenience Helpers
-
-
- #region Converters from IAsyncAction to Task
-
- /// <summary>Gets an awaiter used to await this asynchronous operation.</summary>
- /// <returns>An awaiter instance.</returns>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static TaskAwaiter GetAwaiter(this IAsyncAction source)
- {
- return AsTask(source).GetAwaiter();
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task AsTask(this IAsyncAction source)
- {
- return AsTask(source, CancellationToken.None);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="cancellationToken">The token used to request cancellation of the asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task AsTask(this IAsyncAction source, CancellationToken cancellationToken)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
-
- // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task:
- var wrapper = source as TaskToAsyncActionAdapter;
- if (wrapper != null && !wrapper.CompletedSynchronously)
- {
- Task innerTask = wrapper.Task;
- Debug.Assert(innerTask != null);
- Debug.Assert(innerTask.Status != TaskStatus.Created);
-
- if (!innerTask.IsCompleted)
- {
- // The race here is benign: If the task completes here, the concatination is useless, but not damaging.
- if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null)
- ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask);
- }
-
- return innerTask;
- }
-
- // Fast path to return a completed Task if the operation has already completed:
- switch (source.Status)
- {
- case AsyncStatus.Completed:
- return Task.CompletedTask;
-
- case AsyncStatus.Error:
- return Task.FromException(source.ErrorCode.AttachRestrictedErrorInfo());
-
- case AsyncStatus.Canceled:
- return Task.FromCanceled(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true));
- }
-
- // Benign race: source may complete here. Things still work, just not taking the fast path.
-
- // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task:
- var bridge = new AsyncInfoToTaskBridge<VoidValueTypeParameter>(cancellationToken);
- try
- {
- source.Completed = new AsyncActionCompletedHandler(bridge.CompleteFromAsyncAction);
- bridge.RegisterForCancellation(source);
- }
- catch
- {
- AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task);
- }
- return bridge.Task;
- }
-
- #endregion Converters from IAsyncAction to Task
-
-
- #region Converters from IAsyncOperation<TResult> to Task
-
- /// <summary>Gets an awaiter used to await this asynchronous operation.</summary>
- /// <returns>An awaiter instance.</returns>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static TaskAwaiter<TResult> GetAwaiter<TResult>(this IAsyncOperation<TResult> source)
- {
- return AsTask(source).GetAwaiter();
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task<TResult> AsTask<TResult>(this IAsyncOperation<TResult> source)
- {
- return AsTask(source, CancellationToken.None);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="cancellationToken">The token used to request cancellation of the asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task<TResult> AsTask<TResult>(this IAsyncOperation<TResult> source, CancellationToken cancellationToken)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
-
- // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task:
- var wrapper = source as TaskToAsyncOperationAdapter<TResult>;
- if (wrapper != null && !wrapper.CompletedSynchronously)
- {
- Task<TResult> innerTask = wrapper.Task as Task<TResult>;
- Debug.Assert(innerTask != null);
- Debug.Assert(innerTask.Status != TaskStatus.Created); // Is WaitingForActivation a legal state at this moment?
-
- if (!innerTask.IsCompleted)
- {
- // The race here is benign: If the task completes here, the concatination is useless, but not damaging.
- if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null)
- ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask);
- }
-
- return innerTask;
- }
-
- // Fast path to return a completed Task if the operation has already completed
- switch (source.Status)
- {
- case AsyncStatus.Completed:
- return Task.FromResult(source.GetResults());
-
- case AsyncStatus.Error:
- return Task.FromException<TResult>(source.ErrorCode.AttachRestrictedErrorInfo());
-
- case AsyncStatus.Canceled:
- return Task.FromCanceled<TResult>(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true));
- }
-
- // Benign race: source may complete here. Things still work, just not taking the fast path.
-
- // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task:
- var bridge = new AsyncInfoToTaskBridge<TResult>(cancellationToken);
- try
- {
- source.Completed = new AsyncOperationCompletedHandler<TResult>(bridge.CompleteFromAsyncOperation);
- bridge.RegisterForCancellation(source);
- }
- catch
- {
- AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task);
- }
- return bridge.Task;
- }
-
- #endregion Converters from IAsyncOperation<TResult> to Task
-
-
- #region Converters from IAsyncActionWithProgress<TProgress> to Task
-
- /// <summary>Gets an awaiter used to await this asynchronous operation.</summary>
- /// <returns>An awaiter instance.</returns>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static TaskAwaiter GetAwaiter<TProgress>(this IAsyncActionWithProgress<TProgress> source)
- {
- return AsTask(source).GetAwaiter();
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task AsTask<TProgress>(this IAsyncActionWithProgress<TProgress> source)
- {
- return AsTask(source, CancellationToken.None, null);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="cancellationToken">The token used to request cancellation of the asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task AsTask<TProgress>(this IAsyncActionWithProgress<TProgress> source, CancellationToken cancellationToken)
- {
- return AsTask(source, cancellationToken, null);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="progress">The progress object used to receive progress updates.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task AsTask<TProgress>(this IAsyncActionWithProgress<TProgress> source, IProgress<TProgress> progress)
- {
- return AsTask(source, CancellationToken.None, progress);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="cancellationToken">The token used to request cancellation of the asynchronous operation.</param>
- /// <param name="progress">The progress object used to receive progress updates.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task AsTask<TProgress>(this IAsyncActionWithProgress<TProgress> source,
- CancellationToken cancellationToken, IProgress<TProgress> progress)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
-
- // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task:
- var wrapper = source as TaskToAsyncActionWithProgressAdapter<TProgress>;
- if (wrapper != null && !wrapper.CompletedSynchronously)
- {
- Task innerTask = wrapper.Task;
- Debug.Assert(innerTask != null);
- Debug.Assert(innerTask.Status != TaskStatus.Created); // Is WaitingForActivation a legal state at this moment?
-
- if (!innerTask.IsCompleted)
- {
- // The race here is benign: If the task completes here, the concatinations are useless, but not damaging.
-
- if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null)
- ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask);
-
- if (progress != null)
- ConcatenateProgress(source, progress);
- }
-
- return innerTask;
- }
-
- // Fast path to return a completed Task if the operation has already completed:
- switch (source.Status)
- {
- case AsyncStatus.Completed:
- return Task.CompletedTask;
-
- case AsyncStatus.Error:
- return Task.FromException(source.ErrorCode.AttachRestrictedErrorInfo());
-
- case AsyncStatus.Canceled:
- return Task.FromCanceled(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true));
- }
-
- // Benign race: source may complete here. Things still work, just not taking the fast path.
-
- // Forward progress reports:
- if (progress != null)
- ConcatenateProgress(source, progress);
-
- // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task:
- var bridge = new AsyncInfoToTaskBridge<VoidValueTypeParameter>(cancellationToken);
- try
- {
- source.Completed = new AsyncActionWithProgressCompletedHandler<TProgress>(bridge.CompleteFromAsyncActionWithProgress);
- bridge.RegisterForCancellation(source);
- }
- catch
- {
- AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task);
- }
- return bridge.Task;
- }
-
- #endregion Converters from IAsyncActionWithProgress<TProgress> to Task
-
-
- #region Converters from IAsyncOperationWithProgress<TResult,TProgress> to Task
-
- /// <summary>Gets an awaiter used to await this asynchronous operation.</summary>
- /// <returns>An awaiter instance.</returns>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static TaskAwaiter<TResult> GetAwaiter<TResult, TProgress>(this IAsyncOperationWithProgress<TResult, TProgress> source)
- {
- return AsTask(source).GetAwaiter();
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <returns>The Task representing the started asynchronous operation.</returns>
- public static Task<TResult> AsTask<TResult, TProgress>(this IAsyncOperationWithProgress<TResult, TProgress> source)
- {
- return AsTask(source, CancellationToken.None, null);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="cancellationToken">The token used to request cancellation of the asynchronous operation.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task<TResult> AsTask<TResult, TProgress>(this IAsyncOperationWithProgress<TResult, TProgress> source,
- CancellationToken cancellationToken)
- {
- return AsTask(source, cancellationToken, null);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="progress">The progress object used to receive progress updates.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task<TResult> AsTask<TResult, TProgress>(this IAsyncOperationWithProgress<TResult, TProgress> source,
- IProgress<TProgress> progress)
- {
- return AsTask(source, CancellationToken.None, progress);
- }
-
-
- /// <summary>Gets a Task to represent the asynchronous operation.</summary>
- /// <param name="source">The asynchronous operation.</param>
- /// <param name="cancellationToken">The token used to request cancellation of the asynchronous operation.</param>
- /// <param name="progress">The progress object used to receive progress updates.</param>
- /// <returns>The Task representing the asynchronous operation.</returns>
- public static Task<TResult> AsTask<TResult, TProgress>(this IAsyncOperationWithProgress<TResult, TProgress> source,
- CancellationToken cancellationToken, IProgress<TProgress> progress)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
-
- // If source is actually a NetFx-to-WinRT adapter, unwrap it instead of creating a new Task:
- var wrapper = source as TaskToAsyncOperationWithProgressAdapter<TResult, TProgress>;
- if (wrapper != null && !wrapper.CompletedSynchronously)
- {
- Task<TResult> innerTask = wrapper.Task as Task<TResult>;
- Debug.Assert(innerTask != null);
- Debug.Assert(innerTask.Status != TaskStatus.Created); // Is WaitingForActivation a legal state at this moment?
-
- if (!innerTask.IsCompleted)
- {
- // The race here is benign: If the task completes here, the concatinations are useless, but not damaging.
-
- if (cancellationToken.CanBeCanceled && wrapper.CancelTokenSource != null)
- ConcatenateCancelTokens(cancellationToken, wrapper.CancelTokenSource, innerTask);
-
- if (progress != null)
- ConcatenateProgress(source, progress);
- }
-
- return innerTask;
- }
-
- // Fast path to return a completed Task if the operation has already completed
- switch (source.Status)
- {
- case AsyncStatus.Completed:
- return Task.FromResult(source.GetResults());
-
- case AsyncStatus.Error:
- return Task.FromException<TResult>(source.ErrorCode.AttachRestrictedErrorInfo());
-
- case AsyncStatus.Canceled:
- return Task.FromCanceled<TResult>(cancellationToken.IsCancellationRequested ? cancellationToken : new CancellationToken(true));
- }
-
- // Benign race: source may complete here. Things still work, just not taking the fast path.
-
- // Forward progress reports:
- if (progress != null)
- ConcatenateProgress(source, progress);
-
- // Source is not a NetFx-to-WinRT adapter, but a native future. Hook up the task:
- var bridge = new AsyncInfoToTaskBridge<TResult>(cancellationToken);
- try
- {
- source.Completed = new AsyncOperationWithProgressCompletedHandler<TResult, TProgress>(bridge.CompleteFromAsyncOperationWithProgress);
- bridge.RegisterForCancellation(source);
- }
- catch
- {
- AsyncCausalitySupport.RemoveFromActiveTasks(bridge.Task);
- }
- return bridge.Task;
- }
-
- #endregion Converters from IAsyncOperationWithProgress<TResult,TProgress> to Task
-
- #endregion Converters from Windows.Foundation.IAsyncInfo (and interfaces that derive from it) to System.Threading.Tasks.Task
-
-
- #region Converters from System.Threading.Tasks.Task to Windows.Foundation.IAsyncInfo (and interfaces that derive from it)
-
-
- public static IAsyncAction AsAsyncAction(this Task source)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
-
- return new TaskToAsyncActionAdapter(source, underlyingCancelTokenSource: null);
- }
-
-
- public static IAsyncOperation<TResult> AsAsyncOperation<TResult>(this Task<TResult> source)
- {
- if (source == null)
- throw new ArgumentNullException(nameof(source));
-
- return new TaskToAsyncOperationAdapter<TResult>(source, underlyingCancelTokenSource: null);
- }
- #endregion Converters from System.Threading.Tasks.Task to Windows.Foundation.IAsyncInfo (and interfaces that derive from it)
-
- } // class WindowsRuntimeSystemExtensions
-} // namespace
-
-// WindowsRuntimeExtensions.cs
<ItemGroup>
<Reference Include="Windows" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-Compat issues with assembly System.Runtime:
-TypesMustExist : Type 'System.ArgIterator' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.GC.GetTotalAllocatedBytes(System.Boolean)' does not exist in the implementation but it does exist in the contract.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeNamedArgument' in the contract but not the implementation.
-TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeNamedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.CustomAttributeTypedArgument' in the contract but not the implementation.
-TypeCannotChangeClassification : Type 'System.Reflection.CustomAttributeTypedArgument' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-MembersMustExist : Member 'System.String System.Runtime.CompilerServices.RuntimeFeature.DefaultImplementationsOfInterfaces' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.AllowNullAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DisallowNullAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.MaybeNullAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Diagnostics.CodeAnalysis.NotNullWhenAttribute' does not exist in the implementation but it does exist in the contract.
-Total Issues: 16
<ProjectGuid>{56B9D0A9-44D3-488E-8B42-C14A6E30CAB2}</ProjectGuid>
<AssemblyName>System.Runtime</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <GenFacadesIgnoreMissingTypes Condition="'$(TargetsAOT)'=='true' OR '$(TargetGroup)' == 'uap'">true</GenFacadesIgnoreMissingTypes>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ProjectReference Include="TestModule\System.Reflection.TestModule.ilproj" />
<ProjectReference Include="TestStructs\System.TestStructs.ilproj" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
Assert.True(formatFExceptionName == nameof(InvalidOperationException) || formatFExceptionName == "ContractException");
}
-#if netcoreapp // .NetNative does not support RefEmit nor any other way to create Enum types with unusual backing types.
private static EnumBuilder GetNonRuntimeEnumTypeBuilder(Type underlyingType)
{
AssemblyBuilder assembly = AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Name"), AssemblyBuilderAccess.Run);
return enumBuilder.CreateTypeInfo().AsType();
}
-#endif //netcoreapp
}
}
}
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotNetNative))]
+ [Fact]
public static void DynamicCode_Jit()
{
Assert.True(RuntimeFeature.IsDynamicCodeSupported);
<Compile Include="SystemAcl\SystemAcl_SetAudit.cs" />
<Compile Include="Utils.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Compile Include="AesCcmTests.cs" />
<Compile Include="AesGcmTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
<Link>CommonTest\System\Security\Cryptography\AlgorithmImplementations\ECDiffieHellman\ECDiffieHellmanTests.Xml.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<Reference Include="System" />
<Reference Include="System.Security" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
<Compile Include="SecurityElementTests.cs" />
<Compile Include="TrustManagerContextTests.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
\ No newline at end of file
<EmbeddedResource Include="$(CommonTestPath)\Data\UnicodeData.12.1.txt">
<LogicalName>UnicodeData.12.1.txt</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
</Project>
\ No newline at end of file
/// <returns></returns>
public static IEnumerable<object[]> TransformRegexOptions(string testDataMethodName, int regexOptionsArrayIndex)
{
- // On Uap or NetNative the compiled feature isn't currently enabled,
+ // On UWP the compiled feature isn't currently enabled,
// therefore we don't need the additional test data.
if (PlatformDetection.IsUap)
{
<ProjectGuid>{6A07CCB8-3E59-47e7-B3DD-DB1F6FC501D5}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <GenFacadesIgnoreMissingTypes Condition="'$(TargetGroup)'=='uapaot'">true</GenFacadesIgnoreMissingTypes>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<DefineConstants Condition="'$(TargetGroup)' == 'netstandard1.0'">$(DefineConstants);USE_INTERNAL_CONCURRENT_COLLECTIONS</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' == 'netstandard1.0' OR '$(TargetGroup)' == 'netstandard1.1'">$(DefineConstants);USE_INTERNAL_THREADING</DefineConstants>
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8+wpa81</PackageTargetFramework>
- <!-- To allow DataflowEtwProvider events -->
- <BlockReflectionAttribute>false</BlockReflectionAttribute>
<Configurations>netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.1-Debug;netstandard1.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
+++ /dev/null
-Compat issues with assembly System.Threading.ThreadPool:
-MembersMustExist : Member 'System.Threading.ThreadPool.CompletedWorkItemCount.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Threading.ThreadPool.PendingWorkItemCount.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Threading.ThreadPool.ThreadCount.get()' does not exist in the implementation but it does exist in the contract.
+++ /dev/null
-Compat issues with assembly System.Threading:
-MembersMustExist : Member 'System.Threading.Monitor.LockContentionCount.get()' does not exist in the implementation but it does exist in the contract.
<Compile Include="TestEnlistments.cs" />
<Compile Include="TransactionTracingEventListener.cs" />
</ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
- </ItemGroup>
</Project>
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the http://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-
-namespace System.Xml.Linq
-{
- public partial class XElement
- {
- // Needed for serialization to correctly generate code to deserialize XElement on .NET Native
- internal XElement() { }
- }
-}
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.XDocument.cs" />
- <Compile Include="System.Xml.XDocument.Manual.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
+++ /dev/null
-Compat issues with assembly System.Xml.XmlSerializer:
-# Used by uap tooling for serializer generation
-MembersMustExist : Member 'System.String System.Xml.Serialization.XmlSerializer.DefaultNamespace' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'System.Xml.Serialization.XmlSerializer.Mode.get()' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'System.Xml.Serialization.XmlSerializer.Mode.set(System.Xml.Serialization.SerializationMode)' does not exist in the reference but it does exist in the implementation.
-MembersMustExist : Member 'System.Xml.Serialization.XmlSerializer.SetXmlSerializerContract(System.Xml.Serialization.XmlSerializerImplementation)' does not exist in the reference but it does exist in the implementation.
-
"CommonTypes": []
},
{
- "Name": "Microsoft.NETCore.Runtime.Native",
- "Description": "Support libraries for the .NET Core runtime used by .NETNative.",
- "CommonTypes": []
- },
- {
"Name": "Microsoft.NETCore.Targets",
"Description": "Provides supporting infrastructure for portable projects: support identifiers that define framework and runtime for support targets and packages that reference the minimum supported package versions when targeting these.",
"CommonTypes": []
+++ /dev/null
-Compat issues with assembly mscorlib:
-TypeCannotChangeClassification : Type 'System.RuntimeArgumentHandle' is a 'ref struct' in the implementation but is a 'struct' in the contract.
-TypeCannotChangeClassification : Type 'System.TypedReference' is a 'ref struct' in the implementation but is a 'struct' in the contract.
-TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract.
-Compat issues with assembly netstandard:
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.RuntimeArgumentHandle' is a 'ref struct' in the implementation but is a 'struct' in the contract.
-TypeCannotChangeClassification : Type 'System.TypedReference' is a 'ref struct' in the implementation but is a 'struct' in the contract.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation.
-CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation.
-TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation.
-TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract.
-Compat issues with assembly System:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation.
-CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Event | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, Inherited=false, AllowMultiple=false)]' in the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation.
-Compat issues with assembly System.ComponentModel.EventBasedAsync:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation.
-Compat issues with assembly System.Core:
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract.
-Compat issues with assembly System.Diagnostics.Process:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-Compat issues with assembly System.Diagnostics.TraceSource:
-CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation.
-Compat issues with assembly System.DirectoryServices:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.DirectoryServices.DirectoryEntry' in the contract but not the implementation.
-Compat issues with assembly System.IO.FileSystem.Primitives:
-TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract.
-Compat issues with assembly System.IO.FileSystem.Watcher:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation.
-Compat issues with assembly System.Management:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Management.ManagementPath' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Management.ManagementQuery' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Management.ManagementScope' in the contract but not the implementation.
-Compat issues with assembly System.Runtime:
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract.
-Compat issues with assembly System.Runtime.Handles:
-TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract.
-Compat issues with assembly System.Security.Cryptography.OpenSsl:
-TypesMustExist : Type 'System.Security.Cryptography.DSAOpenSsl' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Security.Cryptography.ECDsaOpenSsl' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Security.Cryptography.RSAOpenSsl' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Security.Cryptography.SafeEvpPKeyHandle' does not exist in the implementation but it does exist in the contract.
-Compat issues with assembly System.Security.Cryptography.Pkcs:
-MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.Certificates.set(System.Security.Cryptography.X509Certificates.X509Certificate2Collection)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.SignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Security.Cryptography.Pkcs.CmsSigner.UnsignedAttributes.set(System.Security.Cryptography.CryptographicAttributeObjectCollection)' does not exist in the implementation but it does exist in the contract.
-Compat issues with assembly System.ComponentModel.TypeConverter:
-CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-Compat issues with assembly System.Xml.Schema:
-CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract.
-Compat issues with assembly System.Xml.ReaderWriter:
-CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract.
-Compat issues with assembly System.Data.Constraint:
-CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract.
-Total Issues: 130
\ No newline at end of file
+++ /dev/null
-Compat issues with assembly netstandard:
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.ComponentModel.BackgroundWorker' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' exists on 'System.Diagnostics.BooleanSwitch' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultPropertyAttribute' exists on 'System.Diagnostics.Process' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' exists on 'System.Diagnostics.TraceSwitch' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.ComponentModel.DefaultEventAttribute' exists on 'System.IO.FileSystemWatcher' in the contract but not the implementation.
-TypesMustExist : Type 'System.IO.Compression.BrotliDecoder' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.IO.Compression.BrotliEncoder' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.IO.Compression.BrotliStream' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Range.GetOffsetAndLength(System.Int32)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.AssemblyBuilder.SetEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetModule()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.GetToken()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.SetMethodBody(System.Byte[], System.Int32, System.Byte[], System.Collections.Generic.IEnumerable<System.Reflection.Emit.ExceptionHandler>, System.Collections.Generic.IEnumerable<System.Int32>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ConstructorBuilder.Signature.get()' does not exist in the implementation but it does exist in the contract.
-CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.EnumBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.CreateType()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.EnumBuilder.TypeToken.get()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.EventBuilder.GetEventToken()' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.EventToken' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.ExceptionHandler' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.FieldBuilder.GetToken()' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.FieldToken' does not exist in the implementation but it does exist in the contract.
-CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.GenericTypeParameterBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.Label' in the contract but not the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.Label' does not implement interface 'System.IEquatable<System.Reflection.Emit.Label>' in the implementation but it does in the contract.
-TypeCannotChangeClassification : Type 'System.Reflection.Emit.Label' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.CreateMethodBody(System.Byte[], System.Int32)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetModule()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.GetToken()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.SetMethodBody(System.Byte[], System.Int32, System.Byte[], System.Collections.Generic.IEnumerable<System.Reflection.Emit.ExceptionHandler>, System.Collections.Generic.IEnumerable<System.Int32>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.MethodBuilder.Signature.get()' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.MethodToken' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetArrayMethodToken(System.Type, System.String, System.Reflection.CallingConventions, System.Type, System.Type[])' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetConstructorToken(System.Reflection.ConstructorInfo)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetConstructorToken(System.Reflection.ConstructorInfo, System.Collections.Generic.IEnumerable<System.Type>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetFieldToken(System.Reflection.FieldInfo)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetMethodToken(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetMethodToken(System.Reflection.MethodInfo, System.Collections.Generic.IEnumerable<System.Type>)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Byte[], System.Int32)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetSignatureToken(System.Reflection.Emit.SignatureHelper)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetStringConstant(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.String)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.GetTypeToken(System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.IsTransient()' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.ModuleBuilder.SetUserEntryPoint(System.Reflection.MethodInfo)' does not exist in the implementation but it does exist in the contract.
-CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'System.Reflection.Emit.OpCode' in the contract but not the implementation.
-CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.OpCode' does not implement interface 'System.IEquatable<System.Reflection.Emit.OpCode>' in the implementation but it does in the contract.
-TypeCannotChangeClassification : Type 'System.Reflection.Emit.OpCode' is marked as readonly in the contract so it must also be marked readonly in the implementation.
-MembersMustExist : Member 'System.Reflection.Emit.ParameterBuilder.GetToken()' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.ParameterToken' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.PropertyBuilder.PropertyToken.get()' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.PropertyToken' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Reflection.Module, System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Runtime.InteropServices.CallingConvention, System.Type)' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.SignatureToken' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.StringToken' does not exist in the implementation but it does exist in the contract.
-CannotRemoveBaseTypeOrInterface : Type 'System.Reflection.Emit.TypeBuilder' does not inherit from base type 'System.Reflection.TypeInfo' in the implementation but it does in the contract.
-MembersMustExist : Member 'System.Reflection.Emit.TypeBuilder.TypeToken.get()' does not exist in the implementation but it does exist in the contract.
-TypesMustExist : Type 'System.Reflection.Emit.TypeToken' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(System.RuntimeMethodHandle, System.RuntimeTypeHandle[])' does not exist in the implementation but it does exist in the contract.
-CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Method, Inherited=false, AllowMultiple=false)]' in the implementation.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateGuidForType(System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GenerateProgIdForType(System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetComObjectData(System.Object, System.Object)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetHINSTANCE(System.Reflection.Module)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetIDispatchForObject(System.Object)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.GetTypedObjectForIUnknown(System.IntPtr, System.Type)' does not exist in the implementation but it does exist in the contract.
-MembersMustExist : Member 'System.Runtime.InteropServices.Marshal.SetComObjectData(System.Object, System.Object, System.Object)' does not exist in the implementation but it does exist in the contract.
-CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlAnyAttributeAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation.
-CannotChangeAttribute : Attribute 'System.AttributeUsageAttribute' on 'System.Xml.Serialization.XmlNamespaceDeclarationsAttribute' changed from '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]' in the contract to '[AttributeUsageAttribute(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple=false)]' in the implementation.
-CannotSealType : Type 'System.ComponentModel.BaseNumberConverter' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.ComponentModel.BaseNumberConverter..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.ComponentModel.BaseNumberConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotSealType : Type 'System.Xml.Schema.XmlSchemaDatatype' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Xml.Schema.XmlSchemaDatatype..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ChangeType(System.Object, System.Type, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.IsDerivedFrom(System.Xml.Schema.XmlSchemaDatatype)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ParseValue(System.String, System.Xml.XmlNameTable, System.Xml.IXmlNamespaceResolver)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TokenizedType.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.TypeCode.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.ValueType.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaDatatype.Variety.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotSealType : Type 'System.Xml.Schema.XmlSchemaGroupBase' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Xml.Schema.XmlSchemaGroupBase..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Xml.Schema.XmlSchemaGroupBase.Items.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotSealType : Type 'System.Data.Constraint' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Data.Constraint..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ConstraintName.set(System.String)' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.Table.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint.ToString()' is non-virtual in the implementation but is virtual in the contract.
-CannotMakeMemberNonVirtual : Member 'System.Data.Constraint._DataSet.get()' is non-virtual in the implementation but is virtual in the contract.
-CannotSealType : Type 'System.Linq.EnumerableExecutor' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Linq.EnumerableExecutor..ctor()' does not exist in the implementation but it does exist in the contract.
-CannotSealType : Type 'System.Linq.EnumerableQuery' is effectively (has a private constructor) sealed in the implementation but not sealed in the contract.
-MembersMustExist : Member 'System.Linq.EnumerableQuery..ctor()' does not exist in the implementation but it does exist in the contract.
-
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-TypeCannotChangeClassification : Type 'System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, TResult>' is a 'class' in the implementation but is a 'delegate' in the contract.
-CannotChangeAttribute : Attribute 'System.Diagnostics.SwitchLevelAttribute' on 'System.Diagnostics.BooleanSwitch' changed from '[SwitchLevelAttribute(typeof(bool))]' in the contract to '[SwitchLevelAttribute(typeof(Boolean))]' in the implementation.
-TypeCannotChangeClassification : Type 'System.IO.FileAttributes' is a 'class' in the implementation but is a 'struct' in the contract.
-TypeCannotChangeClassification : Type 'System.IO.HandleInheritability' is a 'class' in the implementation but is a 'struct' in the contract.
\ No newline at end of file