**Update pkg**
- If changing the target framework
- - Update `SupportedFramework` metadata on the ref ProjectReference to declare the set of concrete platforms you expect your library to support. (see [Specific platform mappings](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md#nuget)). Generally will be a combination of netcoreapp2.x, netfx46x, uap10.x, and/or `$(AllXamarinFrameworks)`.
+ - Update `SupportedFramework` metadata on the ref ProjectReference to declare the set of concrete platforms you expect your library to support. (see [Specific platform mappings](https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md#nuget)). Generally will be a combination of netcoreapp2.x, netfx46x, and/or `$(AllXamarinFrameworks)`.
- If assembly or package version is updated the package index needs to be updated by running
`dotnet msbuild <Library>/pkg/<Library>.pkgproj /t:UpdatePackageIndex`
### End goal
- CoreFx does not build any reference assemblies for NETStandard.
-- For every library in NETStandard.Library, the only configurations in CoreFx are framework-specific. EG: NETCoreApp1.2, UAP10.1
+- For every library in NETStandard.Library, the only configurations in CoreFx are framework-specific. EG: netcoreapp3.0, net472
- For every library in NETCore.App but not in NETStandard.Library there must be a framework-specific configuration for NETCoreApp1.2. Other configurations may exist to ship in a package, but those will not be built by folks building just NETCore.App.
-
-### Getting there (WIP)
-
-Folks still consume our current packages so we need to keep building those until we transition.
-
-1. Create a new NETCore.App package: Microsoft.Private.CoreFx.NETCore.App. This will be an identity package with every ref that targets NETCore.App and runtime-specific packages that have all runtime impl's that apply to NETCore.App.
-2. Filter the content of Microsoft.Private.CoreFx.NETCore.App to just the things that are part of NETCore, and their closure.
-3. Transition tests to use Microsoft.Private.CoreFx.NETCore.App.
-4. Delete packages for things that are only part of Microsoft.Private.CoreFx.NETCore.App and don't ship independently.
- - Delete configurations for libraries that are no longer used
- - As packages are deleted we'll need to opt-in to Microsoft.Private.CoreFx.NETCore.App in some way.
- - proposal:
- - each CSProj is evaluated for layout path in the context of all of its build configurations.
- - We'll determine applicability similar to how we do for pkgprojs to identify which config to binplace.
## Behind the scenes with build.cmd/sh
-- Setup tools (currently done in init-tools but will later be a boot-strap script in run.cmd/sh)
+- Setup tools (currently done in restore in build.cmd/sh)
- Restore external dependencies
- CoreCLR - Copy to `bin\runtime\$(BuildConfiguration)`
- Netstandard Library - Copy to `bin\ref\netstandard`
- - UAP - Copy to `bin\runtime\$(BuildConfiguration)`
- NetFx targeting pack - Copy to `bin\ref\netfx`
- Build targeting pack
- Build src\ref.builds which builds all references assembly projects. For reference assembly project information see [ref](#ref)
- Build src\src.builds which builds all the source library projects. For source library project information see [src](#src).
- Sign product
- Build src\sign.proj
-//**CONSIDER**: We should make this as part of the src.builds file instead of a separate project file.
## Behind the scenes with build-test.cmd/sh
- build-test.cmd cannot be ran successfully until build.cmd has been ran at least once for a `BuildConfiguration`.
# Build Pivots
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)
+- **Target Frameworks:** NetFx (aka Desktop), netstandard (aka dotnet/Portable), NETCoreApp (aka .NET Core)
- **Platform Runtimes:** NetFx (aka CLR/Desktop), CoreCLR, Mono
- **OS:** Windows_NT, Linux, OSX, FreeBSD, AnyOS
- **Flavor:** Debug, Release
## Individual build properties
The following are the properties associated with each build pivot
-- `$(TargetGroup) -> netstandard | netcoreapp | netfx | uap`
+- `$(TargetGroup) -> netstandard | netcoreapp | netfx`
//**CONSIDER**: naming netcoreappcorert something shorter maybe just corert.
- `$(OSGroup) -> Windows | Linux | OSX | FreeBSD | [defaults to running OS when empty]`
- `$(ConfigurationGroup) -> Release | [defaults to Debug when empty]`
netcoreapp-Windows_NT;
netcoreapp-Unix;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
<PropertyGroup>
```
## Supported full build configurations
- .NET Core latest on current OS (default) -> `netcoreapp-[RunningOS]`
- .NET Framework latest -> `netfx-Windows_NT`
-- UAP F5 -> `uap-Windows_NT`
## Project configurations for VS
For each unique configuration needed for a given library project a configuration entry separated by a ';' should be added to the project so it can be selected and built in VS and also clearly identify the various configurations.<BR/>
`$(TargetGroup)-$(OSGroup)-$(ConfigurationGroup)|$(Platform`
- Note that the majority of managed projects, currently all in corefx, $(Platform) is overridden to be AnyCPU.
-`<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>`
+`<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>`
####*Examples*
Project configurations with a unique implementation on Unix and Windows
```
Project configurations that are unique for a few different target frameworks and runtimes
```xml
-<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
```
## Updating Configurations
- `.CoreCLR.cs` - implementation specific to CoreCLR 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)
## Define naming convention
As mentioned in [Conventions for forked code](conventions-for-forked-code) `#ifdef`ing the code is the last resort as it makes code harder to maintain overtime. If we do need to use `#ifdef`'s we should use the following conventions:
The build configurations are generally defaulted based on where you are building (i.e. which OS or which architecture) but we have a few shortcuts for the individual properties that can be passed to the build scripts:
-- `-framework|-f` identifies the target framework for the build. It defaults to `netcoreapp` but possible values include `netcoreapp`, `netfx` or `uap`. (msbuild property `TargetGroup`)
+- `-framework|-f` identifies the target framework for the build. It defaults to `netcoreapp` but possible values include `netcoreapp` or `netfx`. (msbuild property `TargetGroup`)
- `-os` identifies the OS for the build. It defaults to the OS you are running on but possible values include `Windows_NT`, `Unix`, `Linux`, or `OSX`. (msbuild property `OSGroup`)
- `-configuration|-c Debug|Release` controls the optimization level the compilers use for the build. It defaults to `Debug`. (msbuild property `ConfigurationGroup`)
- `-arch` identifies the architecture for the build. It defaults to `x64` but possible values include `x64`, `x86`, `arm`, or `arm64`. (msbuild property `ArchGroup`)
```
build -framework netcoreapp
build -framework netfx
-build -framework uap
```
- Build only managed components and skip the native build
dotnet msbuild System.Net.NetworkInformation.csproj /p:OSGroup=Linux
```
-- Build project for uap (not if trying to build on non-windows you also need to specify OSGroup=Windows_NT)
-```
-dotnet msbuild System.Net.NetworkInformation.csproj /p:TargetGroup=uap
-```
-
- Build release version of library
```
dotnet msbuild System.Net.NetworkInformation.csproj /p:ConfigurationGroup=Release
Code coverage reports from the continuous integration system are available from the links on the front page of the corefx repo.
-### Building tests with UWP (Windows only)
-
-This will allow you to build and run against `uap`, the managed version of the UWP Framework subset, used when debugging UWP applications in Visual Studio:
-```cmd
-cd src\Microsoft.CSharp\tests
-dotnet msbuild /t:BuildAndTest /p:TargetGroup=uap
-```
-In this case, your test will get executed within the context of a wrapper UWP application, targeting the Managed uap.
-
-The CoreFX build and test suite is a work in progress, as are the [building and testing instructions](../README.md). The .NET Core team and the community are improving Linux and OS X support on a daily basis and are adding more tests for all platforms. See [CoreFX Issues](https://github.com/dotnet/corefx/issues) to find out about specific work items or report issues.
-
## Testing with private CoreCLR bits
Generally the CoreFx build system gets the CoreCLR from a NuGet package which gets pulled down and correctly copied to the various output directories by building '\eng\restore\runtime\runtime.depproj' which gets built as part of `build.cmd/sh`. For folks that want to do builds and test runs in corefx with a local private build of coreclr you can follow these steps:
| Windows x86_Release | netcoreapp | X | X |
| Windows x64_Debug | netcoreapp | X | X |
| Windows NETFX_x86_Release | netfx | X | X |
-| Windows UWP_CoreCLR_x64_Debug | uap | X | X |
| Linux x64_Release | netcoreapp | X | X |
| Linux arm64_Release | netcoreapp | X | X |
| Linux arm_Release | netcoreapp | X | |
## 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/)).
+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.
![](../images/portability_screenshot.png)
<SkipPackageFileCheck>true</SkipPackageFileCheck>
</File>
</ItemGroup>
-
- <Import Condition="'$(MSBuildProjectExtension)' == '.pkgproj'" Project="$(MSBuildThisFileDirectory)disableUap.targets" />
</Project>
<Project>
<!-- Add validation for netcoreapp5.0 to package build and testing -->
<ItemGroup>
- <DefaultValidateFramework Include="netcoreapp5.0">
- <RuntimeIDs>@(NETCoreApp30RIDs)</RuntimeIDs>
- </DefaultValidateFramework>
+ <DefaultValidateFramework Include="netcoreapp5.0" RuntimeIDs="@(NETCoreApp30RIDs)" />
+ <DefaultValidateFramework Remove="uap10.0.16300" />
</ItemGroup>
<!-- There are some packages where we require only one ref for a specific framework to be present. In order to avoid problems with this package when targetting
<UWPCompatible>true</UWPCompatible>
<CompatibleWith>netstandard1.4</CompatibleWith>
</TargetGroups>
- <TargetGroups Include="uap10.0.16299">
- <TargetFramework>uap10.0.16299</TargetFramework>
- <TargetFrameworkIdentifier>UAP</TargetFrameworkIdentifier>
- <TargetFrameworkVersion>10.0.16299</TargetFrameworkVersion>
- <UWPCompatible>true</UWPCompatible>
- <Imports>netcore50</Imports>
- <CompatibleWith>netstandard</CompatibleWith>
- </TargetGroups>
- <TargetGroups Include="uapvnext">
- <TargetFramework>$(UAPvNextTFM)</TargetFramework>
- <TargetFrameworkIdentifier>$(UAPvNextTFI)</TargetFrameworkIdentifier>
- <TargetFrameworkVersion>$(UAPvNextVersion)</TargetFrameworkVersion>
- <UWPCompatible>true</UWPCompatible>
- <Imports>uap10.0.16299</Imports>
- <CompatibleWith>netstandard2.1</CompatibleWith>
- </TargetGroups>
- <!-- uap is an alias for uapvNext any/coreclr runtime -->
- <TargetGroups Include="uap">
- <TargetFramework>$(UAPvNextTFM)</TargetFramework>
- <TargetFrameworkIdentifier>$(UAPvNextTFI)</TargetFrameworkIdentifier>
- <TargetFrameworkVersion>$(UAPvNextVersion)</TargetFrameworkVersion>
- <UWPCompatible>true</UWPCompatible>
- <Imports>uapvnext</Imports>
- <CompatibleWith>netstandard2.1</CompatibleWith>
- </TargetGroups>
<TargetGroups Include="netstandard1.0">
<TargetFramework>netstandard1.0</TargetFramework>
<!-- By default, netstandard libraries will be held to the UWP compatibility bar;
+++ /dev/null
-<Project>
- <Target Name="RemoveUapvNextContent"
- Condition="'$(KeepUAPContent)' != 'true'"
- DependsOnTargets="GetPackageReport"
- BeforeTargets="GenerateNuSpec">
- <ItemGroup>
- <PackageFile Remove="@(PackageFile)" Condition="'%(PackageFile.TargetFramework)' == '$(UAPvNextTFM)'" />
- <PackageFile Remove="@(PackageFile)" Condition="$([System.String]::new('%(PackageFile.TargetPath)').Contains('/$(UAPvNextTFM)'))" />
- <Dependency Remove="@(Dependency)" Condition="'%(Dependency.TargetFramework)' == '$(UAPvNextTFM)'" />
- </ItemGroup>
- </Target>
-</Project>
\ No newline at end of file
# Required: as part of the strategy matrix, the following variables should be defined
# _BuildConfig: Debug | Release
# _architecture: x64 | x86 | arm | arm64
- # _framework: (netcoreapp, netfx, uap, etc).
+ # _framework: (netcoreapp, netfx).
# _helixQueues: Windows.Amd64 (Only needed if submitToHelix -> true.) -- Queues should be separated by + if multiple.
# Required: empty | innerloop | outerloop | all
_BuildConfig: Release
_architecture: x86
_framework: netfx
- _helixQueues: $(uapNetfxQueues)
-
- UAP_x64_Debug:
- _BuildConfig: Debug
- _architecture: x64
- _framework: uap
- _helixQueues: $(uapNetfxQueues)
+ _helixQueues: $(netFxQueues)
# Full test matrix
${{ if eq(parameters.fullMatrix, 'true') }}:
_BuildConfig: Release
_architecture: x86
_framework: netfx
- _helixQueues: $(uapNetfxQueues)
+ _helixQueues: $(netFxQueues)
_skipPublishPackages: true # In NETFX leg we don't produce packages
NETFX_x64_Release:
_BuildConfig: Release
_architecture: x64
_framework: netfx
- _helixQueues: $(uapNetfxQueues)
+ _helixQueues: $(netFxQueues)
_skipPublishPackages: true # In NETFX leg we don't produce packages
- UAP_x64_Release:
- _BuildConfig: Release
- _architecture: x64
- _framework: uap
- _helixQueues: $(uapNetfxQueues)
- _skipPublishPackages: true # In UWP we don't produce packages
-
pool:
name: Hosted VS2017
variables:
- nanoQueues: "`(Windows.Nano.1809.Amd64.Open`)windows.10.amd64.serverrs5.open@mcr.microsoft.com/dotnet-buildtools/prereqs:nanoserver-1809-helix-amd64-61052b7-20190723211353"
- - uapNetfxQueues: Windows.10.Amd64.ClientRS5.Open
+ - netFxQueues: Windows.10.Amd64.ClientRS5.Open
- ${{ if eq(parameters.fullMatrix, 'false') }}:
- netcoreappWindowsQueues: Windows.7.Amd64.Open+Windows.81.Amd64.Open+Windows.10.Amd64.Client19H1.ES.Open
netcoreapp2.0;
netcoreapp3.0;
netcoreapp;
- uap10.0.16299;
</BuildConfigurations>
</PropertyGroup>
</Project>
<BinPlaceRuntime>true</BinPlaceRuntime>
<NETStandardVersion Condition="$(TargetFramework.StartsWith('netstandard'))">$(TargetFramework.SubString(11))</NETStandardVersion>
<NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
- <TargetsNetStandardLowerThan21 Condition="'$(TargetsNetStandard)' == 'true' AND '$(NETStandardVersion)' < 2.1">true</TargetsNetStandardLowerThan21>
+ <TargetsNetStandardLowerThan21 Condition="'$(TargetsNetStandard)' == 'true' and '$(NETStandardVersion)' < 2.1">true</TargetsNetStandardLowerThan21>
</PropertyGroup>
<!-- Ref binplacing for all configurations -->
<!-- This is to make sure that nothing unintended gets restored for netcoreapp. -->
<ItemGroup Condition="'$(TargetGroup)' != 'netcoreapp'">
- <!-- runtime dependency: System.Data.SqlClient uap10.0.16299 -->
<!-- runtime dependency: System.Diagnostics.PerformanceCounters netcoreapp2.0,net461 -->
- <PackageReference Include="System.Memory" Version="4.5.2" Condition="'$(TargetFramework)' == 'netcoreapp2.0' OR '$(TargetFramework)' == 'uap10.0.16299' OR '$(TargetsNetfx)' == 'true' OR ('$(TargetsNetStandard)' == 'true' AND '$(NETStandardVersion)' >= 1.1)" />
- <PackageReference Include="System.Numerics.Vectors" Version="4.5.0" Condition="'$(TargetsNetStandardLowerThan21)' == 'true' OR '$(TargetsNetfx)' == 'true'" />
- <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2" Condition="'$(TargetFramework)' == 'netcoreapp2.0' OR '$(TargetsNetfx)' == 'true' OR '$(TargetsNetStandard)' == 'true'" />
+ <PackageReference Include="System.Memory" Version="4.5.2" Condition="'$(TargetFramework)' == 'netcoreapp2.0' or '$(TargetsNetfx)' == 'true' or ('$(TargetsNetStandard)' == 'true' and '$(NETStandardVersion)' >= 1.1)" />
+ <PackageReference Include="System.Numerics.Vectors" Version="4.5.0" Condition="'$(TargetsNetStandardLowerThan21)' == 'true' or '$(TargetsNetfx)' == 'true'" />
+ <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.2" Condition="'$(TargetFramework)' == 'netcoreapp2.0' or '$(TargetsNetfx)' == 'true' or '$(TargetsNetStandard)' == 'true'" />
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" Condition="'$(TargetsNetStandard)' != 'true' OR '$(NETStandardVersion)' >= 2.0" />
+ <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.0.0" Condition="'$(TargetsNetStandard)' != 'true' or '$(NETStandardVersion)' >= 2.0" />
<!-- Only include the assets from the direct packages we reference in the output -->
<PackageToInclude Include="@(PackageReference)" />
</ItemGroup>
<!-- Build for all configurations -->
<ItemGroup>
<Project Condition="'$(BuildAllConfigurations)' == 'true'" Include="netcoreapp/netcoreapp.depproj" />
- <Project Condition="'$(BuildAllConfigurations)' == 'true'" Include="uap/uap.depproj" />
<Project Include="netstandard/netstandard.depproj" />
<Project Include="netfx/netfx.depproj" />
<Project Include="runtime/runtime.depproj" />
net471;
netfx;
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
netcoreapp3.0-Unix;
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap10.0.16299;
- uap;
mono;
</BuildConfigurations>
</PropertyGroup>
<RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
<NoWarn>$(NoWarn);NU1603;NU1605</NoWarn>
<SwapNativeForIL Condition="'$(SwapNativeForIL)' == '' AND ('$(ConfigurationGroup)' == 'Debug' OR '$(Coverage)' == 'true')">true</SwapNativeForIL>
- <!-- uap10.0.16299 is missing IL -->
- <SwapNativeForIL Condition="'$(TargetFramework)'=='uap10.0.16299'">false</SwapNativeForIL>
</PropertyGroup>
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<MicrosoftPrivateCorefxNETCoreAppVersion>4.6.0-rc2.19462.14</MicrosoftPrivateCorefxNETCoreAppVersion>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
- <!-- Following is version used in release/uwp6.0 -->
- <MicrosoftNETCoreRuntimeCoreCLRPackageVersion>2.1.0-b-uwp6-25707-02</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
- </PropertyGroup>
-
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsPackageVersion)" />
<PackageReference Include="transport.Microsoft.NETCore.Runtime.CoreCLR" Version="$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)" />
+++ /dev/null
-<Project>
-
- <!-- Retrieve the UAP Tools to the TestHost folder -->
- <Target Name="CopyUAPToolsToTestHost"
- Condition="'$(TargetGroup)' == 'uap' and '$(BuildAllConfigurations)' != 'true' and '$(DotNetBuildFromSource)' != 'true'"
- AfterTargets="Restore">
-
- <PropertyGroup>
- <UAPToolsFolder>$(NuGetPackageRoot)$(MicrosoftDotNetUapTestToolsPackageId)\$(MicrosoftDotNetUapTestToolsPackageVersion)\Tools\$(ArchGroup)</UAPToolsFolder>
- </PropertyGroup>
-
- <Error Condition="!Exists('$(UAPToolsFolder)')" Text="UAP Tools package not restored or missing assets." />
-
- <ItemGroup>
- <RunnerFolderContents Include="$(UAPToolsFolder)\Runner\**\*" />
- <LauncherFolderContents Include="$(UAPToolsFolder)\Launcher\**\*" />
- </ItemGroup>
-
- <Copy SourceFiles="@(RunnerFolderContents)"
- DestinationFolder="$(TestHostRootPath)Runner\%(RecursiveDir)"
- SkipUnchangedFiles="true" />
-
- <Copy SourceFiles="@(LauncherFolderContents)"
- DestinationFolder="$(TestHostRootPath)Launcher\%(RecursiveDir)"
- SkipUnchangedFiles="true" />
-
- </Target>
-
-</Project>
+++ /dev/null
-<Project>
- <PropertyGroup>
- <BuildConfigurations>
- uap10.0.16299;
- </BuildConfigurations>
- </PropertyGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <!-- This project restores and publishes the targeting pack for specific versions of UAP.
- With this, we are able to compile assemblies against shipped, stable versions of UAP. -->
- <PropertyGroup>
- <BinPlaceRef>true</BinPlaceRef>
- <NuGetDeploySourceItem>Reference</NuGetDeploySourceItem>
- <UAPPackageVersion>6.0.7</UAPPackageVersion>
- <TargetFramework>uap10.0.16299</TargetFramework>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
- <Version>$(UAPPackageVersion)</Version>
- </PackageReference>
- <!-- System.Reflection.Emit and System.Reflection.Emit.ILGeneration are needed for the closure of the implementation of System.Reflection.DispatchProxy.
- Because they are only available on the implementation, they won't be restored as part of the targeting pack, so adding package references to those
- as well. -->
- <PackageReference Include="System.Reflection.Emit">
- <Version>4.3.0</Version>
- </PackageReference>
- <PackageReference Include="System.Reflection.Emit.ILGeneration">
- <Version>4.3.0</Version>
- </PackageReference>
- <PackageToInclude Include="Microsoft.NETCore.UniversalWindowsPlatform" />
- <PackageToInclude Include="System.Reflection.Emit" />
- <PackageToInclude Include="System.Reflection.Emit.ILGeneration" />
- </ItemGroup>
-
- <ItemGroup>
- <!-- for all configurations this project provides refs for that configuration -->
- <BinPlaceConfiguration Include="$(Configuration)">
- <RefPath>$(RefPath)</RefPath>
- </BinPlaceConfiguration>
- </ItemGroup>
-</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp3.0;
netcoreapp;
- uap;
netstandard1.0;
</BuildConfigurations>
</PropertyGroup>
{
internal static partial class IpHlpApi
{
-#if !uap
[DllImport(Interop.Libraries.IpHlpApi, SetLastError = true)]
internal static extern uint if_nametoindex(string name);
-#else
- internal static uint if_nametoindex(string name) => 0;
-#endif
}
}
if (s_processName == null)
{
-#if uap
- // In UAP getting process infos is not supported and the only way to get the process name is through Process.GetCurrentProcess.ProcessName:
- // https://github.com/dotnet/corefx/blob/561f555830e4eaef1fa015796690915e6f4923da/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Uap.cs#L82
- s_processName = string.Empty;
-#else
using (var process = Process.GetCurrentProcess())
{
s_processName = process.ProcessName;
}
-#endif
}
return s_processName;
// We need to use Cookie.InternalSetName instead of the Cookie.set_Name wrapped in a try catch block, as
// Cookie.set_Name keeps the original name if the string is empty or null.
// Unfortunately this API is internal so we use reflection to access it. The method is cached for performance reasons.
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- MethodInfo method = typeof(Cookie).GetMethod("InternalSetName", flags);
+ MethodInfo method = typeof(Cookie).GetMethod("InternalSetName", BindingFlags.Instance | BindingFlags.NonPublic);
Debug.Assert(method != null, "We need to use an internal method named InternalSetName that is declared on Cookie.");
s_internalSetNameMethod = (Func<Cookie, string, bool>)Delegate.CreateDelegate(typeof(Func<Cookie, string, bool>), method);
}
if (s_isQuotedDomainField == null)
{
// TODO: #13607
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- FieldInfo field = typeof(Cookie).GetField("IsQuotedDomain", flags);
+ FieldInfo field = typeof(Cookie).GetField("IsQuotedDomain", BindingFlags.Instance | BindingFlags.NonPublic);
Debug.Assert(field != null, "We need to use an internal field named IsQuotedDomain that is declared on Cookie.");
s_isQuotedDomainField = field;
}
if (s_isQuotedVersionField == null)
{
// TODO: #13607
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- FieldInfo field = typeof(Cookie).GetField("IsQuotedVersion", flags);
+ FieldInfo field = typeof(Cookie).GetField("IsQuotedVersion", BindingFlags.Instance | BindingFlags.NonPublic);
Debug.Assert(field != null, "We need to use an internal field named IsQuotedVersion that is declared on Cookie.");
s_isQuotedVersionField = field;
}
}
public
-#if uap || NETCOREAPP || NETSTANDARD2_1
+#if NETCOREAPP || NETSTANDARD2_1
override
#endif
int GetByteCount(ReadOnlySpan<char> chars)
}
public
-#if uap || NETCOREAPP || NETSTANDARD2_1
+#if NETCOREAPP || NETSTANDARD2_1
override
#endif
int GetCharCount(ReadOnlySpan<byte> bytes)
return s_utf8Encoding.GetByteCount(s);
}
-#if uap || NETCOREAPP || NETSTANDARD2_1
+#if NETCOREAPP || NETSTANDARD2_1
public override int GetByteCount(ReadOnlySpan<char> chars)
{
return s_utf8Encoding.GetByteCount(chars);
}
}
-#if uap || NETCOREAPP || NETSTANDARD2_1
+#if NETCOREAPP || NETSTANDARD2_1
public override int GetCharCount(ReadOnlySpan<byte> bytes)
{
try
_offset += bitString.Length;
}
-#if uap || NETCOREAPP || NETSTANDARD2_1
+#if NETCOREAPP || NETSTANDARD2_1
/// <summary>
/// Write a Bit String value via a callback, with a tag UNIVERSAL 3.
/// </summary>
if (!clearWholeArray && clearSize != 0)
{
-#if uap || NETCOREAPP || NETSTANDARD2_1
+#if NETCOREAPP || NETSTANDARD2_1
CryptographicOperations.ZeroMemory(array.AsSpan(0, clearSize));
#else
Array.Clear(array, 0, clearSize);
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
This assembly is referenced from rid agnostic configurations therefore we can't make it RID specific
and instead use runtime checks.
-->
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\AdminHelpers.cs" />
<Compile Include="System\IO\FileCleanupTestBase.cs" />
<Compile Include="System\TestEnvironment.cs" />
<Compile Include="System\ThreadCultureChange.cs" />
- <Compile Include="System\Diagnostics\RemoteExecutorForUap.cs" />
<!-- We don't compile per but and instead use runtime platform checks. -->
<Compile Include="System\PlatformDetection.cs" />
<Compile Include="System\PlatformDetection.Unix.cs" />
</Compile>
</ItemGroup>
<ItemGroup>
- <PackageReference Include="Microsoft.DotNet.RemoteExecutor" Version="$(MicrosoftDotNetRemoteExecutorPackageVersion)" />
<PackageReference Include="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsPackageVersion)" />
<PackageReference Include="xunit.core" Version="$(XUnitPackageVersion)" ExcludeAssets="build" />
<PackageReference Include="xunit.assert" Version="$(XUnitPackageVersion)" />
+++ /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 Microsoft.DotNet.RemoteExecutor
-{
- /// <summary>
- /// Wraps <see cref="RemoteExecutor"/>, using it only when running on UAP, and otherwise
- /// invoking the action synchronously without any additional sandboxing.
- /// </summary>
- /// <remarks>
- /// This is a workaround for UAP's current behavior for CultureInfo.Current{UI}Culture,
- /// which is process-wide rather than thread-specific. When that behavior is fixed,
- /// all use of this type should be removable.
- /// </remarks>
- public static class RemoteExecutorForUap
- {
- public static RemoteInvokeHandle Invoke(Action action)
- {
- if (PlatformDetection.IsUap)
- {
- return RemoteExecutor.Invoke(action);
- }
-
- action();
- return new RemoteInvokeHandle(null, null);
- }
-
- public static RemoteInvokeHandle Invoke(Action<string> action, string arg)
- {
- if (PlatformDetection.IsUap)
- {
- return RemoteExecutor.Invoke(action, arg);
- }
-
- action(arg);
- return new RemoteInvokeHandle(null, null);
- }
-
- public static RemoteInvokeHandle Invoke(Action<string, string> action, string arg1, string arg2)
- {
- if (PlatformDetection.IsUap)
- {
- return RemoteExecutor.Invoke(action, arg1, arg2);
- }
-
- action(arg1, arg2);
- return new RemoteInvokeHandle(null, null);
- }
-
- public static RemoteInvokeHandle Invoke(Action<string, string, string> action, string arg1, string arg2, string arg3)
- {
- if (PlatformDetection.IsUap)
- {
- return RemoteExecutor.Invoke(action, arg1, arg2, arg3);
- }
-
- action(arg1, arg2, arg3);
- return new RemoteInvokeHandle(null, null);
- }
-
- public static RemoteInvokeHandle Invoke(Action<string, string, string, string> action, string arg1, string arg2, string arg3, string arg4)
- {
- if (PlatformDetection.IsUap)
- {
- return RemoteExecutor.Invoke(action, arg1, arg2, arg3, arg4);
- }
-
- action(arg1, arg2, arg3, arg4);
- return new RemoteInvokeHandle(null, null);
- }
-
- public static RemoteInvokeHandle Invoke(Func<string, string, string, string, string, int> func, string arg1, string arg2, string arg3, string arg4, string arg5)
- {
- if (PlatformDetection.IsUap)
- {
- return RemoteExecutor.Invoke(func, arg1, arg2, arg3, arg4, arg5);
- }
-
- func(arg1, arg2, arg3, arg4, arg5); // ignore return value for now, though it should really be marshaled out through the RemoteInvokeHandle
- return new RemoteInvokeHandle(null, null);
- }
- }
-}
// 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.Diagnostics;
-using System.IO;
using System.Runtime.InteropServices;
-using System.Text;
using System.Xml.Linq;
-using Xunit;
namespace System
{
// 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.Diagnostics;
using System.IO;
using System.Runtime.InteropServices;
-using System.Runtime.Versioning;
using System.Security;
-using System.Text;
using Microsoft.Win32;
using Xunit;
//
public static bool IsWindows => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
- public static bool IsUap => IsInAppContainer;
public static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase);
public static bool HasWindowsShell => IsWindows && IsNotWindowsServerCore && IsNotWindowsNanoServer && IsNotWindowsIoTCore;
public static bool IsWindows7 => IsWindows && GetWindowsVersion() == 6 && GetWindowsMinorVersion() == 1;
public static bool IsNotWindowsIoTCore => !IsWindowsIoTCore;
public static bool IsNotWindowsHomeEdition => !IsWindowsHomeEdition;
public static bool IsNotInAppContainer => !IsInAppContainer;
- public static bool IsWinRTSupported => IsWindows && !IsWindows7;
+ public static bool IsWinRTSupported => IsWindows && IsNotWindows7;
+ public static bool IsWinUISupported => IsWinRTSupported && IsNotWindows8x && IsNotWindowsNanoServer && IsNotWindowsServerCore && IsNotWindowsIoTCore;
public static bool IsNotWinRTSupported => !IsWinRTSupported;
public static bool IsSoundPlaySupported => IsWindows && IsNotWindowsNanoServer;
public static bool IsWindows10Version1903OrGreater => IsWindows &&
GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildNumber() >= 18362;
- // Windows OneCoreUAP SKU doesn't have httpapi.dll
- public static bool IsNotOneCoreUAP => !IsWindows ||
- File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "System32", "httpapi.dll"));
-
public static bool IsWindowsIoTCore
{
get
{
value = (string)Registry.GetValue(key, "InstallationType", defaultValue: "");
}
- catch (Exception e) when (e is SecurityException || e is InvalidCastException || e is PlatformNotSupportedException /* UAP */)
+ catch (Exception e) when (e is SecurityException || e is InvalidCastException)
{
}
// 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.Diagnostics;
using System.IO;
using System.Security;
using System.Runtime.InteropServices;
-using System.Text;
using System.Runtime.CompilerServices;
using Microsoft.Win32;
-using Xunit;
namespace System
{
public static bool IsArgIteratorNotSupported => !IsArgIteratorSupported;
public static bool Is32BitProcess => IntPtr.Size == 4;
- // Windows 10 Insider Preview Build 16215 introduced the necessary APIs for the UAP version of
- // ClientWebSocket.ReceiveAsync to consume partial message data as it arrives, without having to wait
- // for "end of message" to be signaled.
- public static bool ClientWebSocketPartialMessagesSupported => !IsUap || IsWindows10Version1709OrGreater;
-
public static bool IsDrawingSupported
{
get
if (IsWindows)
{
#endif
- return IsNotWindowsNanoServer && IsNotWindowsServerCore && !IsUap;
+ return IsNotWindowsNanoServer && IsNotWindowsServerCore;
#if NETCOREAPP
}
else if (IsOSX)
// System.Security.Cryptography.Xml.XmlDsigXsltTransform.GetOutput() relies on XslCompiledTransform which relies
// heavily on Reflection.Emit
- public static bool IsXmlDsigXsltTransformSupported => !PlatformDetection.IsUap;
+ public static bool IsXmlDsigXsltTransformSupported => !PlatformDetection.IsInAppContainer;
public static bool IsPreciseGcSupported => !IsMonoRuntime;
}
public static bool IsDomainJoinedMachine => !Environment.MachineName.Equals(Environment.UserDomainName, StringComparison.OrdinalIgnoreCase);
+ public static bool IsNotDomainJoinedMachine => !IsDomainJoinedMachine;
// Windows - Schannel supports alpn from win8.1/2012 R2 and higher.
// Linux - OpenSsl supports alpn from openssl 1.0.2 and higher.
// 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.Diagnostics;
-
namespace System
{
public static class TestEnvironment
using (Stream entrystream = entry.Open())
{
entrystream.Read(buffer, 0, buffer.Length);
-#if NETCOREAPP || uap
+#if NETCOREAPP
uint zipcrc = entry.Crc32;
Assert.Equal(CRC.CalculateCRC(buffer), zipcrc.ToString());
#endif
static Certificates()
{
Mutex mutex =
- PlatformDetection.IsUap ? new Mutex(initiallyOwned: false, "Local\\CoreFXTest.Configuration.Certificates.LoadPfxCertificate") : // UWP doesn't support Global mutexes
+ PlatformDetection.IsInAppContainer ? new Mutex(initiallyOwned: false, "Local\\CoreFXTest.Configuration.Certificates.LoadPfxCertificate") : // UWP doesn't support Global mutexes
PlatformDetection.IsWindows ? new Mutex(initiallyOwned: false, "Global\\CoreFXTest.Configuration.Certificates.LoadPfxCertificate") :
null;
using (mutex)
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>XmlCoreTest.Common</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncUtil.cs" />
[Fact]
public static void EndsWithMatchNonOrdinal_StringComparison()
{
- RemoteExecutorForUap.Invoke(() =>
+ string s = "dabc";
+ string value = "aBc";
+ Assert.False(s.EndsWith(value, StringComparison.Ordinal));
+ Assert.True(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
+
+ ReadOnlySpan<char> span = s.AsSpan();
+ ReadOnlySpan<char> spanValue = value.AsSpan();
+ Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
+ Assert.True(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
+
+ using (new ThreadCultureChange("el-GR"))
{
- string s = "dabc";
- string value = "aBc";
- Assert.False(s.EndsWith(value, StringComparison.Ordinal));
- Assert.True(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
+ s = "\u03b4\u03b1\u03b2\u03b3"; // \u03B4\u03B1\u03B2\u03B3
+ value = "\u03b1\u03b2\u03b3"; // \u03B1\u03B2\u03B3
- ReadOnlySpan<char> span = s.AsSpan();
- ReadOnlySpan<char> spanValue = value.AsSpan();
- Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
- Assert.True(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
+ Assert.True(s.EndsWith(value, StringComparison.CurrentCulture));
+ Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
- using (new ThreadCultureChange("el-GR"))
- {
- s = "\u03b4\u03b1\u03b2\u03b3"; // \u03B4\u03B1\u03B2\u03B3
- value = "\u03b1\u03b2\u03b3"; // \u03B1\u03B2\u03B3
+ span = s.AsSpan(); // \u03B4\u03B1\u03B2\u03B3
+ spanValue = value.AsSpan(); // \u03B1\u03B2\u03B3
- Assert.True(s.EndsWith(value, StringComparison.CurrentCulture));
- Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCulture));
+ Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
- span = s.AsSpan(); // \u03B4\u03B1\u03B2\u03B3
- spanValue = value.AsSpan(); // \u03B1\u03B2\u03B3
+ value = "\u03b1\u0392\u03b3"; // \u03B1\u0392\u03B3
+ Assert.False(s.EndsWith(value, StringComparison.CurrentCulture));
+ Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCulture));
- Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
+ spanValue = value.AsSpan(); // \u03B1\u0392\u03B3
+ Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture));
+ Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
+ }
- value = "\u03b1\u0392\u03b3"; // \u03B1\u0392\u03B3
- Assert.False(s.EndsWith(value, StringComparison.CurrentCulture));
- Assert.True(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ s = "\u03b4\u0069\u00df\u0049"; // \u03B4i\u00DFI
+ value = "\u0069\u0073\u0073\u0049"; // issI
- spanValue = value.AsSpan(); // \u03B1\u0392\u03B3
- Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture));
- Assert.True(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
- }
+ Assert.False(s.EndsWith(value, StringComparison.Ordinal));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCulture),
+ s.EndsWith(value, StringComparison.InvariantCulture));
+ Assert.Equal(
+ s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
+
+ span = s.AsSpan(); // \u03B4i\u00DFI
+ spanValue = value.AsSpan(); // issI
+
+ Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCulture),
+ span.EndsWith(spanValue, StringComparison.InvariantCulture));
+ Assert.Equal(
+ span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
- s = "\u03b4\u0069\u00df\u0049"; // \u03B4i\u00DFI
- value = "\u0069\u0073\u0073\u0049"; // issI
-
- Assert.False(s.EndsWith(value, StringComparison.Ordinal));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCulture),
- s.EndsWith(value, StringComparison.InvariantCulture));
- Assert.Equal(
- s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
- s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
-
- span = s.AsSpan(); // \u03B4i\u00DFI
- spanValue = value.AsSpan(); // issI
-
- Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCulture),
- span.EndsWith(spanValue, StringComparison.InvariantCulture));
- Assert.Equal(
- span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase),
- span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
-
- value = "\u0049\u0073\u0073\u0049"; // IssI
- Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
- Assert.False(s.EndsWith(value, StringComparison.InvariantCulture));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
- s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
-
- spanValue = value.AsSpan(); // IssI
- Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
- Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase),
- span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
- }).Dispose();
+ value = "\u0049\u0073\u0073\u0049"; // IssI
+ Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
+ Assert.False(s.EndsWith(value, StringComparison.InvariantCulture));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ s.ToString().EndsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
+
+ spanValue = value.AsSpan(); // IssI
+ Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
+ Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ span.ToString().EndsWith(spanValue.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
}
[Fact]
public static void EndsWithNoMatchNonOrdinal_StringComparison()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s = "dabc";
- string value = "aDc";
- Assert.False(s.EndsWith(value, StringComparison.Ordinal));
- Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
+ string s = "dabc";
+ string value = "aDc";
+ Assert.False(s.EndsWith(value, StringComparison.Ordinal));
+ Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
- ReadOnlySpan<char> span = s.AsSpan();
- ReadOnlySpan<char> spanValue = value.AsSpan();
- Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
- Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
+ ReadOnlySpan<char> span = s.AsSpan();
+ ReadOnlySpan<char> spanValue = value.AsSpan();
+ Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
+ Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
- using (new ThreadCultureChange("el-GR"))
- {
- s = "\u03b4\u03b1\u03b2\u03b3"; // \u03B4\u03B1\u03B2\u03B3
- value = "\u03b1\u03b4\u03b3"; // \u03B1\u03B4\u03B3
+ using (new ThreadCultureChange("el-GR"))
+ {
+ s = "\u03b4\u03b1\u03b2\u03b3"; // \u03B4\u03B1\u03B2\u03B3
+ value = "\u03b1\u03b4\u03b3"; // \u03B1\u03B4\u03B3
- Assert.False(s.EndsWith(value, StringComparison.CurrentCulture));
- Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.False(s.EndsWith(value, StringComparison.CurrentCulture));
+ Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
- span = s.AsSpan(); // \u03B4\u03B1\u03B2\u03B3
- spanValue = value.AsSpan(); // \u03B1\u03B4\u03B3
+ span = s.AsSpan(); // \u03B4\u03B1\u03B2\u03B3
+ spanValue = value.AsSpan(); // \u03B1\u03B4\u03B3
- Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture));
- Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
+ Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture));
+ Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
- value = "\u03b1\u0394\u03b3"; // \u03B1\u0394\u03B3
- Assert.False(s.EndsWith(value, StringComparison.CurrentCulture));
- Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ value = "\u03b1\u0394\u03b3"; // \u03B1\u0394\u03B3
+ Assert.False(s.EndsWith(value, StringComparison.CurrentCulture));
+ Assert.False(s.EndsWith(value, StringComparison.CurrentCultureIgnoreCase));
- spanValue = value.AsSpan(); // \u03B1\u0394\u03B3
- Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture));
- Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
- }
+ spanValue = value.AsSpan(); // \u03B1\u0394\u03B3
+ Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCulture));
+ Assert.False(span.EndsWith(spanValue, StringComparison.CurrentCultureIgnoreCase));
+ }
- s = "\u03b4\u0069\u00df\u0049"; // \u03B4i\u00DFI
- value = "\u0069\u03b4\u03b4\u0049"; // i\u03B4\u03B4I
+ s = "\u03b4\u0069\u00df\u0049"; // \u03B4i\u00DFI
+ value = "\u0069\u03b4\u03b4\u0049"; // i\u03B4\u03B4I
- Assert.False(s.EndsWith(value, StringComparison.Ordinal));
- Assert.False(s.EndsWith(value, StringComparison.InvariantCulture));
- Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
+ Assert.False(s.EndsWith(value, StringComparison.Ordinal));
+ Assert.False(s.EndsWith(value, StringComparison.InvariantCulture));
+ Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
- span = s.AsSpan(); // \u03B4i\u00DFI
- spanValue = value.AsSpan(); // i\u03B4\u03B4I
+ span = s.AsSpan(); // \u03B4i\u00DFI
+ spanValue = value.AsSpan(); // i\u03B4\u03B4I
- Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
- Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture));
- Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
+ Assert.False(span.EndsWith(spanValue, StringComparison.Ordinal));
+ Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture));
+ Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
- value = "\u0049\u03b4\u03b4\u0049"; // I\u03B4\u03B4I
- Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
- Assert.False(s.EndsWith(value, StringComparison.InvariantCulture));
- Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
+ value = "\u0049\u03b4\u03b4\u0049"; // I\u03B4\u03B4I
+ Assert.False(s.EndsWith(value, StringComparison.OrdinalIgnoreCase));
+ Assert.False(s.EndsWith(value, StringComparison.InvariantCulture));
+ Assert.False(s.EndsWith(value, StringComparison.InvariantCultureIgnoreCase));
- spanValue = value.AsSpan(); // I\u03B4\u03B4I
- Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
- Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture));
- Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
- }).Dispose();
+ spanValue = value.AsSpan(); // I\u03B4\u03B4I
+ Assert.False(span.EndsWith(spanValue, StringComparison.OrdinalIgnoreCase));
+ Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCulture));
+ Assert.False(span.EndsWith(spanValue, StringComparison.InvariantCultureIgnoreCase));
}
[Theory]
[MemberData(nameof(Equals_EncyclopaediaData))]
public void Equals_Encyclopaedia_ReturnsExpected(StringComparison comparison, bool expected)
{
- RemoteExecutorForUap.Invoke((comparisonString, expectedString) =>
- {
- string source = "encyclop\u00e6dia";
- string target = "encyclopaedia";
+ string source = "encyclop\u00e6dia";
+ string target = "encyclopaedia";
- using (new ThreadCultureChange("se-SE"))
- {
- StringComparison comparisonType = (StringComparison)Enum.Parse(typeof(StringComparison), comparisonString);
- Assert.Equal(bool.Parse(expectedString), string.Equals(source, target, comparisonType));
- Assert.Equal(bool.Parse(expectedString), source.AsSpan().Equals(target.AsSpan(), comparisonType));
- }
- }, comparison.ToString(), expected.ToString()).Dispose();
+ using (new ThreadCultureChange("se-SE"))
+ {
+ Assert.Equal(expected, string.Equals(source, target, comparison));
+ Assert.Equal(expected, source.AsSpan().Equals(target.AsSpan(), comparison));
+ }
}
[Theory]
[Fact]
public static void IndexOf_TurkishI_TurkishCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("tr-TR"))
{
- using (new ThreadCultureChange("tr-TR"))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- string value = "\u0130";
- Assert.Equal(19, s.IndexOf(value));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(19, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
-
- value = "\u0131";
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ string value = "\u0130";
+ Assert.Equal(19, s.IndexOf(value));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+
+ value = "\u0131";
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_TurkishI_InvariantCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- string value = "\u0130";
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ string value = "\u0130";
- Assert.Equal(19, s.IndexOf(value));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, s.IndexOf(value));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- value = "\u0131";
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ value = "\u0131";
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_TurkishI_EnglishUSCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- string value = "\u0130";
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ string value = "\u0130";
- value = "\u0130";
- Assert.Equal(19, s.IndexOf(value));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ value = "\u0130";
+ Assert.Equal(19, s.IndexOf(value));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(19, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- value = "\u0131";
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ value = "\u0131";
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_HungarianDoubleCompression_HungarianCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("hu-HU"))
{
- using (new ThreadCultureChange("hu-HU"))
- {
- string source = "dzsdzs";
- string target = "ddzs";
-
- /*
- There are differences between Windows and ICU regarding contractions.
- Windows has equal contraction collation weights, including case (target="Ddzs" same behavior as "ddzs").
- ICU has different contraction collation weights, depending on locale collation rules.
- If CurrentCultureIgnoreCase is specified, ICU will use 'secondary' collation rules
- which ignore the contraction collation weights (defined as 'tertiary' rules)
- */
- Assert.Equal(PlatformDetection.IsWindows ? 0 : -1, source.IndexOf(target));
- Assert.Equal(PlatformDetection.IsWindows ? 0 : -1, source.IndexOf(target, StringComparison.CurrentCulture));
-
- Assert.Equal(0, source.IndexOf(target, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(-1, source.IndexOf(target, StringComparison.Ordinal));
- Assert.Equal(-1, source.IndexOf(target, StringComparison.OrdinalIgnoreCase));
-
- ReadOnlySpan<char> span = source.AsSpan();
-
- Assert.Equal(PlatformDetection.IsWindows ? 0 : -1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCulture));
-
- Assert.Equal(0, span.IndexOf(target.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ string source = "dzsdzs";
+ string target = "ddzs";
+
+ /*
+ There are differences between Windows and ICU regarding contractions.
+ Windows has equal contraction collation weights, including case (target="Ddzs" same behavior as "ddzs").
+ ICU has different contraction collation weights, depending on locale collation rules.
+ If CurrentCultureIgnoreCase is specified, ICU will use 'secondary' collation rules
+ which ignore the contraction collation weights (defined as 'tertiary' rules)
+ */
+ Assert.Equal(PlatformDetection.IsWindows ? 0 : -1, source.IndexOf(target));
+ Assert.Equal(PlatformDetection.IsWindows ? 0 : -1, source.IndexOf(target, StringComparison.CurrentCulture));
+
+ Assert.Equal(0, source.IndexOf(target, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(-1, source.IndexOf(target, StringComparison.Ordinal));
+ Assert.Equal(-1, source.IndexOf(target, StringComparison.OrdinalIgnoreCase));
+
+ ReadOnlySpan<char> span = source.AsSpan();
+
+ Assert.Equal(PlatformDetection.IsWindows ? 0 : -1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCulture));
+
+ Assert.Equal(0, span.IndexOf(target.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_HungarianDoubleCompression_InvariantCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- string source = "dzsdzs";
- string target = "ddzs";
+ string source = "dzsdzs";
+ string target = "ddzs";
- Assert.Equal(-1, source.IndexOf(target));
- Assert.Equal(-1, source.IndexOf(target, StringComparison.CurrentCulture));
- Assert.Equal(-1, source.IndexOf(target, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(-1, source.IndexOf(target));
+ Assert.Equal(-1, source.IndexOf(target, StringComparison.CurrentCulture));
+ Assert.Equal(-1, source.IndexOf(target, StringComparison.CurrentCultureIgnoreCase));
- ReadOnlySpan<char> span = source.AsSpan();
- Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ ReadOnlySpan<char> span = source.AsSpan();
+ Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(-1, span.IndexOf(target.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_EquivalentDiacritics_EnglishUSCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- string s = "Exhibit a\u0300\u00C0";
- string value = "\u00C0";
-
- Assert.Equal(10, s.IndexOf(value));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
-
- value = "a\u0300"; // this diacritic combines with preceding character
- Assert.Equal(8, s.IndexOf(value));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(8, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(8, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ string s = "Exhibit a\u0300\u00C0";
+ string value = "\u00C0";
+
+ Assert.Equal(10, s.IndexOf(value));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+
+ value = "a\u0300"; // this diacritic combines with preceding character
+ Assert.Equal(8, s.IndexOf(value));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_EquivalentDiacritics_InvariantCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- string s = "Exhibit a\u0300\u00C0";
- string value = "\u00C0";
+ string s = "Exhibit a\u0300\u00C0";
+ string value = "\u00C0";
- CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
- Assert.Equal(10, s.IndexOf(value));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
+ Assert.Equal(10, s.IndexOf(value));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(10, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- value = "a\u0300"; // this diacritic combines with preceding character
- Assert.Equal(8, s.IndexOf(value));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ value = "a\u0300"; // this diacritic combines with preceding character
+ Assert.Equal(8, s.IndexOf(value));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(8, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_CyrillicE_EnglishUSCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- string s = "Foo\u0400Bar";
- string value = "\u0400";
-
- Assert.Equal(3, s.IndexOf(value));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(3, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(3, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
-
- value = "bar";
- Assert.Equal(-1, s.IndexOf(value));
- Assert.Equal(-1, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(-1, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(4, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ string s = "Foo\u0400Bar";
+ string value = "\u0400";
+
+ Assert.Equal(3, s.IndexOf(value));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+
+ value = "bar";
+ Assert.Equal(-1, s.IndexOf(value));
+ Assert.Equal(-1, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(-1, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(4, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_CyrillicE_InvariantCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- string s = "Foo\u0400Bar";
- string value = "\u0400";
+ string s = "Foo\u0400Bar";
+ string value = "\u0400";
- Assert.Equal(3, s.IndexOf(value));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(3, s.IndexOf(value));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(3, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- value = "bar";
- Assert.Equal(-1, s.IndexOf(value));
- Assert.Equal(-1, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ value = "bar";
+ Assert.Equal(-1, s.IndexOf(value));
+ Assert.Equal(-1, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ Assert.Equal(-1, span.IndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(4, span.IndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
[Theory]
[MemberData(nameof(Join_ObjectArray_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public static void Join_ObjectArray(string separator, object[] values, string expected)
{
Assert.Equal(expected, string.Join(separator, values));
[Fact]
public static void LastIndexOf_TurkishI_TurkishCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("tr-TR"))
{
- using (new ThreadCultureChange("tr-TR"))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- ReadOnlySpan<char> span = s.AsSpan();
- string value = "\u0130";
-
- Assert.Equal(19, s.LastIndexOf(value));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.Ordinal));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.OrdinalIgnoreCase));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan()));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
-
- value = "\u0131";
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.Ordinal));
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.OrdinalIgnoreCase));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.Ordinal));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ ReadOnlySpan<char> span = s.AsSpan();
+ string value = "\u0130";
+
+ Assert.Equal(19, s.LastIndexOf(value));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.OrdinalIgnoreCase));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan()));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+
+ value = "\u0131";
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.OrdinalIgnoreCase));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.Ordinal));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void LastIndexOf_TurkishI_InvariantCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- ReadOnlySpan<char> span = s.AsSpan();
- string value = "\u0130";
-
- Assert.Equal(19, s.LastIndexOf(value));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan()));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
-
- value = "\u0131";
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ ReadOnlySpan<char> span = s.AsSpan();
+ string value = "\u0130";
+
+ Assert.Equal(19, s.LastIndexOf(value));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan()));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+
+ value = "\u0131";
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void LastIndexOf_TurkishI_EnglishUSCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- ReadOnlySpan<char> span = s.AsSpan();
- string value = "\u0130";
-
- Assert.Equal(19, s.LastIndexOf(value));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan()));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
-
- value = "\u0131";
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
- Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ ReadOnlySpan<char> span = s.AsSpan();
+ string value = "\u0130";
+
+ Assert.Equal(19, s.LastIndexOf(value));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan()));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(19, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+
+ value = "\u0131";
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.LastIndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCulture));
+ Assert.Equal(10, span.LastIndexOf(value.AsSpan(), StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Theory]
[Fact]
public static void Test_ToLower_Culture()
{
- RemoteExecutorForUap.Invoke(() =>
+ foreach (object[] testdata in ToLower_Culture_TestData())
{
- foreach (object[] testdata in ToLower_Culture_TestData())
- {
- ToLower_Culture((string)testdata[0], (string)testdata[1], (CultureInfo)testdata[2]);
- }
- }).Dispose();
+ ToLower_Culture((string)testdata[0], (string)testdata[1], (CultureInfo)testdata[2]);
+ }
}
private static void ToLower_Culture(string input, string expected, CultureInfo culture)
[MemberData(nameof(ToUpper_TurkishI_TurkishCulture_MemberData))]
public static void ToUpper_TurkishI_TurkishCulture(string s, string expected)
{
- RemoteExecutorForUap.Invoke((str, expectedString) =>
+ using (new ThreadCultureChange("tr-TR"))
{
- using (new ThreadCultureChange("tr-TR"))
- {
- Assert.True(str.ToUpper().Equals(expectedString, StringComparison.Ordinal), "Actual: " + str.ToUpper());
+ Assert.True(s.ToUpper().Equals(expected, StringComparison.Ordinal), "Actual: " + s.ToUpper());
- Span<char> destination = new char[str.Length];
- Assert.Equal(str.Length, str.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
- Assert.Equal(expectedString, destination.ToString());
- }
- }, s.ToString(), expected.ToString()).Dispose();
+ Span<char> destination = new char[s.Length];
+ Assert.Equal(s.Length, s.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
+ Assert.Equal(expected, destination.ToString());
+ }
}
public static IEnumerable<object[]> ToUpper_TurkishI_EnglishUSCulture_MemberData() =>
[MemberData(nameof(ToUpper_TurkishI_EnglishUSCulture_MemberData))]
public static void ToUpper_TurkishI_EnglishUSCulture(string s, string expected)
{
- RemoteExecutorForUap.Invoke((str, expectedString) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(str.ToUpper().Equals(expectedString, StringComparison.Ordinal), "Actual: " + str.ToUpper());
+ Assert.True(s.ToUpper().Equals(expected, StringComparison.Ordinal), "Actual: " + s.ToUpper());
- Span<char> destination = new char[str.Length];
- Assert.Equal(str.Length, str.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
- Assert.Equal(expectedString, destination.ToString());
- }
- }, s.ToString(), expected.ToString()).Dispose();
+ Span<char> destination = new char[s.Length];
+ Assert.Equal(s.Length, s.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
+ Assert.Equal(expected, destination.ToString());
+ }
}
public static IEnumerable<object[]> ToUpper_TurkishI_InvariantCulture_MemberData() =>
[MemberData(nameof(ToUpper_TurkishI_InvariantCulture_MemberData))]
public static void ToUpper_TurkishI_InvariantCulture(string s, string expected)
{
- RemoteExecutorForUap.Invoke((str, expectedString) =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- Assert.True(str.ToUpper().Equals(expectedString, StringComparison.Ordinal));
+ Assert.True(s.ToUpper().Equals(expected, StringComparison.Ordinal));
- Span<char> destination = new char[str.Length];
- Assert.Equal(str.Length, str.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
- Assert.Equal(expectedString, destination.ToString());
- }
- }, s.ToString(), expected.ToString()).Dispose();
+ Span<char> destination = new char[s.Length];
+ Assert.Equal(s.Length, s.AsSpan().ToUpper(destination, CultureInfo.CurrentCulture));
+ Assert.Equal(expected, destination.ToString());
+ }
}
[Theory]
[Theory]
[MemberData(nameof(Compare_TestData))]
- public static void CompareTest(string aS1, string aS2, string aCultureName, bool aIgnoreCase, int aExpected)
+ public static void CompareTest(string s1, string s2, string cultureName, bool ignoreCase, int expected)
{
- const string nullPlaceholder = "<null>";
- RemoteExecutorForUap.Invoke((string s1, string s2, string cultureName, string bIgnoreCase, string iExpected) => {
- if (s1 == nullPlaceholder)
- s1 = null;
-
- if (s2 == nullPlaceholder)
- s2 = null;
-
- if (cultureName == nullPlaceholder)
- cultureName = null;
-
- bool ignoreCase = bool.Parse(bIgnoreCase);
- int expected = int.Parse(iExpected);
-
- CultureInfo ci = cultureName != null ? CultureInfo.GetCultureInfo(cultureName) : null;
- CompareOptions ignoreCaseOption = ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None;
+ CultureInfo ci = cultureName != null ? CultureInfo.GetCultureInfo(cultureName) : null;
+ CompareOptions ignoreCaseOption = ignoreCase ? CompareOptions.IgnoreCase : CompareOptions.None;
- Assert.Equal(expected, String.Compare(s1, s2, ignoreCase, ci));
- Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ignoreCase, ci));
- Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ci, ignoreCaseOption));
+ Assert.Equal(expected, String.Compare(s1, s2, ignoreCase, ci));
+ Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ignoreCase, ci));
+ Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ci, ignoreCaseOption));
- Assert.Equal(expected, String.Compare(s1, s2, ci, ignoreCaseOption));
- Assert.Equal(String.Compare(s1, s2, StringComparison.Ordinal), String.Compare(s1, s2, ci, CompareOptions.Ordinal));
- Assert.Equal(String.Compare(s1, s2, StringComparison.OrdinalIgnoreCase), String.Compare(s1, s2, ci, CompareOptions.OrdinalIgnoreCase));
+ Assert.Equal(expected, String.Compare(s1, s2, ci, ignoreCaseOption));
+ Assert.Equal(String.Compare(s1, s2, StringComparison.Ordinal), String.Compare(s1, s2, ci, CompareOptions.Ordinal));
+ Assert.Equal(String.Compare(s1, s2, StringComparison.OrdinalIgnoreCase), String.Compare(s1, s2, ci, CompareOptions.OrdinalIgnoreCase));
- if (ci != null)
+ if (ci != null)
+ {
+ using (new ThreadCultureChange(ci))
{
- using (new ThreadCultureChange(ci))
- {
- Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ignoreCase));
- }
+ Assert.Equal(expected, String.Compare(s1, 0, s2, 0, s1 == null ? 0 : s1.Length, ignoreCase));
}
-
- return RemoteExecutor.SuccessExitCode;
- }, aS1 ?? nullPlaceholder, aS2 ?? nullPlaceholder, aCultureName ?? nullPlaceholder, aIgnoreCase.ToString(), aExpected.ToString()).Dispose();
+ }
}
[Theory]
[Fact]
public static void StartsWithMatchNonOrdinal_StringComparison()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s1 = "abcd";
- string s2 = "aBc";
- Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
- Assert.True(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
-
- ReadOnlySpan<char> span = s1.AsSpan();
- ReadOnlySpan<char> value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.Ordinal));
- Assert.True(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
-
- using (new ThreadCultureChange("el-GR"))
- {
- s1 = "\u03b1\u03b2\u03b3\u03b4"; // \u03B1\u03B2\u03B3\u03B4
- s2 = "\u03b1\u03b2\u03b3"; // \u03B1\u03B2\u03B3
-
- Assert.True(s1.StartsWith(s2, StringComparison.CurrentCulture));
- Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
+ string s1 = "abcd";
+ string s2 = "aBc";
+ Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
+ Assert.True(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
- span = s1.AsSpan();
- value = s2.AsSpan();
+ ReadOnlySpan<char> span = s1.AsSpan();
+ ReadOnlySpan<char> value = s2.AsSpan();
+ Assert.False(span.StartsWith(value, StringComparison.Ordinal));
+ Assert.True(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
- Assert.True(span.StartsWith(value, StringComparison.CurrentCulture));
- Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ using (new ThreadCultureChange("el-GR"))
+ {
+ s1 = "\u03b1\u03b2\u03b3\u03b4"; // \u03B1\u03B2\u03B3\u03B4
+ s2 = "\u03b1\u03b2\u03b3"; // \u03B1\u03B2\u03B3
- s2 = "\u03b1\u0392\u03b3"; // \u03B1\u0392\u03B3
- Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture));
- Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
+ Assert.True(s1.StartsWith(s2, StringComparison.CurrentCulture));
+ Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
- value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.CurrentCulture));
- Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
- }
+ span = s1.AsSpan();
+ value = s2.AsSpan();
- s1 = "\u0069\u00df\u0049\u03b4"; // i\u00DFI\u03B4
- s2 = "\u0069\u0073\u0073\u0049"; // issI
+ Assert.True(span.StartsWith(value, StringComparison.CurrentCulture));
+ Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCulture),
- s1.StartsWith(s2, StringComparison.InvariantCulture));
- Assert.Equal(
- s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase),
- s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
+ s2 = "\u03b1\u0392\u03b3"; // \u03B1\u0392\u03B3
+ Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture));
+ Assert.True(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
- span = s1.AsSpan();
value = s2.AsSpan();
+ Assert.False(span.StartsWith(value, StringComparison.CurrentCulture));
+ Assert.True(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ }
- Assert.False(span.StartsWith(value, StringComparison.Ordinal));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCulture),
- span.StartsWith(value, StringComparison.InvariantCulture));
- Assert.Equal(
- span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
- span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
-
- s2 = "\u0049\u0073\u0073\u0049"; // IssI
- Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
- Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase),
- s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
+ s1 = "\u0069\u00df\u0049\u03b4"; // i\u00DFI\u03B4
+ s2 = "\u0069\u0073\u0073\u0049"; // issI
- value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
- Assert.False(span.StartsWith(value, StringComparison.InvariantCulture));
- // Different behavior depending on OS - True on Windows, False on Unix
- Assert.Equal(
- span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
- span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
- }).Dispose();
+ Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCulture),
+ s1.StartsWith(s2, StringComparison.InvariantCulture));
+ Assert.Equal(
+ s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
+
+ span = s1.AsSpan();
+ value = s2.AsSpan();
+
+ Assert.False(span.StartsWith(value, StringComparison.Ordinal));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCulture),
+ span.StartsWith(value, StringComparison.InvariantCulture));
+ Assert.Equal(
+ span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
+
+ s2 = "\u0049\u0073\u0073\u0049"; // IssI
+ Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
+ Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ s1.ToString().StartsWith(s2.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
+
+ value = s2.AsSpan();
+ Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
+ Assert.False(span.StartsWith(value, StringComparison.InvariantCulture));
+ // Different behavior depending on OS - True on Windows, False on Unix
+ Assert.Equal(
+ span.ToString().StartsWith(value.ToString(), StringComparison.InvariantCultureIgnoreCase),
+ span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
}
[Fact]
public static void StartsWithNoMatchNonOrdinal_StringComparison()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s1 = "abcd";
- string s2 = "aDc";
- Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
- Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
+ string s1 = "abcd";
+ string s2 = "aDc";
+ Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
+ Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
- ReadOnlySpan<char> span = s1.AsSpan();
- ReadOnlySpan<char> value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.Ordinal));
- Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
+ ReadOnlySpan<char> span = s1.AsSpan();
+ ReadOnlySpan<char> value = s2.AsSpan();
+ Assert.False(span.StartsWith(value, StringComparison.Ordinal));
+ Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
- using (new ThreadCultureChange("el-GR"))
- {
- s1 = "\u03b1\u03b2\u03b3\u03b4"; // \u03B1\u03B2\u03B3\u03B4
- s2 = "\u03b1\u03b4\u03b3"; // \u03B1\u03B4\u03B3
+ using (new ThreadCultureChange("el-GR"))
+ {
+ s1 = "\u03b1\u03b2\u03b3\u03b4"; // \u03B1\u03B2\u03B3\u03B4
+ s2 = "\u03b1\u03b4\u03b3"; // \u03B1\u03B4\u03B3
- Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture));
- Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
+ Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture));
+ Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
- span = s1.AsSpan();
- value = s2.AsSpan();
+ span = s1.AsSpan();
+ value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.CurrentCulture));
- Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.False(span.StartsWith(value, StringComparison.CurrentCulture));
+ Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
- s2 = "\u03b1\u0394\u03b3"; // \u03B1\u0394\u03B3
- Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture));
- Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
+ s2 = "\u03b1\u0394\u03b3"; // \u03B1\u0394\u03B3
+ Assert.False(s1.StartsWith(s2, StringComparison.CurrentCulture));
+ Assert.False(s1.StartsWith(s2, StringComparison.CurrentCultureIgnoreCase));
- value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.CurrentCulture));
- Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
- }
+ value = s2.AsSpan();
+ Assert.False(span.StartsWith(value, StringComparison.CurrentCulture));
+ Assert.False(span.StartsWith(value, StringComparison.CurrentCultureIgnoreCase));
+ }
- s1 = "\u0069\u00df\u0049\u03b4"; // i\u00DFI\u03B4
- s2 = "\u0069\u03b4\u03b4\u0049"; // i\u03B4\u03B4I
+ s1 = "\u0069\u00df\u0049\u03b4"; // i\u00DFI\u03B4
+ s2 = "\u0069\u03b4\u03b4\u0049"; // i\u03B4\u03B4I
- Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
- Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture));
- Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
+ Assert.False(s1.StartsWith(s2, StringComparison.Ordinal));
+ Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture));
+ Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
- span = s1.AsSpan();
- value = s2.AsSpan();
+ span = s1.AsSpan();
+ value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.Ordinal));
- Assert.False(span.StartsWith(value, StringComparison.InvariantCulture));
- Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
+ Assert.False(span.StartsWith(value, StringComparison.Ordinal));
+ Assert.False(span.StartsWith(value, StringComparison.InvariantCulture));
+ Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
- s2 = "\u0049\u03b4\u03b4\u0049"; // I\u03B4\u03B4I
- Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
- Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture));
- Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
+ s2 = "\u0049\u03b4\u03b4\u0049"; // I\u03B4\u03B4I
+ Assert.False(s1.StartsWith(s2, StringComparison.OrdinalIgnoreCase));
+ Assert.False(s1.StartsWith(s2, StringComparison.InvariantCulture));
+ Assert.False(s1.StartsWith(s2, StringComparison.InvariantCultureIgnoreCase));
- value = s2.AsSpan();
- Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
- Assert.False(span.StartsWith(value, StringComparison.InvariantCulture));
- Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
- }).Dispose();
+ value = s2.AsSpan();
+ Assert.False(span.StartsWith(value, StringComparison.OrdinalIgnoreCase));
+ Assert.False(span.StartsWith(value, StringComparison.InvariantCulture));
+ Assert.False(span.StartsWith(value, StringComparison.InvariantCultureIgnoreCase));
}
// NOTE: This is by design. Unix ignores the null characters (i.e. null characters have no weights for the string comparison).
<GenerateResourceUsePreserializedResources>false</GenerateResourceUsePreserializedResources>
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)Common\src\CoreLib\CodeAnalysis.ruleset</CodeAnalysisRuleset>
+ <EnablePinvokeUWPAnalyzer>false</EnablePinvokeUWPAnalyzer>
</PropertyGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true' AND '$(IsTestSupportProject)' != 'true'">
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
<!--
We wish to test operations that would result in
"Operator '-' cannot be applied to operands of type 'ushort' and 'EnumArithmeticTests.UInt16Enum'"
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>false</IsNETCoreApp>
- <IsUAP>false</IsUAP>
</PropertyGroup>
</Project>
<AssemblyVersion>10.0.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
{325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
{325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
{325260D6-D5DD-4E06-9DA2-9AF2AD9DE8C8}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
- {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Debug|Any CPU.ActiveCfg = uap-Windows_NT-Debug|Any CPU
- {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Debug|Any CPU.Build.0 = uap-Windows_NT-Debug|Any CPU
- {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Release|Any CPU.ActiveCfg = uap-Windows_NT-Release|Any CPU
- {A32671B6-5470-4F9C-9CD8-4094B9AB0799}.Release|Any CPU.Build.0 = uap-Windows_NT-Release|Any CPU
{82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
{82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
{82A4357C-0A9F-4970-AAEA-216A73D8A73E}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Microsoft.VisualBasic.Core.cs" />
<BuildConfigurations>
netcoreapp;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<WarningsNotAsErrors>42025</WarningsNotAsErrors>
<DefineConstants>$(DefineConstants),LATEBINDING=True</DefineConstants>
<DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants),PLATFORM_WINDOWS=True</DefineConstants>
- <DefineConstants Condition="'$(TargetGroup)' == 'uap'">$(DefineConstants),PLATFORM_UAP=True</DefineConstants>
<NoWarn Condition="'$(TargetsWindows)' != 'true'">$(NoWarn);CA1823</NoWarn> <!-- Avoid unused fields warnings in Unix build -->
<AssemblyName>Microsoft.VisualBasic.Core</AssemblyName>
<NoStdLib>true</NoStdLib>
<RootNamespace />
<!-- Disable this as it seems to break windows builds for now. -->
<DocumentationFile />
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="Microsoft\VisualBasic\Helpers\NativeMethods.vb" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
- <Reference Condition="'$(TargetGroup)' != 'uap'" Include="Microsoft.Win32.Registry" />
+ <Reference Include="Microsoft.Win32.Registry" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Collections.Specialized" />
Imports System.Reflection
Imports System.Text
Imports System.Runtime.InteropServices
-
-#If Not PLATFORM_UAP Then
Imports Microsoft.Win32
-#End If
Imports Microsoft.VisualBasic.CompilerServices
Imports Microsoft.VisualBasic.CompilerServices.ExceptionUtils
'============================================================================
Public Sub DeleteSetting(ByVal AppName As String, Optional ByVal Section As String = Nothing, Optional ByVal Key As String = Nothing)
-#If PLATFORM_UAP Then
- Throw New PlatformNotSupportedException()
-#Else
Dim AppSection As String
Dim UserKey As RegistryKey
Dim AppSectionKey As RegistryKey = Nothing
AppSectionKey.Close()
End If
End Try
-#End If
End Sub
Public Function GetAllSettings(ByVal AppName As String, ByVal Section As String) As String(,)
-#If PLATFORM_UAP Then
- Throw New PlatformNotSupportedException()
-#Else
Dim rk As RegistryKey
Dim sAppSect As String
Dim i As Integer
Finally
rk.Close()
End Try
-#End If
End Function
Public Function GetSetting(ByVal AppName As String, ByVal Section As String, ByVal Key As String, Optional ByVal [Default] As String = "") As String
-#If PLATFORM_UAP Then
- Throw New PlatformNotSupportedException()
-#Else
Dim rk As RegistryKey = Nothing
Dim sAppSect As String
Dim o As Object
Else
Throw New ArgumentException(GetResourceString(SR.Argument_InvalidValue))
End If
-#End If
End Function
Public Sub SaveSetting(ByVal AppName As String, ByVal Section As String, ByVal Key As String, ByVal Setting As String)
-#If PLATFORM_UAP Then
- Throw New PlatformNotSupportedException()
-#Else
Dim rk As RegistryKey
Dim sIniSect As String
Finally
rk.Close()
End Try
-#End If
End Sub
'============================================================================
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
netfx;
</BuildConfigurations>
</PropertyGroup>
[Fact]
public void DeleteSetting()
{
- if (!PlatformDetection.IsUap)
+ if (!PlatformDetection.IsInAppContainer)
{
Assert.Throws<ArgumentException>(() => Interaction.DeleteSetting(AppName: "", Section: null, Key: null));
}
[Fact]
public void GetAllSettings()
{
- if (!PlatformDetection.IsUap)
+ if (!PlatformDetection.IsInAppContainer)
{
Assert.Throws<ArgumentException>(() => Interaction.GetAllSettings(AppName: "", Section: ""));
}
[Fact]
public void GetSetting()
{
- if (!PlatformDetection.IsUap)
+ if (!PlatformDetection.IsInAppContainer)
{
Assert.Throws<ArgumentException>(() => Interaction.GetSetting(AppName: "", Section: "", Key: "", Default: ""));
}
[Fact]
public void SaveSetting()
{
- if (!PlatformDetection.IsUap)
+ if (!PlatformDetection.IsInAppContainer)
{
Assert.Throws<ArgumentException>(() => Interaction.SaveSetting(AppName: "", Section: "", Key: "", Setting: ""));
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyAttributes.cs" />
[InlineData(256)]
public void Chr_CharCodeOutOfRange_ThrowsNotSupportedException(int charCode)
{
- RemoteExecutorForUap.Invoke(charCodeInner =>
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+ using (new ThreadCultureChange("en-US")) // Strings.Chr doesn't fail on these inputs for all code pages, e.g. 949
{
- Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
- using (new ThreadCultureChange("en-US")) // Strings.Chr doesn't fail on these inputs for all code pages, e.g. 949
- {
- AssertExtensions.Throws<ArgumentException>(null, () => Strings.Chr(int.Parse(charCodeInner, CultureInfo.InvariantCulture)));
- }
- }, charCode.ToString(CultureInfo.InvariantCulture)).Dispose();
+ AssertExtensions.Throws<ArgumentException>(null, () => Strings.Chr(charCode));
+ }
}
[Theory]
[InlineData(255, 255)]
public void Asc_Chr_Invariant(int charCode, int expected)
{
- RemoteExecutorForUap.Invoke((charCodeString, expectedString) =>
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- int charCode = int.Parse(charCodeString);
- int expected = int.Parse(expectedString);
-
- Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- Assert.Equal(1252, CultureInfo.CurrentCulture.TextInfo.ANSICodePage);
- Assert.Equal(expected, Strings.Asc(Strings.Chr(charCode)));
- }
- }, charCode.ToString(), expected.ToString()).Dispose();
+ Assert.Equal(1252, CultureInfo.CurrentCulture.TextInfo.ANSICodePage);
+ Assert.Equal(expected, Strings.Asc(Strings.Chr(charCode)));
+ }
}
[ActiveIssue(39888, TargetFrameworkMonikers.NetFramework)]
[InlineData(0xFFFF, 0xFF)]
public void Asc_Chr_DoubleByte(int charCode, int expected)
{
- RemoteExecutorForUap.Invoke((charCodeString, expectedString) =>
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
+ using (new ThreadCultureChange("ko-KR"))
{
- int charCode = int.Parse(charCodeString);
- int expected = int.Parse(expectedString);
-
- Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
- using (new ThreadCultureChange("ko-KR"))
- {
- Assert.Equal(949, CultureInfo.CurrentCulture.TextInfo.ANSICodePage);
- Assert.Equal(expected, (ushort)Strings.Asc(Strings.Chr(charCode)));
- }
- }, charCode.ToString(), expected.ToString()).Dispose();
+ Assert.Equal(949, CultureInfo.CurrentCulture.TextInfo.ANSICodePage);
+ Assert.Equal(expected, (ushort)Strings.Asc(Strings.Chr(charCode)));
+ }
}
[Theory]
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <RootNamespace>Microsoft.Win32.Primitives</RootNamespace>
- <AssemblyName>Microsoft.Win32.Primitives</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
- <!-- Help VS understand available configurations -->
<ItemGroup>
<Compile Include="System\ComponentModel\Win32Exception.cs" />
</ItemGroup>
</Compile>
<Compile Include="System\ComponentModel\Win32Exception.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' And '$(TargetGroup)' == 'netcoreapp' ">
+ <ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
<Compile Include="System\ComponentModel\Win32Exception.Unix.cs" />
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Win32ExceptionTests.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <RootNamespace>Microsoft.Win32.Registry</RootNamespace>
- <AssemblyName>Microsoft.Win32.Registry</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
<DefineConstants>$(DefineConstants);REGISTRY_ASSEMBLY</DefineConstants>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS' AND '$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_Registry</GeneratePlatformNotSupportedAssemblyMessage>
<NoWarn Condition="'$(TargetsUnix)' == 'true'">$(NoWarn);CA1823</NoWarn> <!-- Avoid unused fields warnings in Unix build -->
- <!--
- Temporarily necessary as this is only being built for UWP due to an unwanted dependency on it
- https://github.com/dotnet/corefx/issues/15966
- -->
- <EnablePinvokeUWPAnalyzer>false</EnablePinvokeUWPAnalyzer>
<Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetFx)' != 'true' AND '$(OSGroup)' != 'AnyOS'">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>$(DefineConstants);XMLSERIALIZERGENERATORTESTS</DefineConstants>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<CoverageSupported>false</CoverageSupported>
- <SkipTestsOnPlatform Condition="'$(TargetsUap)' == 'true' OR '$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64' OR '$(ArchGroup)' == 'armel'">true</SkipTestsOnPlatform>
+ <SkipTestsOnPlatform Condition="'$(ArchGroup)' == 'arm' OR '$(ArchGroup)' == 'arm64' OR '$(ArchGroup)' == 'armel'">true</SkipTestsOnPlatform>
</PropertyGroup>
<PropertyGroup>
<!-- Reuse the same runtimeconfig used by MSBuild. -->
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
netstandard;
netfx;
</BuildConfigurations>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.AppContext.Forwards.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<AssemblyName>System.AppContext</AssemblyName>
<ClsCompliant>true</ClsCompliant>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netstandard;
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<!-- Must match version supported by frameworks which support 4.0.* inbox.
Can be removed when API is added and this assembly is versioned to 4.1.* -->
<AssemblyVersion>4.0.2.0</AssemblyVersion>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Buffers.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap' OR '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<ExcludeResourcesImport>true</ExcludeResourcesImport>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
[Theory,
InlineData(true),
InlineData(false)]
- [ActiveIssue(29866, TargetFrameworkMonikers.Uap)]
public void BuffersAreCollectedWhenStale(bool trim)
{
RemoteInvokeWithTrimming((trimString) =>
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsPreciseGcSupported))]
[InlineData(true)]
[InlineData(false)]
- [ActiveIssue(29866, TargetFrameworkMonikers.Uap)]
public void PollingEventFires(bool trim)
{
RemoteInvokeWithTrimming((trimString) =>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ArrayPool\ArrayPoolTest.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\CodeDom\CodeAttributeDeclarationCollectionTests.cs" />
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void MetadataAttributes()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- var cu = new CodeCompileUnit();
-
- var ns = new CodeNamespace();
- ns.Name = "MyNamespace";
- ns.Imports.Add(new CodeNamespaceImport("System"));
- ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
- ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
- ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
- cu.Namespaces.Add(ns);
-
- var attrs = cu.AssemblyCustomAttributes;
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
- attrs.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
-
- var class1 = new CodeTypeDeclaration() { Name = "MyClass" };
- class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
- class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Class"))));
- ns.Types.Add(class1);
-
- var nestedClass = new CodeTypeDeclaration("NestedClass") { IsClass = true, TypeAttributes = TypeAttributes.NestedPublic };
- nestedClass.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
- class1.Members.Add(nestedClass);
-
- var method1 = new CodeMemberMethod() { Name = "MyMethod" };
- method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Method"))));
- method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.ComponentModel.Editor", new CodeAttributeArgument(new CodePrimitiveExpression("This")), new CodeAttributeArgument(new CodePrimitiveExpression("That"))));
- var param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
- param1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
- new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
- new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
- method1.Parameters.Add(param1);
- var param2 = new CodeParameterDeclarationExpression(typeof(int[]), "arrayit");
- param2.CustomAttributes.Add(
- new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
- new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
- new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
- method1.Parameters.Add(param2);
- class1.Members.Add(method1);
-
- var function1 = new CodeMemberMethod();
- function1.Name = "MyFunction";
- function1.ReturnType = new CodeTypeReference(typeof(string));
- function1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
- function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
- function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
- CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
- CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
- function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
- class1.Members.Add(function1);
-
- CodeMemberMethod function2 = new CodeMemberMethod();
- function2.Name = "GlobalKeywordFunction";
- function2.CustomAttributes.Add(new CodeAttributeDeclaration(new CodeTypeReference(typeof(ObsoleteAttribute), CodeTypeReferenceOptions.GlobalReference), new
- CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
- CodeTypeReference typeRef = new CodeTypeReference("System.Xml.Serialization.XmlIgnoreAttribute", CodeTypeReferenceOptions.GlobalReference);
- CodeAttributeDeclaration codeAttrib = new CodeAttributeDeclaration(typeRef);
- function2.ReturnTypeCustomAttributes.Add(codeAttrib);
- class1.Members.Add(function2);
-
- CodeMemberField field1 = new CodeMemberField();
- field1.Name = "myField";
- field1.Type = new CodeTypeReference(typeof(string));
- field1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute"));
- field1.InitExpression = new CodePrimitiveExpression("hi!");
- class1.Members.Add(field1);
-
- CodeMemberProperty prop1 = new CodeMemberProperty();
- prop1.Name = "MyProperty";
- prop1.Type = new CodeTypeReference(typeof(string));
- prop1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Property"))));
- prop1.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "myField")));
- class1.Members.Add(prop1);
-
- CodeConstructor const1 = new CodeConstructor();
- const1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Constructor"))));
- class1.Members.Add(const1);
-
- class1 = new CodeTypeDeclaration("Test");
- class1.IsClass = true;
- class1.BaseTypes.Add(new CodeTypeReference("Form"));
- ns.Types.Add(class1);
-
- CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
- mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
- class1.Members.Add(mfield);
-
- CodeConstructor ctor = new CodeConstructor();
- ctor.Attributes = MemberAttributes.Public;
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
- "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
- new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Text"), new CodePrimitiveExpression("Test")));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "TabIndex"), new CodePrimitiveExpression(0)));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
- new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
- ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
- CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
- , new CodeThisReferenceExpression(), "b_Click")));
- class1.Members.Add(ctor);
-
- CodeMemberEvent evt = new CodeMemberEvent();
- evt.Name = "MyEvent";
- evt.Type = new CodeTypeReference("System.EventHandler");
- evt.Attributes = MemberAttributes.Public;
- evt.CustomAttributes.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
- class1.Members.Add(evt);
-
- var cmm = new CodeMemberMethod();
- cmm.Name = "b_Click";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
- class1.Members.Add(cmm);
-
- AssertEqual(cu,
- @"//------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
-
- [assembly: System.Reflection.AssemblyTitle(""MyAssembly"")]
- [assembly: System.Reflection.AssemblyVersion(""1.0.6.2"")]
- [assembly: System.CLSCompliantAttribute(false)]
-
- namespace MyNamespace
- {
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- using System.ComponentModel;
-
- [System.Serializable()]
- [System.Obsolete(""Don\'t use this Class"")]
- public class MyClass
- {
- [System.Xml.Serialization.XmlElementAttribute()]
- private string myField = ""hi!"";
+ var cu = new CodeCompileUnit();
+
+ var ns = new CodeNamespace();
+ ns.Name = "MyNamespace";
+ ns.Imports.Add(new CodeNamespaceImport("System"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
+ ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
+ cu.Namespaces.Add(ns);
+
+ var attrs = cu.AssemblyCustomAttributes;
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
+ attrs.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
+
+ var class1 = new CodeTypeDeclaration() { Name = "MyClass" };
+ class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
+ class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Class"))));
+ ns.Types.Add(class1);
+
+ var nestedClass = new CodeTypeDeclaration("NestedClass") { IsClass = true, TypeAttributes = TypeAttributes.NestedPublic };
+ nestedClass.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
+ class1.Members.Add(nestedClass);
+
+ var method1 = new CodeMemberMethod() { Name = "MyMethod" };
+ method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Method"))));
+ method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.ComponentModel.Editor", new CodeAttributeArgument(new CodePrimitiveExpression("This")), new CodeAttributeArgument(new CodePrimitiveExpression("That"))));
+ var param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
+ param1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
+ new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
+ new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
+ method1.Parameters.Add(param1);
+ var param2 = new CodeParameterDeclarationExpression(typeof(int[]), "arrayit");
+ param2.CustomAttributes.Add(
+ new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
+ new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
+ new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
+ method1.Parameters.Add(param2);
+ class1.Members.Add(method1);
+
+ var function1 = new CodeMemberMethod();
+ function1.Name = "MyFunction";
+ function1.ReturnType = new CodeTypeReference(typeof(string));
+ function1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
+ function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
+ function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
+ CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
+ CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
+ function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
+ class1.Members.Add(function1);
+
+ CodeMemberMethod function2 = new CodeMemberMethod();
+ function2.Name = "GlobalKeywordFunction";
+ function2.CustomAttributes.Add(new CodeAttributeDeclaration(new CodeTypeReference(typeof(ObsoleteAttribute), CodeTypeReferenceOptions.GlobalReference), new
+ CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
+ CodeTypeReference typeRef = new CodeTypeReference("System.Xml.Serialization.XmlIgnoreAttribute", CodeTypeReferenceOptions.GlobalReference);
+ CodeAttributeDeclaration codeAttrib = new CodeAttributeDeclaration(typeRef);
+ function2.ReturnTypeCustomAttributes.Add(codeAttrib);
+ class1.Members.Add(function2);
+
+ CodeMemberField field1 = new CodeMemberField();
+ field1.Name = "myField";
+ field1.Type = new CodeTypeReference(typeof(string));
+ field1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute"));
+ field1.InitExpression = new CodePrimitiveExpression("hi!");
+ class1.Members.Add(field1);
+
+ CodeMemberProperty prop1 = new CodeMemberProperty();
+ prop1.Name = "MyProperty";
+ prop1.Type = new CodeTypeReference(typeof(string));
+ prop1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Property"))));
+ prop1.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "myField")));
+ class1.Members.Add(prop1);
+
+ CodeConstructor const1 = new CodeConstructor();
+ const1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Constructor"))));
+ class1.Members.Add(const1);
+
+ class1 = new CodeTypeDeclaration("Test");
+ class1.IsClass = true;
+ class1.BaseTypes.Add(new CodeTypeReference("Form"));
+ ns.Types.Add(class1);
+
+ CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
+ mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
+ class1.Members.Add(mfield);
+
+ CodeConstructor ctor = new CodeConstructor();
+ ctor.Attributes = MemberAttributes.Public;
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+ "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
+ new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Text"), new CodePrimitiveExpression("Test")));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "TabIndex"), new CodePrimitiveExpression(0)));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
+ new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
+ ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
+ CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
+ , new CodeThisReferenceExpression(), "b_Click")));
+ class1.Members.Add(ctor);
+
+ CodeMemberEvent evt = new CodeMemberEvent();
+ evt.Name = "MyEvent";
+ evt.Type = new CodeTypeReference("System.EventHandler");
+ evt.Attributes = MemberAttributes.Public;
+ evt.CustomAttributes.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
+ class1.Members.Add(evt);
+
+ var cmm = new CodeMemberMethod();
+ cmm.Name = "b_Click";
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
+ class1.Members.Add(cmm);
+
+ AssertEqual(cu,
+ @"//------------------------------------------------------------------------------
+ // <auto-generated>
+ // This code was generated by a tool.
+ //
+ // Changes to this file may cause incorrect behavior and will be lost if
+ // the code is regenerated.
+ // </auto-generated>
+ //------------------------------------------------------------------------------
+
+ [assembly: System.Reflection.AssemblyTitle(""MyAssembly"")]
+ [assembly: System.Reflection.AssemblyVersion(""1.0.6.2"")]
+ [assembly: System.CLSCompliantAttribute(false)]
+
+ namespace MyNamespace
+ {
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+ using System.ComponentModel;
+
+ [System.Serializable()]
+ [System.Obsolete(""Don\'t use this Class"")]
+ public class MyClass
+ {
+ [System.Xml.Serialization.XmlElementAttribute()]
+ private string myField = ""hi!"";
- [System.Obsolete(""Don\'t use this Constructor"")]
- private MyClass()
- {
- }
+ [System.Obsolete(""Don\'t use this Constructor"")]
+ private MyClass()
+ {
+ }
- [System.Obsolete(""Don\'t use this Property"")]
- private string MyProperty
- {
- get
- {
- return this.myField;
- }
- }
+ [System.Obsolete(""Don\'t use this Property"")]
+ private string MyProperty
+ {
+ get
+ {
+ return this.myField;
+ }
+ }
- [System.Obsolete(""Don\'t use this Method"")]
- [System.ComponentModel.Editor(""This"", ""That"")]
- private void MyMethod([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] string blah, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] int[] arrayit)
- {
- }
+ [System.Obsolete(""Don\'t use this Method"")]
+ [System.ComponentModel.Editor(""This"", ""That"")]
+ private void MyMethod([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] string blah, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] int[] arrayit)
+ {
+ }
- [System.Obsolete(""Don\'t use this Function"")]
- [return: System.Xml.Serialization.XmlIgnoreAttribute()]
- [return: System.Xml.Serialization.XmlRootAttribute(Namespace=""Namespace Value"", ElementName=""Root, hehehe"")]
- private string MyFunction()
- {
- return ""Return"";
- }
+ [System.Obsolete(""Don\'t use this Function"")]
+ [return: System.Xml.Serialization.XmlIgnoreAttribute()]
+ [return: System.Xml.Serialization.XmlRootAttribute(Namespace=""Namespace Value"", ElementName=""Root, hehehe"")]
+ private string MyFunction()
+ {
+ return ""Return"";
+ }
- [global::System.ObsoleteAttribute(""Don\'t use this Function"")]
- [return: global::System.Xml.Serialization.XmlIgnoreAttribute()]
- private void GlobalKeywordFunction()
- {
- }
+ [global::System.ObsoleteAttribute(""Don\'t use this Function"")]
+ [return: global::System.Xml.Serialization.XmlIgnoreAttribute()]
+ private void GlobalKeywordFunction()
+ {
+ }
- [System.Serializable()]
- public class NestedClass
- {
- }
- }
+ [System.Serializable()]
+ public class NestedClass
+ {
+ }
+ }
- public class Test : Form
- {
- private Button b = new Button();
+ public class Test : Form
+ {
+ private Button b = new Button();
- public Test()
- {
- this.Size = new Size(600, 600);
- b.Text = ""Test"";
- b.TabIndex = 0;
- b.Location = new Point(400, 525);
- this.MyEvent += new EventHandler(this.b_Click);
- }
+ public Test()
+ {
+ this.Size = new Size(600, 600);
+ b.Text = ""Test"";
+ b.TabIndex = 0;
+ b.Location = new Point(400, 525);
+ this.MyEvent += new EventHandler(this.b_Click);
+ }
- [System.CLSCompliantAttribute(false)]
- public event System.EventHandler MyEvent;
+ [System.CLSCompliantAttribute(false)]
+ public event System.EventHandler MyEvent;
- private void b_Click(object sender, System.EventArgs e)
- {
- }
- }
- }");
- }
- }).Dispose();
+ private void b_Click(object sender, System.EventArgs e)
+ {
+ }
+ }
+ }");
+ }
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void RegionsSnippetsAndLinePragmas()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- var cu = new CodeCompileUnit();
- CodeNamespace ns = new CodeNamespace("Namespace1");
+ var cu = new CodeCompileUnit();
+ CodeNamespace ns = new CodeNamespace("Namespace1");
- cu.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Compile Unit Region"));
- cu.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ cu.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Compile Unit Region"));
+ cu.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- cu.Namespaces.Add(ns);
+ cu.Namespaces.Add(ns);
- var cd = new CodeTypeDeclaration("Class1");
- ns.Types.Add(cd);
+ var cd = new CodeTypeDeclaration("Class1");
+ ns.Types.Add(cd);
- cd.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Outer Type Region"));
- cd.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ cd.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Outer Type Region"));
+ cd.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- cd.Comments.Add(new CodeCommentStatement("Outer Type Comment"));
+ cd.Comments.Add(new CodeCommentStatement("Outer Type Comment"));
- CodeMemberField field1 = new CodeMemberField(typeof(String), "field1");
- CodeMemberField field2 = new CodeMemberField(typeof(String), "field2");
- field1.Comments.Add(new CodeCommentStatement("Field 1 Comment"));
- field2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Field Region"));
- field2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ CodeMemberField field1 = new CodeMemberField(typeof(String), "field1");
+ CodeMemberField field2 = new CodeMemberField(typeof(String), "field2");
+ field1.Comments.Add(new CodeCommentStatement("Field 1 Comment"));
+ field2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Field Region"));
+ field2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- CodeMemberEvent evt1 = new CodeMemberEvent();
- evt1.Name = "Event1";
- evt1.Type = new CodeTypeReference(typeof(System.EventHandler));
- evt1.Attributes = (evt1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ CodeMemberEvent evt1 = new CodeMemberEvent();
+ evt1.Name = "Event1";
+ evt1.Type = new CodeTypeReference(typeof(System.EventHandler));
+ evt1.Attributes = (evt1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- CodeMemberEvent evt2 = new CodeMemberEvent();
- evt2.Name = "Event2";
- evt2.Type = new CodeTypeReference(typeof(System.EventHandler));
- evt2.Attributes = (evt2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ CodeMemberEvent evt2 = new CodeMemberEvent();
+ evt2.Name = "Event2";
+ evt2.Type = new CodeTypeReference(typeof(System.EventHandler));
+ evt2.Attributes = (evt2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- evt2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Event Region"));
- evt2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ evt2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Event Region"));
+ evt2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- CodeMemberMethod method1 = new CodeMemberMethod();
- method1.Name = "Method1";
- method1.Attributes = (method1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- method1.Statements.Add(
- new CodeDelegateInvokeExpression(
- new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event1"),
- new CodeExpression[] {
- new CodeThisReferenceExpression(),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.EventArgs"), "Empty")
- }));
-
- CodeMemberMethod method2 = new CodeMemberMethod();
- method2.Name = "Method2";
- method2.Attributes = (method2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- method2.Statements.Add(
- new CodeDelegateInvokeExpression(
- new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event2"),
- new CodeExpression[] {
+ CodeMemberMethod method1 = new CodeMemberMethod();
+ method1.Name = "Method1";
+ method1.Attributes = (method1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ method1.Statements.Add(
+ new CodeDelegateInvokeExpression(
+ new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event1"),
+ new CodeExpression[] {
new CodeThisReferenceExpression(),
new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.EventArgs"), "Empty")
- }));
- method2.LinePragma = new CodeLinePragma("MethodLinePragma.txt", 500);
- method2.Comments.Add(new CodeCommentStatement("Method 2 Comment"));
-
- method2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Method Region"));
- method2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeMemberProperty property1 = new CodeMemberProperty();
- property1.Name = "Property1";
- property1.Type = new CodeTypeReference(typeof(string));
- property1.Attributes = (property1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- property1.GetStatements.Add(
- new CodeMethodReturnStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field1")));
-
- CodeMemberProperty property2 = new CodeMemberProperty();
- property2.Name = "Property2";
- property2.Type = new CodeTypeReference(typeof(string));
- property2.Attributes = (property2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- property2.GetStatements.Add(
- new CodeMethodReturnStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field2")));
-
- property2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Property Region"));
- property2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeConstructor constructor1 = new CodeConstructor();
- constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- CodeStatement conState1 = new CodeAssignStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field1"),
- new CodePrimitiveExpression("value1"));
- conState1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Statements Region"));
- constructor1.Statements.Add(conState1);
- CodeStatement conState2 = new CodeAssignStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field2"),
- new CodePrimitiveExpression("value2"));
- conState2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- constructor1.Statements.Add(conState2);
-
- constructor1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Constructor Region"));
- constructor1.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeConstructor constructor2 = new CodeConstructor();
- constructor2.Attributes = (constructor2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value1"));
- constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value2"));
-
- CodeTypeConstructor typeConstructor2 = new CodeTypeConstructor();
-
- typeConstructor2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Type Constructor Region"));
- typeConstructor2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeEntryPointMethod methodMain = new CodeEntryPointMethod();
-
- CodeTypeDeclaration nestedClass1 = new CodeTypeDeclaration("NestedClass1");
- CodeTypeDeclaration nestedClass2 = new CodeTypeDeclaration("NestedClass2");
- nestedClass2.LinePragma = new CodeLinePragma("NestedTypeLinePragma.txt", 400);
- nestedClass2.Comments.Add(new CodeCommentStatement("Nested Type Comment"));
-
- nestedClass2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Nested Type Region"));
- nestedClass2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeTypeDelegate delegate1 = new CodeTypeDelegate();
- delegate1.Name = "nestedDelegate1";
- delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
- delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
-
- CodeTypeDelegate delegate2 = new CodeTypeDelegate();
- delegate2.Name = "nestedDelegate2";
- delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
- delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
-
- delegate2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Delegate Region"));
- delegate2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- var snippet1 = new CodeSnippetTypeMember();
- var snippet2 = new CodeSnippetTypeMember();
-
- CodeRegionDirective regionStart = new CodeRegionDirective(CodeRegionMode.End, "");
- regionStart.RegionText = "Snippet Region";
- regionStart.RegionMode = CodeRegionMode.Start;
- snippet2.StartDirectives.Add(regionStart);
- snippet2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- cd.Members.Add(field1);
- cd.Members.Add(method1);
- cd.Members.Add(constructor1);
- cd.Members.Add(property1);
- cd.Members.Add(methodMain);
-
- cd.Members.Add(evt1);
- cd.Members.Add(nestedClass1);
- cd.Members.Add(delegate1);
-
- cd.Members.Add(snippet1);
-
- cd.Members.Add(field2);
- cd.Members.Add(method2);
- cd.Members.Add(constructor2);
- cd.Members.Add(property2);
-
- cd.Members.Add(typeConstructor2);
- cd.Members.Add(evt2);
- cd.Members.Add(nestedClass2);
- cd.Members.Add(delegate2);
- cd.Members.Add(snippet2);
-
- AssertEqual(cu,
- @"#region Compile Unit Region
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
-
- namespace Namespace1 {
-
-
- #region Outer Type Region
- // Outer Type Comment
- public class Class1 {
-
- // Field 1 Comment
- private string field1;
-
- #region Field Region
- private string field2;
- #endregion
-
-
- #region Snippet Region
- #endregion
-
+ }));
+
+ CodeMemberMethod method2 = new CodeMemberMethod();
+ method2.Name = "Method2";
+ method2.Attributes = (method2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ method2.Statements.Add(
+ new CodeDelegateInvokeExpression(
+ new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event2"),
+ new CodeExpression[] {
+ new CodeThisReferenceExpression(),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.EventArgs"), "Empty")
+ }));
+ method2.LinePragma = new CodeLinePragma("MethodLinePragma.txt", 500);
+ method2.Comments.Add(new CodeCommentStatement("Method 2 Comment"));
+
+ method2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Method Region"));
+ method2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeMemberProperty property1 = new CodeMemberProperty();
+ property1.Name = "Property1";
+ property1.Type = new CodeTypeReference(typeof(string));
+ property1.Attributes = (property1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ property1.GetStatements.Add(
+ new CodeMethodReturnStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field1")));
+
+ CodeMemberProperty property2 = new CodeMemberProperty();
+ property2.Name = "Property2";
+ property2.Type = new CodeTypeReference(typeof(string));
+ property2.Attributes = (property2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ property2.GetStatements.Add(
+ new CodeMethodReturnStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field2")));
+
+ property2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Property Region"));
+ property2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeConstructor constructor1 = new CodeConstructor();
+ constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ CodeStatement conState1 = new CodeAssignStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field1"),
+ new CodePrimitiveExpression("value1"));
+ conState1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Statements Region"));
+ constructor1.Statements.Add(conState1);
+ CodeStatement conState2 = new CodeAssignStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field2"),
+ new CodePrimitiveExpression("value2"));
+ conState2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ constructor1.Statements.Add(conState2);
+
+ constructor1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Constructor Region"));
+ constructor1.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeConstructor constructor2 = new CodeConstructor();
+ constructor2.Attributes = (constructor2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value1"));
+ constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value2"));
+
+ CodeTypeConstructor typeConstructor2 = new CodeTypeConstructor();
+
+ typeConstructor2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Type Constructor Region"));
+ typeConstructor2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeEntryPointMethod methodMain = new CodeEntryPointMethod();
+
+ CodeTypeDeclaration nestedClass1 = new CodeTypeDeclaration("NestedClass1");
+ CodeTypeDeclaration nestedClass2 = new CodeTypeDeclaration("NestedClass2");
+ nestedClass2.LinePragma = new CodeLinePragma("NestedTypeLinePragma.txt", 400);
+ nestedClass2.Comments.Add(new CodeCommentStatement("Nested Type Comment"));
+
+ nestedClass2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Nested Type Region"));
+ nestedClass2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeTypeDelegate delegate1 = new CodeTypeDelegate();
+ delegate1.Name = "nestedDelegate1";
+ delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
+ delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
+
+ CodeTypeDelegate delegate2 = new CodeTypeDelegate();
+ delegate2.Name = "nestedDelegate2";
+ delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
+ delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
+
+ delegate2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Delegate Region"));
+ delegate2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ var snippet1 = new CodeSnippetTypeMember();
+ var snippet2 = new CodeSnippetTypeMember();
+
+ CodeRegionDirective regionStart = new CodeRegionDirective(CodeRegionMode.End, "");
+ regionStart.RegionText = "Snippet Region";
+ regionStart.RegionMode = CodeRegionMode.Start;
+ snippet2.StartDirectives.Add(regionStart);
+ snippet2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ cd.Members.Add(field1);
+ cd.Members.Add(method1);
+ cd.Members.Add(constructor1);
+ cd.Members.Add(property1);
+ cd.Members.Add(methodMain);
+
+ cd.Members.Add(evt1);
+ cd.Members.Add(nestedClass1);
+ cd.Members.Add(delegate1);
+
+ cd.Members.Add(snippet1);
+
+ cd.Members.Add(field2);
+ cd.Members.Add(method2);
+ cd.Members.Add(constructor2);
+ cd.Members.Add(property2);
+
+ cd.Members.Add(typeConstructor2);
+ cd.Members.Add(evt2);
+ cd.Members.Add(nestedClass2);
+ cd.Members.Add(delegate2);
+ cd.Members.Add(snippet2);
+
+ AssertEqual(cu,
+ @"#region Compile Unit Region
+ //------------------------------------------------------------------------------
+ // <auto-generated>
+ // This code was generated by a tool.
+ //
+ // Changes to this file may cause incorrect behavior and will be lost if
+ // the code is regenerated.
+ // </auto-generated>
+ //------------------------------------------------------------------------------
+
+ namespace Namespace1 {
+
+
+ #region Outer Type Region
+ // Outer Type Comment
+ public class Class1 {
+
+ // Field 1 Comment
+ private string field1;
+
+ #region Field Region
+ private string field2;
+ #endregion
- #region Type Constructor Region
- static Class1() {
- }
- #endregion
- #region Constructor Region
- public Class1() {
- #region Statements Region
- this.field1 = ""value1"";
- this.field2 = ""value2"";
+ #region Snippet Region
#endregion
- }
- #endregion
-
- public Class1(string value1, string value2)
- {
- }
- public string Property1
- {
- get
- {
- return this.field1;
- }
- }
- #region Property Region
- public string Property2
- {
- get
- {
- return this.field2;
- }
+ #region Type Constructor Region
+ static Class1() {
}
#endregion
- public event System.EventHandler Event1;
+ #region Constructor Region
+ public Class1() {
+ #region Statements Region
+ this.field1 = ""value1"";
+ this.field2 = ""value2"";
+ #endregion
+ }
+ #endregion
- #region Event Region
- public event System.EventHandler Event2;
- #endregion
+ public Class1(string value1, string value2)
+ {
+ }
- public void Method1()
+ public string Property1
+ {
+ get
{
- this.Event1(this, System.EventArgs.Empty);
+ return this.field1;
}
+ }
- public static void Main()
+ #region Property Region
+ public string Property2
+ {
+ get
{
+ return this.field2;
}
+ }
+ #endregion
- #region Method Region
- // Method 2 Comment
+ public event System.EventHandler Event1;
- #line 500 ""MethodLinePragma.txt""
- public void Method2()
- {
- this.Event2(this, System.EventArgs.Empty);
- }
+ #region Event Region
+ public event System.EventHandler Event2;
+ #endregion
- #line default
- #line hidden
- #endregion
+ public void Method1()
+ {
+ this.Event1(this, System.EventArgs.Empty);
+ }
- public class NestedClass1
- {
- }
+ public static void Main()
+ {
+ }
- public delegate void nestedDelegate1(object sender, System.EventArgs e);
+ #region Method Region
+ // Method 2 Comment
- #region Nested Type Region
- // Nested Type Comment
+ #line 500 ""MethodLinePragma.txt""
+ public void Method2()
+ {
+ this.Event2(this, System.EventArgs.Empty);
+ }
- #line 400 ""NestedTypeLinePragma.txt""
- public class NestedClass2
- {
- }
+ #line default
+ #line hidden
+ #endregion
- #line default
- #line hidden
- #endregion
+ public class NestedClass1
+ {
+ }
- #region Delegate Region
- public delegate void nestedDelegate2(object sender, System.EventArgs e);
- #endregion
+ public delegate void nestedDelegate1(object sender, System.EventArgs e);
+
+ #region Nested Type Region
+ // Nested Type Comment
+
+ #line 400 ""NestedTypeLinePragma.txt""
+ public class NestedClass2
+ {
}
- #endregion
+
+ #line default
+ #line hidden
+ #endregion
+
+ #region Delegate Region
+ public delegate void nestedDelegate2(object sender, System.EventArgs e);
+ #endregion
}
- #endregion");
+ #endregion
}
- }).Dispose();
+ #endregion");
+ }
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ProviderSupports()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ CodeDomProvider provider = GetProvider();
+
+ var cu = new CodeCompileUnit();
+ var nspace = new CodeNamespace("NSPC");
+ nspace.Imports.Add(new CodeNamespaceImport("System"));
+ nspace.Imports.Add(new CodeNamespaceImport("System.Drawing"));
+ nspace.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
+ nspace.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
+ cu.Namespaces.Add(nspace);
+
+ var cd = new CodeTypeDeclaration("TEST");
+ cd.IsClass = true;
+ nspace.Types.Add(cd);
+
+ // Arrays of Arrays
+ var cmm = new CodeMemberMethod();
+ cmm.Name = "ArraysOfArrays";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Final | MemberAttributes.Public;
+ if (provider.Supports(GeneratorSupport.ArraysOfArrays))
{
- CodeDomProvider provider = GetProvider();
-
- var cu = new CodeCompileUnit();
- var nspace = new CodeNamespace("NSPC");
- nspace.Imports.Add(new CodeNamespaceImport("System"));
- nspace.Imports.Add(new CodeNamespaceImport("System.Drawing"));
- nspace.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
- nspace.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
- cu.Namespaces.Add(nspace);
-
- var cd = new CodeTypeDeclaration("TEST");
- cd.IsClass = true;
- nspace.Types.Add(cd);
-
- // Arrays of Arrays
- var cmm = new CodeMemberMethod();
- cmm.Name = "ArraysOfArrays";
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(typeof(int[][])),
+ "arrayOfArrays", new CodeArrayCreateExpression(typeof(int[][]),
+ new CodeArrayCreateExpression(typeof(int[]), new CodePrimitiveExpression(3), new CodePrimitiveExpression(4)),
+ new CodeArrayCreateExpression(typeof(int[]), new CodeExpression[] { new CodePrimitiveExpression(1) }))));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeArrayIndexerExpression(
+ new CodeArrayIndexerExpression(new CodeVariableReferenceExpression("arrayOfArrays"), new CodePrimitiveExpression(0))
+ , new CodePrimitiveExpression(1))));
+ }
+ else
+ {
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(0)));
+ }
+ cd.Members.Add(cmm);
+
+ // assembly attributes
+ if (provider.Supports(GeneratorSupport.AssemblyAttributes))
+ {
+ CodeAttributeDeclarationCollection attrs = cu.AssemblyCustomAttributes;
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new
+ CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new
+ CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
+ }
+
+ CodeTypeDeclaration class1 = new CodeTypeDeclaration();
+ if (provider.Supports(GeneratorSupport.ChainedConstructorArguments))
+ {
+ class1.Name = "Test2";
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+
+ class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(String)), "stringField"));
+ CodeMemberProperty prop = new CodeMemberProperty();
+ prop.Name = "accessStringField";
+ prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ prop.Type = new CodeTypeReference(typeof(String));
+ prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+ "stringField")));
+ prop.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new
+ CodeThisReferenceExpression(), "stringField"),
+ new CodePropertySetValueReferenceExpression()));
+ class1.Members.Add(prop);
+
+ CodeConstructor cctor = new CodeConstructor();
+ cctor.Attributes = MemberAttributes.Public;
+ cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression("testingString"));
+ cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
+ cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
+ class1.Members.Add(cctor);
+
+ CodeConstructor cc = new CodeConstructor();
+ cc.Attributes = MemberAttributes.Public | MemberAttributes.Overloaded;
+ cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p1"));
+ cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p2"));
+ cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p3"));
+ cc.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression()
+ , "stringField"), new CodeVariableReferenceExpression("p1")));
+ class1.Members.Add(cc);
+ // verify chained constructors work
+ cmm = new CodeMemberMethod();
+ cmm.Name = "ChainedConstructorUse";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.ReturnType = new CodeTypeReference(typeof(String));
+ // utilize constructor
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("Test2", "t", new CodeObjectCreateExpression("Test2")));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
+ new CodeVariableReferenceExpression("t"), "accessStringField")));
+ cd.Members.Add(cmm);
+ }
+
+ // complex expressions
+ if (provider.Supports(GeneratorSupport.ComplexExpressions))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "ComplexExpressions";
cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Attributes = MemberAttributes.Final | MemberAttributes.Public;
- if (provider.Supports(GeneratorSupport.ArraysOfArrays))
- {
- cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(typeof(int[][])),
- "arrayOfArrays", new CodeArrayCreateExpression(typeof(int[][]),
- new CodeArrayCreateExpression(typeof(int[]), new CodePrimitiveExpression(3), new CodePrimitiveExpression(4)),
- new CodeArrayCreateExpression(typeof(int[]), new CodeExpression[] { new CodePrimitiveExpression(1) }))));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeArrayIndexerExpression(
- new CodeArrayIndexerExpression(new CodeVariableReferenceExpression("arrayOfArrays"), new CodePrimitiveExpression(0))
- , new CodePrimitiveExpression(1))));
- }
- else
- {
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(0)));
- }
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(typeof(int)), "i"));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("i"),
+ new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Multiply,
+ new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add,
+ new CodePrimitiveExpression(3)))));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("i")));
cd.Members.Add(cmm);
+ }
- // assembly attributes
- if (provider.Supports(GeneratorSupport.AssemblyAttributes))
- {
- CodeAttributeDeclarationCollection attrs = cu.AssemblyCustomAttributes;
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new
- CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new
- CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
- }
+ if (provider.Supports(GeneratorSupport.DeclareEnums))
+ {
+ CodeTypeDeclaration ce = new CodeTypeDeclaration("DecimalEnum");
+ ce.IsEnum = true;
+ nspace.Types.Add(ce);
- CodeTypeDeclaration class1 = new CodeTypeDeclaration();
- if (provider.Supports(GeneratorSupport.ChainedConstructorArguments))
+ // things to enumerate
+ for (int k = 0; k < 5; k++)
{
- class1.Name = "Test2";
- class1.IsClass = true;
- nspace.Types.Add(class1);
-
- class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(String)), "stringField"));
- CodeMemberProperty prop = new CodeMemberProperty();
- prop.Name = "accessStringField";
- prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- prop.Type = new CodeTypeReference(typeof(String));
- prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
- "stringField")));
- prop.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new
- CodeThisReferenceExpression(), "stringField"),
- new CodePropertySetValueReferenceExpression()));
- class1.Members.Add(prop);
-
- CodeConstructor cctor = new CodeConstructor();
- cctor.Attributes = MemberAttributes.Public;
- cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression("testingString"));
- cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
- cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
- class1.Members.Add(cctor);
-
- CodeConstructor cc = new CodeConstructor();
- cc.Attributes = MemberAttributes.Public | MemberAttributes.Overloaded;
- cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p1"));
- cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p2"));
- cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p3"));
- cc.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression()
- , "stringField"), new CodeVariableReferenceExpression("p1")));
- class1.Members.Add(cc);
- // verify chained constructors work
- cmm = new CodeMemberMethod();
- cmm.Name = "ChainedConstructorUse";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.ReturnType = new CodeTypeReference(typeof(String));
- // utilize constructor
- cmm.Statements.Add(new CodeVariableDeclarationStatement("Test2", "t", new CodeObjectCreateExpression("Test2")));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
- new CodeVariableReferenceExpression("t"), "accessStringField")));
- cd.Members.Add(cmm);
+ CodeMemberField Field = new CodeMemberField("System.Int32", "Num" + (k).ToString());
+ Field.InitExpression = new CodePrimitiveExpression(k);
+ ce.Members.Add(Field);
}
+ cmm = new CodeMemberMethod();
+ cmm.Name = "OutputDecimalEnumVal";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
+ cmm.Parameters.Add(param);
+ CodeBinaryOperatorExpression eq = new CodeBinaryOperatorExpression(
+ new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.ValueEquality,
+ new CodePrimitiveExpression(3));
+ CodeMethodReturnStatement truestmt = new CodeMethodReturnStatement(
+ new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num3")));
+ CodeConditionStatement condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(4));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num4")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(2));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num2")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(1));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num1")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(0));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num0")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ cmm.ReturnType = new CodeTypeReference("System.int32");
+
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
+ new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add, new CodePrimitiveExpression(10))));
+ cd.Members.Add(cmm);
+ }
- // complex expressions
- if (provider.Supports(GeneratorSupport.ComplexExpressions))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "ComplexExpressions";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Final | MemberAttributes.Public;
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(typeof(int)), "i"));
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("i"),
- new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Multiply,
- new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add,
- new CodePrimitiveExpression(3)))));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("i")));
- cd.Members.Add(cmm);
- }
-
- if (provider.Supports(GeneratorSupport.DeclareEnums))
- {
- CodeTypeDeclaration ce = new CodeTypeDeclaration("DecimalEnum");
- ce.IsEnum = true;
- nspace.Types.Add(ce);
-
- // things to enumerate
- for (int k = 0; k < 5; k++)
- {
- CodeMemberField Field = new CodeMemberField("System.Int32", "Num" + (k).ToString());
- Field.InitExpression = new CodePrimitiveExpression(k);
- ce.Members.Add(Field);
- }
- cmm = new CodeMemberMethod();
- cmm.Name = "OutputDecimalEnumVal";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
- cmm.Parameters.Add(param);
- CodeBinaryOperatorExpression eq = new CodeBinaryOperatorExpression(
- new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.ValueEquality,
- new CodePrimitiveExpression(3));
- CodeMethodReturnStatement truestmt = new CodeMethodReturnStatement(
- new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num3")));
- CodeConditionStatement condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(4));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num4")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(2));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num2")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(1));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num1")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(0));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num0")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- cmm.ReturnType = new CodeTypeReference("System.int32");
+ if (provider.Supports(GeneratorSupport.DeclareInterfaces))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "TestSingleInterface";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("TestSingleInterfaceImp", "t", new CodeObjectCreateExpression("TestSingleInterfaceImp")));
+ CodeMethodInvokeExpression methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t")
+ , "InterfaceMethod");
+ methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
+ cmm.Statements.Add(new CodeMethodReturnStatement(methodinvoke));
+ cd.Members.Add(cmm);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
- new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add, new CodePrimitiveExpression(10))));
- cd.Members.Add(cmm);
- }
+ class1 = new CodeTypeDeclaration("InterfaceA");
+ class1.IsInterface = true;
+ nspace.Types.Add(class1);
+ cmm = new CodeMemberMethod();
+ cmm.Attributes = MemberAttributes.Public;
+ cmm.Name = "InterfaceMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
+ class1.Members.Add(cmm);
- if (provider.Supports(GeneratorSupport.DeclareInterfaces))
+ if (provider.Supports(GeneratorSupport.MultipleInterfaceMembers))
{
+ CodeTypeDeclaration classDecl = new CodeTypeDeclaration("InterfaceB");
+ classDecl.IsInterface = true;
+ nspace.Types.Add(classDecl);
cmm = new CodeMemberMethod();
- cmm.Name = "TestSingleInterface";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeVariableDeclarationStatement("TestSingleInterfaceImp", "t", new CodeObjectCreateExpression("TestSingleInterfaceImp")));
- CodeMethodInvokeExpression methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t")
- , "InterfaceMethod");
- methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
- cmm.Statements.Add(new CodeMethodReturnStatement(methodinvoke));
- cd.Members.Add(cmm);
-
- class1 = new CodeTypeDeclaration("InterfaceA");
- class1.IsInterface = true;
- nspace.Types.Add(class1);
- cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public;
cmm.Name = "InterfaceMethod";
+ cmm.Attributes = MemberAttributes.Public;
cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- class1.Members.Add(cmm);
-
- if (provider.Supports(GeneratorSupport.MultipleInterfaceMembers))
- {
- CodeTypeDeclaration classDecl = new CodeTypeDeclaration("InterfaceB");
- classDecl.IsInterface = true;
- nspace.Types.Add(classDecl);
- cmm = new CodeMemberMethod();
- cmm.Name = "InterfaceMethod";
- cmm.Attributes = MemberAttributes.Public;
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- classDecl.Members.Add(cmm);
-
- CodeTypeDeclaration class2 = new CodeTypeDeclaration("TestMultipleInterfaceImp");
- class2.BaseTypes.Add(new CodeTypeReference("System.Object"));
- class2.BaseTypes.Add(new CodeTypeReference("InterfaceB"));
- class2.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
- class2.IsClass = true;
- nspace.Types.Add(class2);
- cmm = new CodeMemberMethod();
- cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceA"));
- cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceB"));
- cmm.Name = "InterfaceMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- class2.Members.Add(cmm);
-
- cmm = new CodeMemberMethod();
- cmm.Name = "TestMultipleInterfaces";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeVariableDeclarationStatement("TestMultipleInterfaceImp", "t", new CodeObjectCreateExpression("TestMultipleInterfaceImp")));
- cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceA", "interfaceAobject", new CodeCastExpression("InterfaceA",
- new CodeVariableReferenceExpression("t"))));
- cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceB", "interfaceBobject", new CodeCastExpression("InterfaceB",
- new CodeVariableReferenceExpression("t"))));
- methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceAobject")
- , "InterfaceMethod");
- methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
- CodeMethodInvokeExpression methodinvoke2 = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceBobject")
- , "InterfaceMethod");
- methodinvoke2.Parameters.Add(new CodeVariableReferenceExpression("i"));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
- methodinvoke,
- CodeBinaryOperatorType.Subtract, methodinvoke2)));
- cd.Members.Add(cmm);
- }
-
- class1 = new CodeTypeDeclaration("TestSingleInterfaceImp");
- class1.BaseTypes.Add(new CodeTypeReference("System.Object"));
- class1.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
- class1.IsClass = true;
- nspace.Types.Add(class1);
+ classDecl.Members.Add(cmm);
+
+ CodeTypeDeclaration class2 = new CodeTypeDeclaration("TestMultipleInterfaceImp");
+ class2.BaseTypes.Add(new CodeTypeReference("System.Object"));
+ class2.BaseTypes.Add(new CodeTypeReference("InterfaceB"));
+ class2.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
+ class2.IsClass = true;
+ nspace.Types.Add(class2);
cmm = new CodeMemberMethod();
cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceA"));
+ cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceB"));
cmm.Name = "InterfaceMethod";
cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- cmm.Attributes = MemberAttributes.Public;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- class1.Members.Add(cmm);
- }
+ class2.Members.Add(cmm);
- if (provider.Supports(GeneratorSupport.DeclareValueTypes))
- {
- CodeTypeDeclaration structA = new CodeTypeDeclaration("structA");
- structA.IsStruct = true;
-
- CodeTypeDeclaration structB = new CodeTypeDeclaration("structB");
- structB.Attributes = MemberAttributes.Public;
- structB.IsStruct = true;
-
- CodeMemberField firstInt = new CodeMemberField(typeof(int), "int1");
- firstInt.Attributes = MemberAttributes.Public;
- structB.Members.Add(firstInt);
-
- CodeMemberField innerStruct = new CodeMemberField("structB", "innerStruct");
- innerStruct.Attributes = MemberAttributes.Public;
-
- structA.Members.Add(structB);
- structA.Members.Add(innerStruct);
- nspace.Types.Add(structA);
-
- CodeMemberMethod nestedStructMethod = new CodeMemberMethod();
- nestedStructMethod.Name = "NestedStructMethod";
- nestedStructMethod.ReturnType = new CodeTypeReference(typeof(int));
- nestedStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeVariableDeclarationStatement varStructA = new CodeVariableDeclarationStatement("structA", "varStructA");
- nestedStructMethod.Statements.Add(varStructA);
- nestedStructMethod.Statements.Add
- (
- new CodeAssignStatement
- (
- /* Expression1 */ new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1"),
- /* Expression1 */ new CodePrimitiveExpression(3)
- )
- );
- nestedStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1")));
- cd.Members.Add(nestedStructMethod);
- }
- if (provider.Supports(GeneratorSupport.EntryPointMethod))
- {
- CodeEntryPointMethod cep = new CodeEntryPointMethod();
- cd.Members.Add(cep);
- }
- // goto statements
- if (provider.Supports(GeneratorSupport.GotoStatements))
- {
cmm = new CodeMemberMethod();
- cmm.Name = "GoToMethod";
+ cmm.Name = "TestMultipleInterfaces";
cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
- cmm.Parameters.Add(param);
- CodeConditionStatement condstmt = new CodeConditionStatement(new CodeBinaryOperatorExpression(
- new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.LessThan, new CodePrimitiveExpression(1)),
- new CodeGotoStatement("comehere"));
- cmm.Statements.Add(condstmt);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(6)));
- cmm.Statements.Add(new CodeLabeledStatement("comehere",
- new CodeMethodReturnStatement(new CodePrimitiveExpression(7))));
- cd.Members.Add(cmm);
- }
- if (provider.Supports(GeneratorSupport.NestedTypes))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "CallingPublicNestedScenario";
cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
- cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference
- ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"), "t",
- new CodeObjectCreateExpression(new CodeTypeReference
- ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"))));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t"),
- "publicNestedClassesMethod",
- new CodeVariableReferenceExpression("i"))));
- cd.Members.Add(cmm);
-
- class1 = new CodeTypeDeclaration("PublicNestedClassA");
- class1.IsClass = true;
- nspace.Types.Add(class1);
- CodeTypeDeclaration nestedClass = new CodeTypeDeclaration("PublicNestedClassB1");
- nestedClass.IsClass = true;
- nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
- class1.Members.Add(nestedClass);
- nestedClass = new CodeTypeDeclaration("PublicNestedClassB2");
- nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
- nestedClass.IsClass = true;
- class1.Members.Add(nestedClass);
- CodeTypeDeclaration innerNestedClass = new CodeTypeDeclaration("PublicNestedClassC");
- innerNestedClass.TypeAttributes = TypeAttributes.NestedPublic;
- innerNestedClass.IsClass = true;
- nestedClass.Members.Add(innerNestedClass);
- cmm = new CodeMemberMethod();
- cmm.Name = "publicNestedClassesMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- innerNestedClass.Members.Add(cmm);
- }
- // Parameter Attributes
- if (provider.Supports(GeneratorSupport.ParameterAttributes))
- {
- CodeMemberMethod method1 = new CodeMemberMethod();
- method1.Name = "MyMethod";
- method1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- CodeParameterDeclarationExpression param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
- param1.CustomAttributes.Add(
- new CodeAttributeDeclaration(
- "System.Xml.Serialization.XmlElementAttribute",
- new CodeAttributeArgument(
- "Form",
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
- new CodeAttributeArgument(
- "IsNullable",
- new CodePrimitiveExpression(false))));
- method1.Parameters.Add(param1);
- cd.Members.Add(method1);
- }
- // public static members
- if (provider.Supports(GeneratorSupport.PublicStaticMembers))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "PublicStaticMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(16)));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("TestMultipleInterfaceImp", "t", new CodeObjectCreateExpression("TestMultipleInterfaceImp")));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceA", "interfaceAobject", new CodeCastExpression("InterfaceA",
+ new CodeVariableReferenceExpression("t"))));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceB", "interfaceBobject", new CodeCastExpression("InterfaceB",
+ new CodeVariableReferenceExpression("t"))));
+ methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceAobject")
+ , "InterfaceMethod");
+ methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
+ CodeMethodInvokeExpression methodinvoke2 = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceBobject")
+ , "InterfaceMethod");
+ methodinvoke2.Parameters.Add(new CodeVariableReferenceExpression("i"));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
+ methodinvoke,
+ CodeBinaryOperatorType.Subtract, methodinvoke2)));
cd.Members.Add(cmm);
}
- // reference parameters
- if (provider.Supports(GeneratorSupport.ReferenceParameters))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "Work";
- cmm.ReturnType = new CodeTypeReference("System.void");
- cmm.Attributes = MemberAttributes.Static;
- // add parameter with ref direction
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
- param.Direction = FieldDirection.Ref;
- cmm.Parameters.Add(param);
- // add parameter with out direction
- param = new CodeParameterDeclarationExpression(typeof(int), "j");
- param.Direction = FieldDirection.Out;
- cmm.Parameters.Add(param);
- cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("i"),
- new CodeBinaryOperatorExpression(new CodeArgumentReferenceExpression("i"),
- CodeBinaryOperatorType.Add, new CodePrimitiveExpression(4))));
- cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("j"),
- new CodePrimitiveExpression(5)));
- cd.Members.Add(cmm);
- cmm = new CodeMemberMethod();
- cmm.Name = "CallingWork";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeParameterDeclarationExpression parames = new CodeParameterDeclarationExpression(typeof(int), "a");
- cmm.Parameters.Add(parames);
- cmm.ReturnType = new CodeTypeReference("System.int32");
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"),
- new CodePrimitiveExpression(10)));
- cmm.Statements.Add(new CodeVariableDeclarationStatement(typeof(int), "b"));
- // invoke the method called "work"
- CodeMethodInvokeExpression methodinvoked = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression
- (new CodeTypeReferenceExpression("TEST"), "Work"));
- // add parameter with ref direction
- CodeDirectionExpression parameter = new CodeDirectionExpression(FieldDirection.Ref,
- new CodeVariableReferenceExpression("a"));
- methodinvoked.Parameters.Add(parameter);
- // add parameter with out direction
- parameter = new CodeDirectionExpression(FieldDirection.Out, new CodeVariableReferenceExpression("b"));
- methodinvoked.Parameters.Add(parameter);
- cmm.Statements.Add(methodinvoked);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression
- (new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add, new CodeVariableReferenceExpression("b"))));
- cd.Members.Add(cmm);
- }
- if (provider.Supports(GeneratorSupport.ReturnTypeAttributes))
- {
- CodeMemberMethod function1 = new CodeMemberMethod();
- function1.Name = "MyFunction";
- function1.ReturnType = new CodeTypeReference(typeof(string));
- function1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- function1.ReturnTypeCustomAttributes.Add(new
- CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
- function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
- CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
- CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
- function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
- cd.Members.Add(function1);
- }
- if (provider.Supports(GeneratorSupport.StaticConstructors))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "TestStaticConstructor";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
- cmm.Parameters.Add(param);
- // utilize constructor
- cmm.Statements.Add(new CodeVariableDeclarationStatement("Test4", "t", new CodeObjectCreateExpression("Test4")));
- // set then get number
- cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression("t"), "i")
- , new CodeVariableReferenceExpression("a")));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
- new CodeVariableReferenceExpression("t"), "i")));
- cd.Members.Add(cmm);
+ class1 = new CodeTypeDeclaration("TestSingleInterfaceImp");
+ class1.BaseTypes.Add(new CodeTypeReference("System.Object"));
+ class1.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+ cmm = new CodeMemberMethod();
+ cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceA"));
+ cmm.Name = "InterfaceMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
+ cmm.Attributes = MemberAttributes.Public;
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
+ class1.Members.Add(cmm);
+ }
- class1 = new CodeTypeDeclaration();
- class1.Name = "Test4";
- class1.IsClass = true;
- nspace.Types.Add(class1);
-
- class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(int)), "number"));
- CodeMemberProperty prop = new CodeMemberProperty();
- prop.Name = "i";
- prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- prop.Type = new CodeTypeReference(typeof(int));
- prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("number")));
- prop.SetStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("number"),
- new CodePropertySetValueReferenceExpression()));
- class1.Members.Add(prop);
- CodeTypeConstructor ctc = new CodeTypeConstructor();
- class1.Members.Add(ctc);
- }
- if (provider.Supports(GeneratorSupport.TryCatchStatements))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "TryCatchMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
- cmm.Parameters.Add(param);
-
- CodeTryCatchFinallyStatement tcfstmt = new CodeTryCatchFinallyStatement();
- tcfstmt.FinallyStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"), new
- CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add,
- new CodePrimitiveExpression(5))));
- cmm.Statements.Add(tcfstmt);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- cd.Members.Add(cmm);
- }
- if (provider.Supports(GeneratorSupport.DeclareEvents))
- {
- CodeNamespace ns = new CodeNamespace();
- ns.Name = "MyNamespace";
- ns.Imports.Add(new CodeNamespaceImport("System"));
- ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
- ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
- ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
- cu.Namespaces.Add(ns);
- class1 = new CodeTypeDeclaration("Test");
- class1.IsClass = true;
- class1.BaseTypes.Add(new CodeTypeReference("Form"));
- ns.Types.Add(class1);
-
- CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
- mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
- class1.Members.Add(mfield);
-
- CodeConstructor ctor = new CodeConstructor();
- ctor.Attributes = MemberAttributes.Public;
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
- "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
- new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Text"), new CodePrimitiveExpression("Test")));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "TabIndex"), new CodePrimitiveExpression(0)));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
- new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
- ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
- CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
- , new CodeThisReferenceExpression(), "b_Click")));
- class1.Members.Add(ctor);
-
- CodeMemberEvent evt = new CodeMemberEvent();
- evt.Name = "MyEvent";
- evt.Type = new CodeTypeReference("System.EventHandler");
- evt.Attributes = MemberAttributes.Public;
- class1.Members.Add(evt);
+ if (provider.Supports(GeneratorSupport.DeclareValueTypes))
+ {
+ CodeTypeDeclaration structA = new CodeTypeDeclaration("structA");
+ structA.IsStruct = true;
+
+ CodeTypeDeclaration structB = new CodeTypeDeclaration("structB");
+ structB.Attributes = MemberAttributes.Public;
+ structB.IsStruct = true;
+
+ CodeMemberField firstInt = new CodeMemberField(typeof(int), "int1");
+ firstInt.Attributes = MemberAttributes.Public;
+ structB.Members.Add(firstInt);
+
+ CodeMemberField innerStruct = new CodeMemberField("structB", "innerStruct");
+ innerStruct.Attributes = MemberAttributes.Public;
+
+ structA.Members.Add(structB);
+ structA.Members.Add(innerStruct);
+ nspace.Types.Add(structA);
+
+ CodeMemberMethod nestedStructMethod = new CodeMemberMethod();
+ nestedStructMethod.Name = "NestedStructMethod";
+ nestedStructMethod.ReturnType = new CodeTypeReference(typeof(int));
+ nestedStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeVariableDeclarationStatement varStructA = new CodeVariableDeclarationStatement("structA", "varStructA");
+ nestedStructMethod.Statements.Add(varStructA);
+ nestedStructMethod.Statements.Add
+ (
+ new CodeAssignStatement
+ (
+ /* Expression1 */ new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1"),
+ /* Expression1 */ new CodePrimitiveExpression(3)
+ )
+ );
+ nestedStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1")));
+ cd.Members.Add(nestedStructMethod);
+ }
+ if (provider.Supports(GeneratorSupport.EntryPointMethod))
+ {
+ CodeEntryPointMethod cep = new CodeEntryPointMethod();
+ cd.Members.Add(cep);
+ }
+ // goto statements
+ if (provider.Supports(GeneratorSupport.GotoStatements))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "GoToMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
+ cmm.Parameters.Add(param);
+ CodeConditionStatement condstmt = new CodeConditionStatement(new CodeBinaryOperatorExpression(
+ new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.LessThan, new CodePrimitiveExpression(1)),
+ new CodeGotoStatement("comehere"));
+ cmm.Statements.Add(condstmt);
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(6)));
+ cmm.Statements.Add(new CodeLabeledStatement("comehere",
+ new CodeMethodReturnStatement(new CodePrimitiveExpression(7))));
+ cd.Members.Add(cmm);
+ }
+ if (provider.Supports(GeneratorSupport.NestedTypes))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "CallingPublicNestedScenario";
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference
+ ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"), "t",
+ new CodeObjectCreateExpression(new CodeTypeReference
+ ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"))));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t"),
+ "publicNestedClassesMethod",
+ new CodeVariableReferenceExpression("i"))));
+ cd.Members.Add(cmm);
- cmm = new CodeMemberMethod();
- cmm.Name = "b_Click";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
- class1.Members.Add(cmm);
- }
+ class1 = new CodeTypeDeclaration("PublicNestedClassA");
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+ CodeTypeDeclaration nestedClass = new CodeTypeDeclaration("PublicNestedClassB1");
+ nestedClass.IsClass = true;
+ nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
+ class1.Members.Add(nestedClass);
+ nestedClass = new CodeTypeDeclaration("PublicNestedClassB2");
+ nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
+ nestedClass.IsClass = true;
+ class1.Members.Add(nestedClass);
+ CodeTypeDeclaration innerNestedClass = new CodeTypeDeclaration("PublicNestedClassC");
+ innerNestedClass.TypeAttributes = TypeAttributes.NestedPublic;
+ innerNestedClass.IsClass = true;
+ nestedClass.Members.Add(innerNestedClass);
+ cmm = new CodeMemberMethod();
+ cmm.Name = "publicNestedClassesMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
+ innerNestedClass.Members.Add(cmm);
+ }
+ // Parameter Attributes
+ if (provider.Supports(GeneratorSupport.ParameterAttributes))
+ {
+ CodeMemberMethod method1 = new CodeMemberMethod();
+ method1.Name = "MyMethod";
+ method1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ CodeParameterDeclarationExpression param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
+ param1.CustomAttributes.Add(
+ new CodeAttributeDeclaration(
+ "System.Xml.Serialization.XmlElementAttribute",
+ new CodeAttributeArgument(
+ "Form",
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
+ new CodeAttributeArgument(
+ "IsNullable",
+ new CodePrimitiveExpression(false))));
+ method1.Parameters.Add(param1);
+ cd.Members.Add(method1);
+ }
+ // public static members
+ if (provider.Supports(GeneratorSupport.PublicStaticMembers))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "PublicStaticMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(16)));
+ cd.Members.Add(cmm);
+ }
+ // reference parameters
+ if (provider.Supports(GeneratorSupport.ReferenceParameters))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "Work";
+ cmm.ReturnType = new CodeTypeReference("System.void");
+ cmm.Attributes = MemberAttributes.Static;
+ // add parameter with ref direction
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
+ param.Direction = FieldDirection.Ref;
+ cmm.Parameters.Add(param);
+ // add parameter with out direction
+ param = new CodeParameterDeclarationExpression(typeof(int), "j");
+ param.Direction = FieldDirection.Out;
+ cmm.Parameters.Add(param);
+ cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("i"),
+ new CodeBinaryOperatorExpression(new CodeArgumentReferenceExpression("i"),
+ CodeBinaryOperatorType.Add, new CodePrimitiveExpression(4))));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("j"),
+ new CodePrimitiveExpression(5)));
+ cd.Members.Add(cmm);
- AssertEqual(cu,
- @"//------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
-
- [assembly: System.Reflection.AssemblyTitle(""MyAssembly"")]
- [assembly: System.Reflection.AssemblyVersion(""1.0.6.2"")]
-
- namespace NSPC {
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- using System.ComponentModel;
-
- public class TEST {
-
- public int ArraysOfArrays() {
- int[][] arrayOfArrays = new int[][] {
- new int[] { 3, 4},
- new int[] { 1}};
- return arrayOfArrays[0][1];
- }
+ cmm = new CodeMemberMethod();
+ cmm.Name = "CallingWork";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeParameterDeclarationExpression parames = new CodeParameterDeclarationExpression(typeof(int), "a");
+ cmm.Parameters.Add(parames);
+ cmm.ReturnType = new CodeTypeReference("System.int32");
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"),
+ new CodePrimitiveExpression(10)));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(typeof(int), "b"));
+ // invoke the method called "work"
+ CodeMethodInvokeExpression methodinvoked = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression
+ (new CodeTypeReferenceExpression("TEST"), "Work"));
+ // add parameter with ref direction
+ CodeDirectionExpression parameter = new CodeDirectionExpression(FieldDirection.Ref,
+ new CodeVariableReferenceExpression("a"));
+ methodinvoked.Parameters.Add(parameter);
+ // add parameter with out direction
+ parameter = new CodeDirectionExpression(FieldDirection.Out, new CodeVariableReferenceExpression("b"));
+ methodinvoked.Parameters.Add(parameter);
+ cmm.Statements.Add(methodinvoked);
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression
+ (new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add, new CodeVariableReferenceExpression("b"))));
+ cd.Members.Add(cmm);
+ }
+ if (provider.Supports(GeneratorSupport.ReturnTypeAttributes))
+ {
+ CodeMemberMethod function1 = new CodeMemberMethod();
+ function1.Name = "MyFunction";
+ function1.ReturnType = new CodeTypeReference(typeof(string));
+ function1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ function1.ReturnTypeCustomAttributes.Add(new
+ CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
+ function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
+ CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
+ CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
+ function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
+ cd.Members.Add(function1);
+ }
+ if (provider.Supports(GeneratorSupport.StaticConstructors))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "TestStaticConstructor";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
+ cmm.Parameters.Add(param);
+ // utilize constructor
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("Test4", "t", new CodeObjectCreateExpression("Test4")));
+ // set then get number
+ cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression("t"), "i")
+ , new CodeVariableReferenceExpression("a")));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
+ new CodeVariableReferenceExpression("t"), "i")));
+ cd.Members.Add(cmm);
- public static string ChainedConstructorUse() {
- Test2 t = new Test2();
- return t.accessStringField;
- }
+ class1 = new CodeTypeDeclaration();
+ class1.Name = "Test4";
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+
+ class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(int)), "number"));
+ CodeMemberProperty prop = new CodeMemberProperty();
+ prop.Name = "i";
+ prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ prop.Type = new CodeTypeReference(typeof(int));
+ prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("number")));
+ prop.SetStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("number"),
+ new CodePropertySetValueReferenceExpression()));
+ class1.Members.Add(prop);
+ CodeTypeConstructor ctc = new CodeTypeConstructor();
+ class1.Members.Add(ctc);
+ }
+ if (provider.Supports(GeneratorSupport.TryCatchStatements))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "TryCatchMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
+ cmm.Parameters.Add(param);
+
+ CodeTryCatchFinallyStatement tcfstmt = new CodeTryCatchFinallyStatement();
+ tcfstmt.FinallyStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"), new
+ CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add,
+ new CodePrimitiveExpression(5))));
+ cmm.Statements.Add(tcfstmt);
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
+ cd.Members.Add(cmm);
+ }
+ if (provider.Supports(GeneratorSupport.DeclareEvents))
+ {
+ CodeNamespace ns = new CodeNamespace();
+ ns.Name = "MyNamespace";
+ ns.Imports.Add(new CodeNamespaceImport("System"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
+ ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
+ cu.Namespaces.Add(ns);
+ class1 = new CodeTypeDeclaration("Test");
+ class1.IsClass = true;
+ class1.BaseTypes.Add(new CodeTypeReference("Form"));
+ ns.Types.Add(class1);
- public int ComplexExpressions(int i) {
- i = (i * (i + 3));
- return i;
- }
+ CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
+ mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
+ class1.Members.Add(mfield);
- public static int OutputDecimalEnumVal(int i) {
- if ((i == 3)) {
- return ((int)(DecimalEnum.Num3));
- }
- if ((i == 4)) {
- return ((int)(DecimalEnum.Num4));
- }
- if ((i == 2)) {
- return ((int)(DecimalEnum.Num2));
- }
- if ((i == 1)) {
- return ((int)(DecimalEnum.Num1));
- }
- if ((i == 0)) {
- return ((int)(DecimalEnum.Num0));
- }
- return (i + 10);
- }
+ CodeConstructor ctor = new CodeConstructor();
+ ctor.Attributes = MemberAttributes.Public;
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+ "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
+ new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Text"), new CodePrimitiveExpression("Test")));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "TabIndex"), new CodePrimitiveExpression(0)));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
+ new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
+ ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
+ CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
+ , new CodeThisReferenceExpression(), "b_Click")));
+ class1.Members.Add(ctor);
- public static int TestSingleInterface(int i) {
- TestSingleInterfaceImp t = new TestSingleInterfaceImp();
- return t.InterfaceMethod(i);
- }
+ CodeMemberEvent evt = new CodeMemberEvent();
+ evt.Name = "MyEvent";
+ evt.Type = new CodeTypeReference("System.EventHandler");
+ evt.Attributes = MemberAttributes.Public;
+ class1.Members.Add(evt);
- public static int TestMultipleInterfaces(int i) {
- TestMultipleInterfaceImp t = new TestMultipleInterfaceImp();
- InterfaceA interfaceAobject = ((InterfaceA)(t));
- InterfaceB interfaceBobject = ((InterfaceB)(t));
- return (interfaceAobject.InterfaceMethod(i) - interfaceBobject.InterfaceMethod(i));
- }
+ cmm = new CodeMemberMethod();
+ cmm.Name = "b_Click";
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
+ class1.Members.Add(cmm);
+ }
- public static int NestedStructMethod() {
- structA varStructA;
- varStructA.innerStruct.int1 = 3;
- return varStructA.innerStruct.int1;
- }
+ AssertEqual(cu,
+ @"//------------------------------------------------------------------------------
+ // <auto-generated>
+ // This code was generated by a tool.
+ //
+ // Changes to this file may cause incorrect behavior and will be lost if
+ // the code is regenerated.
+ // </auto-generated>
+ //------------------------------------------------------------------------------
+
+ [assembly: System.Reflection.AssemblyTitle(""MyAssembly"")]
+ [assembly: System.Reflection.AssemblyVersion(""1.0.6.2"")]
+
+ namespace NSPC {
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+ using System.ComponentModel;
+
+ public class TEST {
+
+ public int ArraysOfArrays() {
+ int[][] arrayOfArrays = new int[][] {
+ new int[] { 3, 4},
+ new int[] { 1}};
+ return arrayOfArrays[0][1];
+ }
- public static void Main() { }
+ public static string ChainedConstructorUse() {
+ Test2 t = new Test2();
+ return t.accessStringField;
+ }
- public int GoToMethod(int i) {
- if ((i < 1)) {
- goto comehere;
- }
- return 6;
- comehere:
- return 7;
- }
+ public int ComplexExpressions(int i) {
+ i = (i * (i + 3));
+ return i;
+ }
- public static int CallingPublicNestedScenario(int i) {
- PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC t = new PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC();
- return t.publicNestedClassesMethod(i);
- }
+ public static int OutputDecimalEnumVal(int i) {
+ if ((i == 3)) {
+ return ((int)(DecimalEnum.Num3));
+ }
+ if ((i == 4)) {
+ return ((int)(DecimalEnum.Num4));
+ }
+ if ((i == 2)) {
+ return ((int)(DecimalEnum.Num2));
+ }
+ if ((i == 1)) {
+ return ((int)(DecimalEnum.Num1));
+ }
+ if ((i == 0)) {
+ return ((int)(DecimalEnum.Num0));
+ }
+ return (i + 10);
+ }
- public void MyMethod([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] string blah) {
- }
+ public static int TestSingleInterface(int i) {
+ TestSingleInterfaceImp t = new TestSingleInterfaceImp();
+ return t.InterfaceMethod(i);
+ }
- public static int PublicStaticMethod() {
- return 16;
- }
+ public static int TestMultipleInterfaces(int i) {
+ TestMultipleInterfaceImp t = new TestMultipleInterfaceImp();
+ InterfaceA interfaceAobject = ((InterfaceA)(t));
+ InterfaceB interfaceBobject = ((InterfaceB)(t));
+ return (interfaceAobject.InterfaceMethod(i) - interfaceBobject.InterfaceMethod(i));
+ }
- static void Work(ref int i, out int j) {
- i = (i + 4);
- j = 5;
- }
+ public static int NestedStructMethod() {
+ structA varStructA;
+ varStructA.innerStruct.int1 = 3;
+ return varStructA.innerStruct.int1;
+ }
- public static int CallingWork(int a) {
- a = 10;
- int b;
- TEST.Work(ref a, out b);
- return (a + b);
- }
+ public static void Main() { }
- [return: System.Xml.Serialization.XmlIgnoreAttribute()]
- [return: System.Xml.Serialization.XmlRootAttribute(Namespace=""Namespace Value"", ElementName=""Root, hehehe"")]
- public string MyFunction() {
- return ""Return"";
- }
+ public int GoToMethod(int i) {
+ if ((i < 1)) {
+ goto comehere;
+ }
+ return 6;
+ comehere:
+ return 7;
+ }
- public static int TestStaticConstructor(int a) {
- Test4 t = new Test4();
- t.i = a;
- return t.i;
- }
+ public static int CallingPublicNestedScenario(int i) {
+ PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC t = new PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC();
+ return t.publicNestedClassesMethod(i);
+ }
- public static int TryCatchMethod(int a) {
- try {
- }
- finally {
- a = (a + 5);
- }
- return a;
- }
- }
+ public void MyMethod([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable=false)] string blah) {
+ }
- public class Test2 {
+ public static int PublicStaticMethod() {
+ return 16;
+ }
- private string stringField;
+ static void Work(ref int i, out int j) {
+ i = (i + 4);
+ j = 5;
+ }
- public Test2() :
- this(""testingString"", null, null) {
- }
+ public static int CallingWork(int a) {
+ a = 10;
+ int b;
+ TEST.Work(ref a, out b);
+ return (a + b);
+ }
- public Test2(string p1, string p2, string p3) {
- this.stringField = p1;
- }
+ [return: System.Xml.Serialization.XmlIgnoreAttribute()]
+ [return: System.Xml.Serialization.XmlRootAttribute(Namespace=""Namespace Value"", ElementName=""Root, hehehe"")]
+ public string MyFunction() {
+ return ""Return"";
+ }
- public string accessStringField {
- get {
- return this.stringField;
- }
- set {
- this.stringField = value;
- }
- }
- }
+ public static int TestStaticConstructor(int a) {
+ Test4 t = new Test4();
+ t.i = a;
+ return t.i;
+ }
- public enum DecimalEnum {
- Num0 = 0,
- Num1 = 1,
- Num2 = 2,
- Num3 = 3,
- Num4 = 4,
- }
+ public static int TryCatchMethod(int a) {
+ try {
+ }
+ finally {
+ a = (a + 5);
+ }
+ return a;
+ }
+ }
- public interface InterfaceA {
- int InterfaceMethod(int a);
- }
+ public class Test2 {
- public interface InterfaceB {
- int InterfaceMethod(int a);
- }
+ private string stringField;
- public class TestMultipleInterfaceImp : object, InterfaceB, InterfaceA {
- public int InterfaceMethod(int a) {
- return a;
- }
- }
+ public Test2() :
+ this(""testingString"", null, null) {
+ }
- public class TestSingleInterfaceImp : object, InterfaceA {
- public virtual int InterfaceMethod(int a) {
- return a;
- }
- }
+ public Test2(string p1, string p2, string p3) {
+ this.stringField = p1;
+ }
- public struct structA {
- public structB innerStruct;
+ public string accessStringField {
+ get {
+ return this.stringField;
+ }
+ set {
+ this.stringField = value;
+ }
+ }
+ }
- public struct structB {
- public int int1;
- }
- }
+ public enum DecimalEnum {
+ Num0 = 0,
+ Num1 = 1,
+ Num2 = 2,
+ Num3 = 3,
+ Num4 = 4,
+ }
- public class PublicNestedClassA {
+ public interface InterfaceA {
+ int InterfaceMethod(int a);
+ }
- public class PublicNestedClassB1 { }
+ public interface InterfaceB {
+ int InterfaceMethod(int a);
+ }
- public class PublicNestedClassB2 {
- public class PublicNestedClassC {
- public int publicNestedClassesMethod(int a) {
- return a;
- }
- }
- }
- }
+ public class TestMultipleInterfaceImp : object, InterfaceB, InterfaceA {
+ public int InterfaceMethod(int a) {
+ return a;
+ }
+ }
- public class Test4 {
+ public class TestSingleInterfaceImp : object, InterfaceA {
+ public virtual int InterfaceMethod(int a) {
+ return a;
+ }
+ }
- private int number;
+ public struct structA {
+ public structB innerStruct;
- static Test4() {
- }
+ public struct structB {
+ public int int1;
+ }
+ }
- public int i {
- get {
- return number;
- }
- set {
- number = value;
- }
- }
- }
- }
- namespace MyNamespace {
- using System;
- using System.Drawing;
- using System.Windows.Forms;
- using System.ComponentModel;
-
- public class Test : Form {
- private Button b = new Button();
-
- public Test() {
- this.Size = new Size(600, 600);
- b.Text = ""Test"";
- b.TabIndex = 0;
- b.Location = new Point(400, 525);
- this.MyEvent += new EventHandler(this.b_Click);
- }
+ public class PublicNestedClassA {
- public event System.EventHandler MyEvent;
+ public class PublicNestedClassB1 { }
- private void b_Click(object sender, System.EventArgs e) {
- }
- }
- }");
- }
- }).Dispose();
+ public class PublicNestedClassB2 {
+ public class PublicNestedClassC {
+ public int publicNestedClassesMethod(int a) {
+ return a;
+ }
+ }
+ }
+ }
+
+ public class Test4 {
+
+ private int number;
+
+ static Test4() {
+ }
+
+ public int i {
+ get {
+ return number;
+ }
+ set {
+ number = value;
+ }
+ }
+ }
+ }
+ namespace MyNamespace {
+ using System;
+ using System.Drawing;
+ using System.Windows.Forms;
+ using System.ComponentModel;
+
+ public class Test : Form {
+ private Button b = new Button();
+
+ public Test() {
+ this.Size = new Size(600, 600);
+ b.Text = ""Test"";
+ b.TabIndex = 0;
+ b.Location = new Point(400, 525);
+ this.MyEvent += new EventHandler(this.b_Click);
+ }
+
+ public event System.EventHandler MyEvent;
+
+ private void b_Click(object sender, System.EventArgs e) {
+ }
+ }
+ }");
+ }
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void MetadataAttributes()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- var cu = new CodeCompileUnit();
-
- var ns = new CodeNamespace();
- ns.Name = "MyNamespace";
- ns.Imports.Add(new CodeNamespaceImport("System"));
- ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
- ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
- ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
- cu.Namespaces.Add(ns);
-
- var attrs = cu.AssemblyCustomAttributes;
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
- attrs.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
-
- var class1 = new CodeTypeDeclaration() { Name = "MyClass" };
- class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
- class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Class"))));
- ns.Types.Add(class1);
-
- var nestedClass = new CodeTypeDeclaration("NestedClass") { IsClass = true, TypeAttributes = TypeAttributes.NestedPublic };
- nestedClass.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
- class1.Members.Add(nestedClass);
-
- var method1 = new CodeMemberMethod() { Name = "MyMethod" };
- method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Method"))));
- method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.ComponentModel.Editor", new CodeAttributeArgument(new CodePrimitiveExpression("This")), new CodeAttributeArgument(new CodePrimitiveExpression("That"))));
- var param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
- param1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
- new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
- new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
- method1.Parameters.Add(param1);
- var param2 = new CodeParameterDeclarationExpression(typeof(int[]), "arrayit");
- param2.CustomAttributes.Add(
- new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
- new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
- new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
- method1.Parameters.Add(param2);
- class1.Members.Add(method1);
-
- var function1 = new CodeMemberMethod();
- function1.Name = "MyFunction";
- function1.ReturnType = new CodeTypeReference(typeof(string));
- function1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
- function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
- function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
- CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
- CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
- function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
- class1.Members.Add(function1);
-
- CodeMemberMethod function2 = new CodeMemberMethod();
- function2.Name = "GlobalKeywordFunction";
- function2.CustomAttributes.Add(new CodeAttributeDeclaration(new CodeTypeReference(typeof(ObsoleteAttribute), CodeTypeReferenceOptions.GlobalReference), new
- CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
- CodeTypeReference typeRef = new CodeTypeReference("System.Xml.Serialization.XmlIgnoreAttribute", CodeTypeReferenceOptions.GlobalReference);
- CodeAttributeDeclaration codeAttrib = new CodeAttributeDeclaration(typeRef);
- function2.ReturnTypeCustomAttributes.Add(codeAttrib);
- class1.Members.Add(function2);
-
- CodeMemberField field1 = new CodeMemberField();
- field1.Name = "myField";
- field1.Type = new CodeTypeReference(typeof(string));
- field1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute"));
- field1.InitExpression = new CodePrimitiveExpression("hi!");
- class1.Members.Add(field1);
-
- CodeMemberProperty prop1 = new CodeMemberProperty();
- prop1.Name = "MyProperty";
- prop1.Type = new CodeTypeReference(typeof(string));
- prop1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Property"))));
- prop1.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "myField")));
- class1.Members.Add(prop1);
-
- CodeConstructor const1 = new CodeConstructor();
- const1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Constructor"))));
- class1.Members.Add(const1);
-
- class1 = new CodeTypeDeclaration("Test");
- class1.IsClass = true;
- class1.BaseTypes.Add(new CodeTypeReference("Form"));
- ns.Types.Add(class1);
-
- CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
- mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
- class1.Members.Add(mfield);
-
- CodeConstructor ctor = new CodeConstructor();
- ctor.Attributes = MemberAttributes.Public;
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
- "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
- new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Text"), new CodePrimitiveExpression("Test")));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "TabIndex"), new CodePrimitiveExpression(0)));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
- new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
- ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
- CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
- , new CodeThisReferenceExpression(), "b_Click")));
- class1.Members.Add(ctor);
-
- CodeMemberEvent evt = new CodeMemberEvent();
- evt.Name = "MyEvent";
- evt.Type = new CodeTypeReference("System.EventHandler");
- evt.Attributes = MemberAttributes.Public;
- evt.CustomAttributes.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
- class1.Members.Add(evt);
-
- CodeMemberMethod cmm = new CodeMemberMethod();
- cmm.Name = "b_Click";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
- class1.Members.Add(cmm);
-
- AssertEqual(cu,
- @"'------------------------------------------------------------------------------
- ' <auto-generated>
- ' This code was generated by a tool.
- '
- ' Changes to this file may cause incorrect behavior and will be lost if
- ' the code is regenerated.
- ' </auto-generated>
- '------------------------------------------------------------------------------
-
- Option Strict Off
- Option Explicit On
-
- Imports System
- Imports System.ComponentModel
- Imports System.Drawing
- Imports System.Windows.Forms
- <Assembly: System.Reflection.AssemblyTitle(""MyAssembly""), _
- Assembly: System.Reflection.AssemblyVersion(""1.0.6.2""), _
- Assembly: System.CLSCompliantAttribute(false)>
-
- Namespace MyNamespace
-
- <System.Serializable(), _
- System.Obsolete(""Don't use this Class"")> _
- Public Class [MyClass]
-
- <System.Xml.Serialization.XmlElementAttribute()> _
- Private myField As String = ""hi!""
-
- <System.Obsolete(""Don't use this Constructor"")> _
- Private Sub New()
- MyBase.New
- End Sub
-
- <System.Obsolete(""Don't use this Property"")> _
- Private ReadOnly Property MyProperty() As String
- Get
- Return Me.myField
- End Get
- End Property
-
- <System.Obsolete(""Don't use this Method""), _
- System.ComponentModel.Editor(""This"", ""That"")> _
- Private Sub MyMethod(<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)> ByVal blah As String, <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)> ByVal arrayit() As Integer)
- End Sub
-
- <System.Obsolete(""Don't use this Function"")> _
- Private Function MyFunction() As <System.Xml.Serialization.XmlIgnoreAttribute(), System.Xml.Serialization.XmlRootAttribute([Namespace]:=""Namespace Value"", ElementName:=""Root, hehehe"")> String
- Return ""Return""
- End Function
-
- <Global.System.ObsoleteAttribute(""Don't use this Function"")> _
- Private Sub GlobalKeywordFunction()
- End Sub
-
- <System.Serializable()> _
- Public Class NestedClass
- End Class
- End Class
-
- Public Class Test
- Inherits Form
-
- Private b As Button = New Button()
-
- Public Sub New()
- MyBase.New
- Me.Size = New Size(600, 600)
- b.Text = ""Test""
- b.TabIndex = 0
- b.Location = New Point(400, 525)
- AddHandler MyEvent, AddressOf Me.b_Click
- End Sub
-
- <System.CLSCompliantAttribute(false)> _
- Public Event MyEvent As System.EventHandler
-
- Private Sub b_Click(ByVal sender As Object, ByVal e As System.EventArgs)
- End Sub
- End Class
- End Namespace");
- }
- }).Dispose();
+ var cu = new CodeCompileUnit();
+
+ var ns = new CodeNamespace();
+ ns.Name = "MyNamespace";
+ ns.Imports.Add(new CodeNamespaceImport("System"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
+ ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
+ cu.Namespaces.Add(ns);
+
+ var attrs = cu.AssemblyCustomAttributes;
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
+ attrs.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
+
+ var class1 = new CodeTypeDeclaration() { Name = "MyClass" };
+ class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
+ class1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Class"))));
+ ns.Types.Add(class1);
+
+ var nestedClass = new CodeTypeDeclaration("NestedClass") { IsClass = true, TypeAttributes = TypeAttributes.NestedPublic };
+ nestedClass.CustomAttributes.Add(new CodeAttributeDeclaration("System.Serializable"));
+ class1.Members.Add(nestedClass);
+
+ var method1 = new CodeMemberMethod() { Name = "MyMethod" };
+ method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Method"))));
+ method1.CustomAttributes.Add(new CodeAttributeDeclaration("System.ComponentModel.Editor", new CodeAttributeArgument(new CodePrimitiveExpression("This")), new CodeAttributeArgument(new CodePrimitiveExpression("That"))));
+ var param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
+ param1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
+ new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
+ new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
+ method1.Parameters.Add(param1);
+ var param2 = new CodeParameterDeclarationExpression(typeof(int[]), "arrayit");
+ param2.CustomAttributes.Add(
+ new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute",
+ new CodeAttributeArgument("Form", new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
+ new CodeAttributeArgument("IsNullable", new CodePrimitiveExpression(false))));
+ method1.Parameters.Add(param2);
+ class1.Members.Add(method1);
+
+ var function1 = new CodeMemberMethod();
+ function1.Name = "MyFunction";
+ function1.ReturnType = new CodeTypeReference(typeof(string));
+ function1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
+ function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
+ function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
+ CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
+ CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
+ function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
+ class1.Members.Add(function1);
+
+ CodeMemberMethod function2 = new CodeMemberMethod();
+ function2.Name = "GlobalKeywordFunction";
+ function2.CustomAttributes.Add(new CodeAttributeDeclaration(new CodeTypeReference(typeof(ObsoleteAttribute), CodeTypeReferenceOptions.GlobalReference), new
+ CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Function"))));
+ CodeTypeReference typeRef = new CodeTypeReference("System.Xml.Serialization.XmlIgnoreAttribute", CodeTypeReferenceOptions.GlobalReference);
+ CodeAttributeDeclaration codeAttrib = new CodeAttributeDeclaration(typeRef);
+ function2.ReturnTypeCustomAttributes.Add(codeAttrib);
+ class1.Members.Add(function2);
+
+ CodeMemberField field1 = new CodeMemberField();
+ field1.Name = "myField";
+ field1.Type = new CodeTypeReference(typeof(string));
+ field1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlElementAttribute"));
+ field1.InitExpression = new CodePrimitiveExpression("hi!");
+ class1.Members.Add(field1);
+
+ CodeMemberProperty prop1 = new CodeMemberProperty();
+ prop1.Name = "MyProperty";
+ prop1.Type = new CodeTypeReference(typeof(string));
+ prop1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Property"))));
+ prop1.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), "myField")));
+ class1.Members.Add(prop1);
+
+ CodeConstructor const1 = new CodeConstructor();
+ const1.CustomAttributes.Add(new CodeAttributeDeclaration("System.Obsolete", new CodeAttributeArgument(new CodePrimitiveExpression("Don't use this Constructor"))));
+ class1.Members.Add(const1);
+
+ class1 = new CodeTypeDeclaration("Test");
+ class1.IsClass = true;
+ class1.BaseTypes.Add(new CodeTypeReference("Form"));
+ ns.Types.Add(class1);
+
+ CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
+ mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
+ class1.Members.Add(mfield);
+
+ CodeConstructor ctor = new CodeConstructor();
+ ctor.Attributes = MemberAttributes.Public;
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+ "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
+ new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Text"), new CodePrimitiveExpression("Test")));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "TabIndex"), new CodePrimitiveExpression(0)));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
+ new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
+ ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
+ CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
+ , new CodeThisReferenceExpression(), "b_Click")));
+ class1.Members.Add(ctor);
+
+ CodeMemberEvent evt = new CodeMemberEvent();
+ evt.Name = "MyEvent";
+ evt.Type = new CodeTypeReference("System.EventHandler");
+ evt.Attributes = MemberAttributes.Public;
+ evt.CustomAttributes.Add(new CodeAttributeDeclaration("System.CLSCompliantAttribute", new CodeAttributeArgument(new CodePrimitiveExpression(false))));
+ class1.Members.Add(evt);
+
+ CodeMemberMethod cmm = new CodeMemberMethod();
+ cmm.Name = "b_Click";
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
+ class1.Members.Add(cmm);
+
+ AssertEqual(cu,
+ @"'------------------------------------------------------------------------------
+ ' <auto-generated>
+ ' This code was generated by a tool.
+ '
+ ' Changes to this file may cause incorrect behavior and will be lost if
+ ' the code is regenerated.
+ ' </auto-generated>
+ '------------------------------------------------------------------------------
+
+ Option Strict Off
+ Option Explicit On
+
+ Imports System
+ Imports System.ComponentModel
+ Imports System.Drawing
+ Imports System.Windows.Forms
+ <Assembly: System.Reflection.AssemblyTitle(""MyAssembly""), _
+ Assembly: System.Reflection.AssemblyVersion(""1.0.6.2""), _
+ Assembly: System.CLSCompliantAttribute(false)>
+
+ Namespace MyNamespace
+
+ <System.Serializable(), _
+ System.Obsolete(""Don't use this Class"")> _
+ Public Class [MyClass]
+
+ <System.Xml.Serialization.XmlElementAttribute()> _
+ Private myField As String = ""hi!""
+
+ <System.Obsolete(""Don't use this Constructor"")> _
+ Private Sub New()
+ MyBase.New
+ End Sub
+
+ <System.Obsolete(""Don't use this Property"")> _
+ Private ReadOnly Property MyProperty() As String
+ Get
+ Return Me.myField
+ End Get
+ End Property
+
+ <System.Obsolete(""Don't use this Method""), _
+ System.ComponentModel.Editor(""This"", ""That"")> _
+ Private Sub MyMethod(<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)> ByVal blah As String, <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)> ByVal arrayit() As Integer)
+ End Sub
+
+ <System.Obsolete(""Don't use this Function"")> _
+ Private Function MyFunction() As <System.Xml.Serialization.XmlIgnoreAttribute(), System.Xml.Serialization.XmlRootAttribute([Namespace]:=""Namespace Value"", ElementName:=""Root, hehehe"")> String
+ Return ""Return""
+ End Function
+
+ <Global.System.ObsoleteAttribute(""Don't use this Function"")> _
+ Private Sub GlobalKeywordFunction()
+ End Sub
+
+ <System.Serializable()> _
+ Public Class NestedClass
+ End Class
+ End Class
+
+ Public Class Test
+ Inherits Form
+
+ Private b As Button = New Button()
+
+ Public Sub New()
+ MyBase.New
+ Me.Size = New Size(600, 600)
+ b.Text = ""Test""
+ b.TabIndex = 0
+ b.Location = New Point(400, 525)
+ AddHandler MyEvent, AddressOf Me.b_Click
+ End Sub
+
+ <System.CLSCompliantAttribute(false)> _
+ Public Event MyEvent As System.EventHandler
+
+ Private Sub b_Click(ByVal sender As Object, ByVal e As System.EventArgs)
+ End Sub
+ End Class
+ End Namespace");
+ }
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void RegionsSnippetsAndLinePragmas()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- CodeCompileUnit cu = new CodeCompileUnit();
- CodeNamespace ns = new CodeNamespace("Namespace1");
+ CodeCompileUnit cu = new CodeCompileUnit();
+ CodeNamespace ns = new CodeNamespace("Namespace1");
- cu.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Compile Unit Region"));
- cu.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ cu.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Compile Unit Region"));
+ cu.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- cu.Namespaces.Add(ns);
+ cu.Namespaces.Add(ns);
- CodeTypeDeclaration cd = new CodeTypeDeclaration("Class1");
- ns.Types.Add(cd);
+ CodeTypeDeclaration cd = new CodeTypeDeclaration("Class1");
+ ns.Types.Add(cd);
- cd.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Outer Type Region"));
- cd.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ cd.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Outer Type Region"));
+ cd.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- cd.Comments.Add(new CodeCommentStatement("Outer Type Comment"));
+ cd.Comments.Add(new CodeCommentStatement("Outer Type Comment"));
- CodeMemberField field1 = new CodeMemberField(typeof(String), "field1");
- CodeMemberField field2 = new CodeMemberField(typeof(String), "field2");
- field1.Comments.Add(new CodeCommentStatement("Field 1 Comment"));
- field2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Field Region"));
- field2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ CodeMemberField field1 = new CodeMemberField(typeof(String), "field1");
+ CodeMemberField field2 = new CodeMemberField(typeof(String), "field2");
+ field1.Comments.Add(new CodeCommentStatement("Field 1 Comment"));
+ field2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Field Region"));
+ field2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- CodeMemberEvent evt1 = new CodeMemberEvent();
- evt1.Name = "Event1";
- evt1.Type = new CodeTypeReference(typeof(System.EventHandler));
- evt1.Attributes = (evt1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ CodeMemberEvent evt1 = new CodeMemberEvent();
+ evt1.Name = "Event1";
+ evt1.Type = new CodeTypeReference(typeof(System.EventHandler));
+ evt1.Attributes = (evt1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- CodeMemberEvent evt2 = new CodeMemberEvent();
- evt2.Name = "Event2";
- evt2.Type = new CodeTypeReference(typeof(System.EventHandler));
- evt2.Attributes = (evt2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ CodeMemberEvent evt2 = new CodeMemberEvent();
+ evt2.Name = "Event2";
+ evt2.Type = new CodeTypeReference(typeof(System.EventHandler));
+ evt2.Attributes = (evt2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- evt2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Event Region"));
- evt2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ evt2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Event Region"));
+ evt2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- CodeMemberMethod method1 = new CodeMemberMethod();
- method1.Name = "Method1";
- method1.Attributes = (method1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- method1.Statements.Add(
- new CodeDelegateInvokeExpression(
- new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event1"),
- new CodeExpression[] {
- new CodeThisReferenceExpression(),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.EventArgs"), "Empty")
- }));
-
- CodeMemberMethod method2 = new CodeMemberMethod();
- method2.Name = "Method2";
- method2.Attributes = (method2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- method2.Statements.Add(
- new CodeDelegateInvokeExpression(
- new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event2"),
- new CodeExpression[] {
+ CodeMemberMethod method1 = new CodeMemberMethod();
+ method1.Name = "Method1";
+ method1.Attributes = (method1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ method1.Statements.Add(
+ new CodeDelegateInvokeExpression(
+ new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event1"),
+ new CodeExpression[] {
new CodeThisReferenceExpression(),
new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.EventArgs"), "Empty")
- }));
- method2.LinePragma = new CodeLinePragma("MethodLinePragma.txt", 500);
- method2.Comments.Add(new CodeCommentStatement("Method 2 Comment"));
-
- method2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Method Region"));
- method2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeMemberProperty property1 = new CodeMemberProperty();
- property1.Name = "Property1";
- property1.Type = new CodeTypeReference(typeof(string));
- property1.Attributes = (property1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- property1.GetStatements.Add(
- new CodeMethodReturnStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field1")));
-
- CodeMemberProperty property2 = new CodeMemberProperty();
- property2.Name = "Property2";
- property2.Type = new CodeTypeReference(typeof(string));
- property2.Attributes = (property2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- property2.GetStatements.Add(
- new CodeMethodReturnStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field2")));
-
- property2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Property Region"));
- property2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeConstructor constructor1 = new CodeConstructor();
- constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- CodeStatement conState1 = new CodeAssignStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field1"),
- new CodePrimitiveExpression("value1"));
- conState1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Statements Region"));
- constructor1.Statements.Add(conState1);
- CodeStatement conState2 = new CodeAssignStatement(
- new CodeFieldReferenceExpression(
- new CodeThisReferenceExpression(),
- "field2"),
- new CodePrimitiveExpression("value2"));
- conState2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
- constructor1.Statements.Add(conState2);
-
- constructor1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Constructor Region"));
- constructor1.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeConstructor constructor2 = new CodeConstructor();
- constructor2.Attributes = (constructor2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
- constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value1"));
- constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value2"));
-
- CodeTypeConstructor typeConstructor2 = new CodeTypeConstructor();
-
- typeConstructor2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Type Constructor Region"));
- typeConstructor2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeEntryPointMethod methodMain = new CodeEntryPointMethod();
-
- CodeTypeDeclaration nestedClass1 = new CodeTypeDeclaration("NestedClass1");
- CodeTypeDeclaration nestedClass2 = new CodeTypeDeclaration("NestedClass2");
- nestedClass2.LinePragma = new CodeLinePragma("NestedTypeLinePragma.txt", 400);
- nestedClass2.Comments.Add(new CodeCommentStatement("Nested Type Comment"));
-
- nestedClass2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Nested Type Region"));
- nestedClass2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- CodeTypeDelegate delegate1 = new CodeTypeDelegate();
- delegate1.Name = "nestedDelegate1";
- delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
- delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
-
- CodeTypeDelegate delegate2 = new CodeTypeDelegate();
- delegate2.Name = "nestedDelegate2";
- delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
- delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
-
- delegate2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Delegate Region"));
- delegate2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- var snippet1 = new CodeSnippetTypeMember();
- var snippet2 = new CodeSnippetTypeMember();
-
- CodeRegionDirective regionStart = new CodeRegionDirective(CodeRegionMode.End, "");
- regionStart.RegionText = "Snippet Region";
- regionStart.RegionMode = CodeRegionMode.Start;
- snippet2.StartDirectives.Add(regionStart);
- snippet2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
-
- cd.Members.Add(field1);
- cd.Members.Add(method1);
- cd.Members.Add(constructor1);
- cd.Members.Add(property1);
- cd.Members.Add(methodMain);
-
- cd.Members.Add(evt1);
- cd.Members.Add(nestedClass1);
- cd.Members.Add(delegate1);
-
- cd.Members.Add(snippet1);
-
- cd.Members.Add(field2);
- cd.Members.Add(method2);
- cd.Members.Add(constructor2);
- cd.Members.Add(property2);
-
- cd.Members.Add(typeConstructor2);
- cd.Members.Add(evt2);
- cd.Members.Add(nestedClass2);
- cd.Members.Add(delegate2);
- cd.Members.Add(snippet2);
-
- AssertEqual(cu,
- @"#Region ""Compile Unit Region""
- '------------------------------------------------------------------------------
- ' <auto-generated>
- ' This code was generated by a tool.
- '
- ' Changes to this file may cause incorrect behavior and will be lost if
- ' the code is regenerated.
- ' </auto-generated>
- '------------------------------------------------------------------------------
- Option Strict Off
- Option Explicit On
- Namespace Namespace1
- #Region ""Outer Type Region""
- 'Outer Type Comment
- Public Class Class1
- 'Field 1 Comment
- Private field1 As String
- #Region ""Field Region""
- Private field2 As String
- #End Region
- #Region ""Snippet Region""
- #End Region
- #Region ""Type Constructor Region""
- Shared Sub New()
- End Sub
- #End Region
- #Region ""Constructor Region""
- Public Sub New()
- MyBase.New
- Me.field1 = ""value1""
- Me.field2 = ""value2""
- End Sub
- #End Region
- Public Sub New(ByVal value1 As String, ByVal value2 As String)
- MyBase.New
- End Sub
- Public ReadOnly Property Property1() As String
- Get
- Return Me.field1
- End Get
- End Property
- #Region ""Property Region""
- Public ReadOnly Property Property2() As String
- Get
- Return Me.field2
- End Get
- End Property
- #End Region
- Public Event Event1 As System.EventHandler
- #Region ""Event Region""
- Public Event Event2 As System.EventHandler
- #End Region
- Public Sub Method1()
- RaiseEvent Event1(Me, System.EventArgs.Empty)
- End Sub
- Public Shared Sub Main()
- End Sub
- #Region ""Method Region""
- 'Method 2 Comment
- #ExternalSource(""MethodLinePragma.txt"",500)
- Public Sub Method2()
- RaiseEvent Event2(Me, System.EventArgs.Empty)
- End Sub
- #End ExternalSource
- #End Region
- Public Class NestedClass1
- End Class
- Public Delegate Sub nestedDelegate1(ByVal sender As Object, ByVal e As System.EventArgs)
- #Region ""Nested Type Region""
- 'Nested Type Comment
- #ExternalSource(""NestedTypeLinePragma.txt"",400)
- Public Class NestedClass2
- End Class
- #End ExternalSource
- #End Region
- #Region ""Delegate Region""
- Public Delegate Sub nestedDelegate2(ByVal sender As Object, ByVal e As System.EventArgs)
- #End Region
- End Class
- #End Region
- End Namespace
- #End Region");
- }
- }).Dispose();
+ }));
+
+ CodeMemberMethod method2 = new CodeMemberMethod();
+ method2.Name = "Method2";
+ method2.Attributes = (method2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ method2.Statements.Add(
+ new CodeDelegateInvokeExpression(
+ new CodeEventReferenceExpression(new CodeThisReferenceExpression(), "Event2"),
+ new CodeExpression[] {
+ new CodeThisReferenceExpression(),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.EventArgs"), "Empty")
+ }));
+ method2.LinePragma = new CodeLinePragma("MethodLinePragma.txt", 500);
+ method2.Comments.Add(new CodeCommentStatement("Method 2 Comment"));
+
+ method2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Method Region"));
+ method2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeMemberProperty property1 = new CodeMemberProperty();
+ property1.Name = "Property1";
+ property1.Type = new CodeTypeReference(typeof(string));
+ property1.Attributes = (property1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ property1.GetStatements.Add(
+ new CodeMethodReturnStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field1")));
+
+ CodeMemberProperty property2 = new CodeMemberProperty();
+ property2.Name = "Property2";
+ property2.Type = new CodeTypeReference(typeof(string));
+ property2.Attributes = (property2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ property2.GetStatements.Add(
+ new CodeMethodReturnStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field2")));
+
+ property2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Property Region"));
+ property2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeConstructor constructor1 = new CodeConstructor();
+ constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ CodeStatement conState1 = new CodeAssignStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field1"),
+ new CodePrimitiveExpression("value1"));
+ conState1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Statements Region"));
+ constructor1.Statements.Add(conState1);
+ CodeStatement conState2 = new CodeAssignStatement(
+ new CodeFieldReferenceExpression(
+ new CodeThisReferenceExpression(),
+ "field2"),
+ new CodePrimitiveExpression("value2"));
+ conState2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+ constructor1.Statements.Add(conState2);
+
+ constructor1.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Constructor Region"));
+ constructor1.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeConstructor constructor2 = new CodeConstructor();
+ constructor2.Attributes = (constructor2.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
+ constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value1"));
+ constructor2.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "value2"));
+
+ CodeTypeConstructor typeConstructor2 = new CodeTypeConstructor();
+
+ typeConstructor2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Type Constructor Region"));
+ typeConstructor2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeEntryPointMethod methodMain = new CodeEntryPointMethod();
+
+ CodeTypeDeclaration nestedClass1 = new CodeTypeDeclaration("NestedClass1");
+ CodeTypeDeclaration nestedClass2 = new CodeTypeDeclaration("NestedClass2");
+ nestedClass2.LinePragma = new CodeLinePragma("NestedTypeLinePragma.txt", 400);
+ nestedClass2.Comments.Add(new CodeCommentStatement("Nested Type Comment"));
+
+ nestedClass2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Nested Type Region"));
+ nestedClass2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ CodeTypeDelegate delegate1 = new CodeTypeDelegate();
+ delegate1.Name = "nestedDelegate1";
+ delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
+ delegate1.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
+
+ CodeTypeDelegate delegate2 = new CodeTypeDelegate();
+ delegate2.Name = "nestedDelegate2";
+ delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.Object"), "sender"));
+ delegate2.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference("System.EventArgs"), "e"));
+
+ delegate2.StartDirectives.Add(new CodeRegionDirective(CodeRegionMode.Start, "Delegate Region"));
+ delegate2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ var snippet1 = new CodeSnippetTypeMember();
+ var snippet2 = new CodeSnippetTypeMember();
+
+ CodeRegionDirective regionStart = new CodeRegionDirective(CodeRegionMode.End, "");
+ regionStart.RegionText = "Snippet Region";
+ regionStart.RegionMode = CodeRegionMode.Start;
+ snippet2.StartDirectives.Add(regionStart);
+ snippet2.EndDirectives.Add(new CodeRegionDirective(CodeRegionMode.End, string.Empty));
+
+ cd.Members.Add(field1);
+ cd.Members.Add(method1);
+ cd.Members.Add(constructor1);
+ cd.Members.Add(property1);
+ cd.Members.Add(methodMain);
+
+ cd.Members.Add(evt1);
+ cd.Members.Add(nestedClass1);
+ cd.Members.Add(delegate1);
+
+ cd.Members.Add(snippet1);
+
+ cd.Members.Add(field2);
+ cd.Members.Add(method2);
+ cd.Members.Add(constructor2);
+ cd.Members.Add(property2);
+
+ cd.Members.Add(typeConstructor2);
+ cd.Members.Add(evt2);
+ cd.Members.Add(nestedClass2);
+ cd.Members.Add(delegate2);
+ cd.Members.Add(snippet2);
+
+ AssertEqual(cu,
+ @"#Region ""Compile Unit Region""
+ '------------------------------------------------------------------------------
+ ' <auto-generated>
+ ' This code was generated by a tool.
+ '
+ ' Changes to this file may cause incorrect behavior and will be lost if
+ ' the code is regenerated.
+ ' </auto-generated>
+ '------------------------------------------------------------------------------
+ Option Strict Off
+ Option Explicit On
+ Namespace Namespace1
+ #Region ""Outer Type Region""
+ 'Outer Type Comment
+ Public Class Class1
+ 'Field 1 Comment
+ Private field1 As String
+ #Region ""Field Region""
+ Private field2 As String
+ #End Region
+ #Region ""Snippet Region""
+ #End Region
+ #Region ""Type Constructor Region""
+ Shared Sub New()
+ End Sub
+ #End Region
+ #Region ""Constructor Region""
+ Public Sub New()
+ MyBase.New
+ Me.field1 = ""value1""
+ Me.field2 = ""value2""
+ End Sub
+ #End Region
+ Public Sub New(ByVal value1 As String, ByVal value2 As String)
+ MyBase.New
+ End Sub
+ Public ReadOnly Property Property1() As String
+ Get
+ Return Me.field1
+ End Get
+ End Property
+ #Region ""Property Region""
+ Public ReadOnly Property Property2() As String
+ Get
+ Return Me.field2
+ End Get
+ End Property
+ #End Region
+ Public Event Event1 As System.EventHandler
+ #Region ""Event Region""
+ Public Event Event2 As System.EventHandler
+ #End Region
+ Public Sub Method1()
+ RaiseEvent Event1(Me, System.EventArgs.Empty)
+ End Sub
+ Public Shared Sub Main()
+ End Sub
+ #Region ""Method Region""
+ 'Method 2 Comment
+ #ExternalSource(""MethodLinePragma.txt"",500)
+ Public Sub Method2()
+ RaiseEvent Event2(Me, System.EventArgs.Empty)
+ End Sub
+ #End ExternalSource
+ #End Region
+ Public Class NestedClass1
+ End Class
+ Public Delegate Sub nestedDelegate1(ByVal sender As Object, ByVal e As System.EventArgs)
+ #Region ""Nested Type Region""
+ 'Nested Type Comment
+ #ExternalSource(""NestedTypeLinePragma.txt"",400)
+ Public Class NestedClass2
+ End Class
+ #End ExternalSource
+ #End Region
+ #Region ""Delegate Region""
+ Public Delegate Sub nestedDelegate2(ByVal sender As Object, ByVal e As System.EventArgs)
+ #End Region
+ End Class
+ #End Region
+ End Namespace
+ #End Region");
+ }
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
public void ProviderSupports()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ CodeDomProvider provider = GetProvider();
+
+ CodeCompileUnit cu = new CodeCompileUnit();
+ CodeNamespace nspace = new CodeNamespace("NSPC");
+ nspace.Imports.Add(new CodeNamespaceImport("System"));
+ nspace.Imports.Add(new CodeNamespaceImport("System.Drawing"));
+ nspace.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
+ nspace.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
+ cu.Namespaces.Add(nspace);
+
+ CodeTypeDeclaration cd = new CodeTypeDeclaration("TEST");
+ cd.IsClass = true;
+ nspace.Types.Add(cd);
+
+ // Arrays of Arrays
+ CodeMemberMethod cmm = new CodeMemberMethod();
+ cmm.Name = "ArraysOfArrays";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Final | MemberAttributes.Public;
+ if (provider.Supports(GeneratorSupport.ArraysOfArrays))
+ {
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(typeof(int[][])),
+ "arrayOfArrays", new CodeArrayCreateExpression(typeof(int[][]),
+ new CodeArrayCreateExpression(typeof(int[]), new CodePrimitiveExpression(3), new CodePrimitiveExpression(4)),
+ new CodeArrayCreateExpression(typeof(int[]), new CodeExpression[] { new CodePrimitiveExpression(1) }))));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeArrayIndexerExpression(
+ new CodeArrayIndexerExpression(new CodeVariableReferenceExpression("arrayOfArrays"), new CodePrimitiveExpression(0))
+ , new CodePrimitiveExpression(1))));
+ }
+ else
+ {
+ throw new Exception("not supported");
+ }
+ cd.Members.Add(cmm);
+
+ // assembly attributes
+ if (provider.Supports(GeneratorSupport.AssemblyAttributes))
+ {
+ CodeAttributeDeclarationCollection attrs = cu.AssemblyCustomAttributes;
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new
+ CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
+ attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new
+ CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
+ }
+
+ CodeTypeDeclaration class1 = new CodeTypeDeclaration();
+ if (provider.Supports(GeneratorSupport.ChainedConstructorArguments))
{
- CodeDomProvider provider = GetProvider();
-
- CodeCompileUnit cu = new CodeCompileUnit();
- CodeNamespace nspace = new CodeNamespace("NSPC");
- nspace.Imports.Add(new CodeNamespaceImport("System"));
- nspace.Imports.Add(new CodeNamespaceImport("System.Drawing"));
- nspace.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
- nspace.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
- cu.Namespaces.Add(nspace);
-
- CodeTypeDeclaration cd = new CodeTypeDeclaration("TEST");
- cd.IsClass = true;
- nspace.Types.Add(cd);
-
- // Arrays of Arrays
- CodeMemberMethod cmm = new CodeMemberMethod();
- cmm.Name = "ArraysOfArrays";
+ class1.Name = "Test2";
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+
+ class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(String)), "stringField"));
+ CodeMemberProperty prop = new CodeMemberProperty();
+ prop.Name = "accessStringField";
+ prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ prop.Type = new CodeTypeReference(typeof(String));
+ prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+ "stringField")));
+ prop.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new
+ CodeThisReferenceExpression(), "stringField"),
+ new CodePropertySetValueReferenceExpression()));
+ class1.Members.Add(prop);
+
+ CodeConstructor cctor = new CodeConstructor();
+ cctor.Attributes = MemberAttributes.Public;
+ cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression("testingString"));
+ cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
+ cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
+ class1.Members.Add(cctor);
+
+ CodeConstructor cc = new CodeConstructor();
+ cc.Attributes = MemberAttributes.Public | MemberAttributes.Overloaded;
+ cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p1"));
+ cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p2"));
+ cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p3"));
+ cc.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression()
+ , "stringField"), new CodeVariableReferenceExpression("p1")));
+ class1.Members.Add(cc);
+ // verify chained constructors work
+ cmm = new CodeMemberMethod();
+ cmm.Name = "ChainedConstructorUse";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.ReturnType = new CodeTypeReference(typeof(String));
+ // utilize constructor
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("Test2", "t", new CodeObjectCreateExpression("Test2")));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
+ new CodeVariableReferenceExpression("t"), "accessStringField")));
+ cd.Members.Add(cmm);
+ }
+
+ // complex expressions
+ if (provider.Supports(GeneratorSupport.ComplexExpressions))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "ComplexExpressions";
cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Attributes = MemberAttributes.Final | MemberAttributes.Public;
- if (provider.Supports(GeneratorSupport.ArraysOfArrays))
- {
- cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference(typeof(int[][])),
- "arrayOfArrays", new CodeArrayCreateExpression(typeof(int[][]),
- new CodeArrayCreateExpression(typeof(int[]), new CodePrimitiveExpression(3), new CodePrimitiveExpression(4)),
- new CodeArrayCreateExpression(typeof(int[]), new CodeExpression[] { new CodePrimitiveExpression(1) }))));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeArrayIndexerExpression(
- new CodeArrayIndexerExpression(new CodeVariableReferenceExpression("arrayOfArrays"), new CodePrimitiveExpression(0))
- , new CodePrimitiveExpression(1))));
- }
- else
- {
- throw new Exception("not supported");
- }
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(typeof(int)), "i"));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("i"),
+ new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Multiply,
+ new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add,
+ new CodePrimitiveExpression(3)))));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("i")));
cd.Members.Add(cmm);
+ }
- // assembly attributes
- if (provider.Supports(GeneratorSupport.AssemblyAttributes))
- {
- CodeAttributeDeclarationCollection attrs = cu.AssemblyCustomAttributes;
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyTitle", new
- CodeAttributeArgument(new CodePrimitiveExpression("MyAssembly"))));
- attrs.Add(new CodeAttributeDeclaration("System.Reflection.AssemblyVersion", new
- CodeAttributeArgument(new CodePrimitiveExpression("1.0.6.2"))));
- }
-
- CodeTypeDeclaration class1 = new CodeTypeDeclaration();
- if (provider.Supports(GeneratorSupport.ChainedConstructorArguments))
- {
- class1.Name = "Test2";
- class1.IsClass = true;
- nspace.Types.Add(class1);
-
- class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(String)), "stringField"));
- CodeMemberProperty prop = new CodeMemberProperty();
- prop.Name = "accessStringField";
- prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- prop.Type = new CodeTypeReference(typeof(String));
- prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
- "stringField")));
- prop.SetStatements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new
- CodeThisReferenceExpression(), "stringField"),
- new CodePropertySetValueReferenceExpression()));
- class1.Members.Add(prop);
-
- CodeConstructor cctor = new CodeConstructor();
- cctor.Attributes = MemberAttributes.Public;
- cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression("testingString"));
- cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
- cctor.ChainedConstructorArgs.Add(new CodePrimitiveExpression(null));
- class1.Members.Add(cctor);
-
- CodeConstructor cc = new CodeConstructor();
- cc.Attributes = MemberAttributes.Public | MemberAttributes.Overloaded;
- cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p1"));
- cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p2"));
- cc.Parameters.Add(new CodeParameterDeclarationExpression(typeof(string), "p3"));
- cc.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression()
- , "stringField"), new CodeVariableReferenceExpression("p1")));
- class1.Members.Add(cc);
- // verify chained constructors work
- cmm = new CodeMemberMethod();
- cmm.Name = "ChainedConstructorUse";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.ReturnType = new CodeTypeReference(typeof(String));
- // utilize constructor
- cmm.Statements.Add(new CodeVariableDeclarationStatement("Test2", "t", new CodeObjectCreateExpression("Test2")));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
- new CodeVariableReferenceExpression("t"), "accessStringField")));
- cd.Members.Add(cmm);
- }
+ if (provider.Supports(GeneratorSupport.DeclareEnums))
+ {
+ CodeTypeDeclaration ce = new CodeTypeDeclaration("DecimalEnum");
+ ce.IsEnum = true;
+ nspace.Types.Add(ce);
- // complex expressions
- if (provider.Supports(GeneratorSupport.ComplexExpressions))
+ // things to enumerate
+ for (int k = 0; k < 5; k++)
{
- cmm = new CodeMemberMethod();
- cmm.Name = "ComplexExpressions";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Final | MemberAttributes.Public;
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(new CodeTypeReference(typeof(int)), "i"));
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("i"),
- new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Multiply,
- new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add,
- new CodePrimitiveExpression(3)))));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("i")));
- cd.Members.Add(cmm);
+ CodeMemberField Field = new CodeMemberField("System.Int32", "Num" + (k).ToString());
+ Field.InitExpression = new CodePrimitiveExpression(k);
+ ce.Members.Add(Field);
}
+ cmm = new CodeMemberMethod();
+ cmm.Name = "OutputDecimalEnumVal";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
+ cmm.Parameters.Add(param);
+ CodeBinaryOperatorExpression eq = new CodeBinaryOperatorExpression(
+ new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.ValueEquality,
+ new CodePrimitiveExpression(3));
+ CodeMethodReturnStatement truestmt = new CodeMethodReturnStatement(
+ new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num3")));
+ CodeConditionStatement condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(4));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num4")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(2));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num2")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(1));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num1")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
+ CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(0));
+ truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num0")));
+ condstmt = new CodeConditionStatement(eq, truestmt);
+ cmm.Statements.Add(condstmt);
+
+ cmm.ReturnType = new CodeTypeReference("System.int32");
+
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
+ new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add, new CodePrimitiveExpression(10))));
+ cd.Members.Add(cmm);
+ }
- if (provider.Supports(GeneratorSupport.DeclareEnums))
- {
- CodeTypeDeclaration ce = new CodeTypeDeclaration("DecimalEnum");
- ce.IsEnum = true;
- nspace.Types.Add(ce);
-
- // things to enumerate
- for (int k = 0; k < 5; k++)
- {
- CodeMemberField Field = new CodeMemberField("System.Int32", "Num" + (k).ToString());
- Field.InitExpression = new CodePrimitiveExpression(k);
- ce.Members.Add(Field);
- }
- cmm = new CodeMemberMethod();
- cmm.Name = "OutputDecimalEnumVal";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
- cmm.Parameters.Add(param);
- CodeBinaryOperatorExpression eq = new CodeBinaryOperatorExpression(
- new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.ValueEquality,
- new CodePrimitiveExpression(3));
- CodeMethodReturnStatement truestmt = new CodeMethodReturnStatement(
- new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num3")));
- CodeConditionStatement condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(4));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num4")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(2));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num2")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(1));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num1")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- eq = new CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("i"),
- CodeBinaryOperatorType.ValueEquality, new CodePrimitiveExpression(0));
- truestmt = new CodeMethodReturnStatement(new CodeCastExpression(typeof(int),
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("DecimalEnum"), "Num0")));
- condstmt = new CodeConditionStatement(eq, truestmt);
- cmm.Statements.Add(condstmt);
-
- cmm.ReturnType = new CodeTypeReference("System.int32");
+ if (provider.Supports(GeneratorSupport.DeclareInterfaces))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "TestSingleInterface";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("TestSingleInterfaceImp", "t", new CodeObjectCreateExpression("TestSingleInterfaceImp")));
+ CodeMethodInvokeExpression methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t")
+ , "InterfaceMethod");
+ methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
+ cmm.Statements.Add(new CodeMethodReturnStatement(methodinvoke));
+ cd.Members.Add(cmm);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
- new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.Add, new CodePrimitiveExpression(10))));
- cd.Members.Add(cmm);
- }
+ class1 = new CodeTypeDeclaration("InterfaceA");
+ class1.IsInterface = true;
+ nspace.Types.Add(class1);
+ cmm = new CodeMemberMethod();
+ cmm.Attributes = MemberAttributes.Public;
+ cmm.Name = "InterfaceMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
+ class1.Members.Add(cmm);
- if (provider.Supports(GeneratorSupport.DeclareInterfaces))
+ if (provider.Supports(GeneratorSupport.MultipleInterfaceMembers))
{
+ CodeTypeDeclaration classDecl = new CodeTypeDeclaration("InterfaceB");
+ classDecl.IsInterface = true;
+ nspace.Types.Add(classDecl);
cmm = new CodeMemberMethod();
- cmm.Name = "TestSingleInterface";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeVariableDeclarationStatement("TestSingleInterfaceImp", "t", new CodeObjectCreateExpression("TestSingleInterfaceImp")));
- CodeMethodInvokeExpression methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t")
- , "InterfaceMethod");
- methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
- cmm.Statements.Add(new CodeMethodReturnStatement(methodinvoke));
- cd.Members.Add(cmm);
-
- class1 = new CodeTypeDeclaration("InterfaceA");
- class1.IsInterface = true;
- nspace.Types.Add(class1);
- cmm = new CodeMemberMethod();
- cmm.Attributes = MemberAttributes.Public;
cmm.Name = "InterfaceMethod";
+ cmm.Attributes = MemberAttributes.Public;
cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- class1.Members.Add(cmm);
-
- if (provider.Supports(GeneratorSupport.MultipleInterfaceMembers))
- {
- CodeTypeDeclaration classDecl = new CodeTypeDeclaration("InterfaceB");
- classDecl.IsInterface = true;
- nspace.Types.Add(classDecl);
- cmm = new CodeMemberMethod();
- cmm.Name = "InterfaceMethod";
- cmm.Attributes = MemberAttributes.Public;
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- classDecl.Members.Add(cmm);
-
- CodeTypeDeclaration class2 = new CodeTypeDeclaration("TestMultipleInterfaceImp");
- class2.BaseTypes.Add(new CodeTypeReference("System.Object"));
- class2.BaseTypes.Add(new CodeTypeReference("InterfaceB"));
- class2.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
- class2.IsClass = true;
- nspace.Types.Add(class2);
- cmm = new CodeMemberMethod();
- cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceA"));
- cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceB"));
- cmm.Name = "InterfaceMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- class2.Members.Add(cmm);
-
- cmm = new CodeMemberMethod();
- cmm.Name = "TestMultipleInterfaces";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeVariableDeclarationStatement("TestMultipleInterfaceImp", "t", new CodeObjectCreateExpression("TestMultipleInterfaceImp")));
- cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceA", "interfaceAobject", new CodeCastExpression("InterfaceA",
- new CodeVariableReferenceExpression("t"))));
- cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceB", "interfaceBobject", new CodeCastExpression("InterfaceB",
- new CodeVariableReferenceExpression("t"))));
- methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceAobject")
- , "InterfaceMethod");
- methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
- CodeMethodInvokeExpression methodinvoke2 = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceBobject")
- , "InterfaceMethod");
- methodinvoke2.Parameters.Add(new CodeVariableReferenceExpression("i"));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
- methodinvoke,
- CodeBinaryOperatorType.Subtract, methodinvoke2)));
- cd.Members.Add(cmm);
- }
-
- class1 = new CodeTypeDeclaration("TestSingleInterfaceImp");
- class1.BaseTypes.Add(new CodeTypeReference("System.Object"));
- class1.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
- class1.IsClass = true;
- nspace.Types.Add(class1);
+ classDecl.Members.Add(cmm);
+
+ CodeTypeDeclaration class2 = new CodeTypeDeclaration("TestMultipleInterfaceImp");
+ class2.BaseTypes.Add(new CodeTypeReference("System.Object"));
+ class2.BaseTypes.Add(new CodeTypeReference("InterfaceB"));
+ class2.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
+ class2.IsClass = true;
+ nspace.Types.Add(class2);
cmm = new CodeMemberMethod();
cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceA"));
+ cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceB"));
cmm.Name = "InterfaceMethod";
cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- cmm.Attributes = MemberAttributes.Public;
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- class1.Members.Add(cmm);
- }
-
- if (provider.Supports(GeneratorSupport.DeclareValueTypes))
- {
- CodeTypeDeclaration structA = new CodeTypeDeclaration("structA");
- structA.IsStruct = true;
-
- CodeTypeDeclaration structB = new CodeTypeDeclaration("structB");
- structB.Attributes = MemberAttributes.Public;
- structB.IsStruct = true;
-
- CodeMemberField firstInt = new CodeMemberField(typeof(int), "int1");
- firstInt.Attributes = MemberAttributes.Public;
- structB.Members.Add(firstInt);
-
- CodeMemberField innerStruct = new CodeMemberField("structB", "innerStruct");
- innerStruct.Attributes = MemberAttributes.Public;
-
- structA.Members.Add(structB);
- structA.Members.Add(innerStruct);
- nspace.Types.Add(structA);
-
- CodeMemberMethod nestedStructMethod = new CodeMemberMethod();
- nestedStructMethod.Name = "NestedStructMethod";
- nestedStructMethod.ReturnType = new CodeTypeReference(typeof(int));
- nestedStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeVariableDeclarationStatement varStructA = new CodeVariableDeclarationStatement("structA", "varStructA");
- nestedStructMethod.Statements.Add(varStructA);
- nestedStructMethod.Statements.Add
- (
- new CodeAssignStatement
- (
- /* Expression1 */ new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1"),
- /* Expression1 */ new CodePrimitiveExpression(3)
- )
- );
- nestedStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1")));
- cd.Members.Add(nestedStructMethod);
- }
-
- if (provider.Supports(GeneratorSupport.EntryPointMethod))
- {
- CodeEntryPointMethod cep = new CodeEntryPointMethod();
- cd.Members.Add(cep);
- }
+ class2.Members.Add(cmm);
- // goto statements
- if (provider.Supports(GeneratorSupport.GotoStatements))
- {
cmm = new CodeMemberMethod();
- cmm.Name = "GoToMethod";
+ cmm.Name = "TestMultipleInterfaces";
cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
- cmm.Parameters.Add(param);
- CodeConditionStatement condstmt = new CodeConditionStatement(new CodeBinaryOperatorExpression(
- new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.LessThan, new CodePrimitiveExpression(1)),
- new CodeGotoStatement("comehere"));
- cmm.Statements.Add(condstmt);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(6)));
- cmm.Statements.Add(new CodeLabeledStatement("comehere",
- new CodeMethodReturnStatement(new CodePrimitiveExpression(7))));
- cd.Members.Add(cmm);
- }
-
- if (provider.Supports(GeneratorSupport.NestedTypes))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "CallingPublicNestedScenario";
cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
- cmm.ReturnType = new CodeTypeReference(typeof(int));
cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference
- ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"), "t",
- new CodeObjectCreateExpression(new CodeTypeReference
- ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"))));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t"),
- "publicNestedClassesMethod",
- new CodeVariableReferenceExpression("i"))));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("TestMultipleInterfaceImp", "t", new CodeObjectCreateExpression("TestMultipleInterfaceImp")));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceA", "interfaceAobject", new CodeCastExpression("InterfaceA",
+ new CodeVariableReferenceExpression("t"))));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("InterfaceB", "interfaceBobject", new CodeCastExpression("InterfaceB",
+ new CodeVariableReferenceExpression("t"))));
+ methodinvoke = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceAobject")
+ , "InterfaceMethod");
+ methodinvoke.Parameters.Add(new CodeVariableReferenceExpression("i"));
+ CodeMethodInvokeExpression methodinvoke2 = new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("interfaceBobject")
+ , "InterfaceMethod");
+ methodinvoke2.Parameters.Add(new CodeVariableReferenceExpression("i"));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression(
+ methodinvoke,
+ CodeBinaryOperatorType.Subtract, methodinvoke2)));
cd.Members.Add(cmm);
-
- class1 = new CodeTypeDeclaration("PublicNestedClassA");
- class1.IsClass = true;
- nspace.Types.Add(class1);
- CodeTypeDeclaration nestedClass = new CodeTypeDeclaration("PublicNestedClassB1");
- nestedClass.IsClass = true;
- nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
- class1.Members.Add(nestedClass);
- nestedClass = new CodeTypeDeclaration("PublicNestedClassB2");
- nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
- nestedClass.IsClass = true;
- class1.Members.Add(nestedClass);
- CodeTypeDeclaration innerNestedClass = new CodeTypeDeclaration("PublicNestedClassC");
- innerNestedClass.TypeAttributes = TypeAttributes.NestedPublic;
- innerNestedClass.IsClass = true;
- nestedClass.Members.Add(innerNestedClass);
- cmm = new CodeMemberMethod();
- cmm.Name = "publicNestedClassesMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- innerNestedClass.Members.Add(cmm);
}
- // Parameter Attributes
- if (provider.Supports(GeneratorSupport.ParameterAttributes))
- {
- CodeMemberMethod method1 = new CodeMemberMethod();
- method1.Name = "MyMethod";
- method1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- CodeParameterDeclarationExpression param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
- param1.CustomAttributes.Add(
- new CodeAttributeDeclaration(
- "System.Xml.Serialization.XmlElementAttribute",
- new CodeAttributeArgument(
- "Form",
- new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
- new CodeAttributeArgument(
- "IsNullable",
- new CodePrimitiveExpression(false))));
- method1.Parameters.Add(param1);
- cd.Members.Add(method1);
- }
+ class1 = new CodeTypeDeclaration("TestSingleInterfaceImp");
+ class1.BaseTypes.Add(new CodeTypeReference("System.Object"));
+ class1.BaseTypes.Add(new CodeTypeReference("InterfaceA"));
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+ cmm = new CodeMemberMethod();
+ cmm.ImplementationTypes.Add(new CodeTypeReference("InterfaceA"));
+ cmm.Name = "InterfaceMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
+ cmm.Attributes = MemberAttributes.Public;
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
+ class1.Members.Add(cmm);
+ }
- // public static members
- if (provider.Supports(GeneratorSupport.PublicStaticMembers))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "PublicStaticMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(16)));
- cd.Members.Add(cmm);
- }
+ if (provider.Supports(GeneratorSupport.DeclareValueTypes))
+ {
+ CodeTypeDeclaration structA = new CodeTypeDeclaration("structA");
+ structA.IsStruct = true;
+
+ CodeTypeDeclaration structB = new CodeTypeDeclaration("structB");
+ structB.Attributes = MemberAttributes.Public;
+ structB.IsStruct = true;
+
+ CodeMemberField firstInt = new CodeMemberField(typeof(int), "int1");
+ firstInt.Attributes = MemberAttributes.Public;
+ structB.Members.Add(firstInt);
+
+ CodeMemberField innerStruct = new CodeMemberField("structB", "innerStruct");
+ innerStruct.Attributes = MemberAttributes.Public;
+
+ structA.Members.Add(structB);
+ structA.Members.Add(innerStruct);
+ nspace.Types.Add(structA);
+
+ CodeMemberMethod nestedStructMethod = new CodeMemberMethod();
+ nestedStructMethod.Name = "NestedStructMethod";
+ nestedStructMethod.ReturnType = new CodeTypeReference(typeof(int));
+ nestedStructMethod.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeVariableDeclarationStatement varStructA = new CodeVariableDeclarationStatement("structA", "varStructA");
+ nestedStructMethod.Statements.Add(varStructA);
+ nestedStructMethod.Statements.Add
+ (
+ new CodeAssignStatement
+ (
+ /* Expression1 */ new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1"),
+ /* Expression1 */ new CodePrimitiveExpression(3)
+ )
+ );
+ nestedStructMethod.Statements.Add(new CodeMethodReturnStatement(new CodeFieldReferenceExpression(new CodeFieldReferenceExpression(new CodeVariableReferenceExpression("varStructA"), "innerStruct"), "int1")));
+ cd.Members.Add(nestedStructMethod);
+ }
- // reference parameters
- if (provider.Supports(GeneratorSupport.ReferenceParameters))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "Work";
- cmm.ReturnType = new CodeTypeReference("System.void");
- cmm.Attributes = MemberAttributes.Static;
- // add parameter with ref direction
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
- param.Direction = FieldDirection.Ref;
- cmm.Parameters.Add(param);
- // add parameter with out direction
- param = new CodeParameterDeclarationExpression(typeof(int), "j");
- param.Direction = FieldDirection.Out;
- cmm.Parameters.Add(param);
- cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("i"),
- new CodeBinaryOperatorExpression(new CodeArgumentReferenceExpression("i"),
- CodeBinaryOperatorType.Add, new CodePrimitiveExpression(4))));
- cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("j"),
- new CodePrimitiveExpression(5)));
- cd.Members.Add(cmm);
+ if (provider.Supports(GeneratorSupport.EntryPointMethod))
+ {
+ CodeEntryPointMethod cep = new CodeEntryPointMethod();
+ cd.Members.Add(cep);
+ }
- cmm = new CodeMemberMethod();
- cmm.Name = "CallingWork";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeParameterDeclarationExpression parames = new CodeParameterDeclarationExpression(typeof(int), "a");
- cmm.Parameters.Add(parames);
- cmm.ReturnType = new CodeTypeReference("System.int32");
- cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"),
- new CodePrimitiveExpression(10)));
- cmm.Statements.Add(new CodeVariableDeclarationStatement(typeof(int), "b"));
- // invoke the method called "work"
- CodeMethodInvokeExpression methodinvoked = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression
- (new CodeTypeReferenceExpression("TEST"), "Work"));
- // add parameter with ref direction
- CodeDirectionExpression parameter = new CodeDirectionExpression(FieldDirection.Ref,
- new CodeVariableReferenceExpression("a"));
- methodinvoked.Parameters.Add(parameter);
- // add parameter with out direction
- parameter = new CodeDirectionExpression(FieldDirection.Out, new CodeVariableReferenceExpression("b"));
- methodinvoked.Parameters.Add(parameter);
- cmm.Statements.Add(methodinvoked);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression
- (new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add, new CodeVariableReferenceExpression("b"))));
- cd.Members.Add(cmm);
- }
+ // goto statements
+ if (provider.Supports(GeneratorSupport.GotoStatements))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "GoToMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
+ cmm.Parameters.Add(param);
+ CodeConditionStatement condstmt = new CodeConditionStatement(new CodeBinaryOperatorExpression(
+ new CodeVariableReferenceExpression("i"), CodeBinaryOperatorType.LessThan, new CodePrimitiveExpression(1)),
+ new CodeGotoStatement("comehere"));
+ cmm.Statements.Add(condstmt);
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(6)));
+ cmm.Statements.Add(new CodeLabeledStatement("comehere",
+ new CodeMethodReturnStatement(new CodePrimitiveExpression(7))));
+ cd.Members.Add(cmm);
+ }
- if (provider.Supports(GeneratorSupport.ReturnTypeAttributes))
- {
- CodeMemberMethod function1 = new CodeMemberMethod();
- function1.Name = "MyFunction";
- function1.ReturnType = new CodeTypeReference(typeof(string));
- function1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- function1.ReturnTypeCustomAttributes.Add(new
- CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
- function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
- CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
- CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
- function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
- cd.Members.Add(function1);
- }
+ if (provider.Supports(GeneratorSupport.NestedTypes))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "CallingPublicNestedScenario";
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "i"));
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(new CodeTypeReference
+ ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"), "t",
+ new CodeObjectCreateExpression(new CodeTypeReference
+ ("PublicNestedClassA+PublicNestedClassB2+PublicNestedClassC"))));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodInvokeExpression(new CodeVariableReferenceExpression("t"),
+ "publicNestedClassesMethod",
+ new CodeVariableReferenceExpression("i"))));
+ cd.Members.Add(cmm);
- if (provider.Supports(GeneratorSupport.StaticConstructors))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "TestStaticConstructor";
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
- cmm.Parameters.Add(param);
- // utilize constructor
- cmm.Statements.Add(new CodeVariableDeclarationStatement("Test4", "t", new CodeObjectCreateExpression("Test4")));
- // set then get number
- cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression("t"), "i")
- , new CodeVariableReferenceExpression("a")));
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
- new CodeVariableReferenceExpression("t"), "i")));
- cd.Members.Add(cmm);
+ class1 = new CodeTypeDeclaration("PublicNestedClassA");
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+ CodeTypeDeclaration nestedClass = new CodeTypeDeclaration("PublicNestedClassB1");
+ nestedClass.IsClass = true;
+ nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
+ class1.Members.Add(nestedClass);
+ nestedClass = new CodeTypeDeclaration("PublicNestedClassB2");
+ nestedClass.TypeAttributes = TypeAttributes.NestedPublic;
+ nestedClass.IsClass = true;
+ class1.Members.Add(nestedClass);
+ CodeTypeDeclaration innerNestedClass = new CodeTypeDeclaration("PublicNestedClassC");
+ innerNestedClass.TypeAttributes = TypeAttributes.NestedPublic;
+ innerNestedClass.IsClass = true;
+ nestedClass.Members.Add(innerNestedClass);
+ cmm = new CodeMemberMethod();
+ cmm.Name = "publicNestedClassesMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(int), "a"));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
+ innerNestedClass.Members.Add(cmm);
+ }
- class1 = new CodeTypeDeclaration();
- class1.Name = "Test4";
- class1.IsClass = true;
- nspace.Types.Add(class1);
-
- class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(int)), "number"));
- CodeMemberProperty prop = new CodeMemberProperty();
- prop.Name = "i";
- prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
- prop.Type = new CodeTypeReference(typeof(int));
- prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("number")));
- prop.SetStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("number"),
- new CodePropertySetValueReferenceExpression()));
- class1.Members.Add(prop);
- CodeTypeConstructor ctc = new CodeTypeConstructor();
- class1.Members.Add(ctc);
- }
+ // Parameter Attributes
+ if (provider.Supports(GeneratorSupport.ParameterAttributes))
+ {
+ CodeMemberMethod method1 = new CodeMemberMethod();
+ method1.Name = "MyMethod";
+ method1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ CodeParameterDeclarationExpression param1 = new CodeParameterDeclarationExpression(typeof(string), "blah");
+ param1.CustomAttributes.Add(
+ new CodeAttributeDeclaration(
+ "System.Xml.Serialization.XmlElementAttribute",
+ new CodeAttributeArgument(
+ "Form",
+ new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("System.Xml.Schema.XmlSchemaForm"), "Unqualified")),
+ new CodeAttributeArgument(
+ "IsNullable",
+ new CodePrimitiveExpression(false))));
+ method1.Parameters.Add(param1);
+ cd.Members.Add(method1);
+ }
- if (provider.Supports(GeneratorSupport.TryCatchStatements))
- {
- cmm = new CodeMemberMethod();
- cmm.Name = "TryCatchMethod";
- cmm.ReturnType = new CodeTypeReference(typeof(int));
- cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
- CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
- cmm.Parameters.Add(param);
-
- CodeTryCatchFinallyStatement tcfstmt = new CodeTryCatchFinallyStatement();
- tcfstmt.FinallyStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"), new
- CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add,
- new CodePrimitiveExpression(5))));
- cmm.Statements.Add(tcfstmt);
- cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
- cd.Members.Add(cmm);
- }
+ // public static members
+ if (provider.Supports(GeneratorSupport.PublicStaticMembers))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "PublicStaticMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(16)));
+ cd.Members.Add(cmm);
+ }
- if (provider.Supports(GeneratorSupport.DeclareEvents))
- {
- CodeNamespace ns = new CodeNamespace();
- ns.Name = "MyNamespace";
- ns.Imports.Add(new CodeNamespaceImport("System"));
- ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
- ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
- ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
- cu.Namespaces.Add(ns);
- class1 = new CodeTypeDeclaration("Test");
- class1.IsClass = true;
- class1.BaseTypes.Add(new CodeTypeReference("Form"));
- ns.Types.Add(class1);
-
- CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
- mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
- class1.Members.Add(mfield);
-
- CodeConstructor ctor = new CodeConstructor();
- ctor.Attributes = MemberAttributes.Public;
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
- "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
- new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Text"), new CodePrimitiveExpression("Test")));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "TabIndex"), new CodePrimitiveExpression(0)));
- ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
- "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
- new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
- ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
- CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
- , new CodeThisReferenceExpression(), "b_Click")));
- class1.Members.Add(ctor);
-
- CodeMemberEvent evt = new CodeMemberEvent();
- evt.Name = "MyEvent";
- evt.Type = new CodeTypeReference("System.EventHandler");
- evt.Attributes = MemberAttributes.Public;
- class1.Members.Add(evt);
+ // reference parameters
+ if (provider.Supports(GeneratorSupport.ReferenceParameters))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "Work";
+ cmm.ReturnType = new CodeTypeReference("System.void");
+ cmm.Attributes = MemberAttributes.Static;
+ // add parameter with ref direction
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "i");
+ param.Direction = FieldDirection.Ref;
+ cmm.Parameters.Add(param);
+ // add parameter with out direction
+ param = new CodeParameterDeclarationExpression(typeof(int), "j");
+ param.Direction = FieldDirection.Out;
+ cmm.Parameters.Add(param);
+ cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("i"),
+ new CodeBinaryOperatorExpression(new CodeArgumentReferenceExpression("i"),
+ CodeBinaryOperatorType.Add, new CodePrimitiveExpression(4))));
+ cmm.Statements.Add(new CodeAssignStatement(new CodeArgumentReferenceExpression("j"),
+ new CodePrimitiveExpression(5)));
+ cd.Members.Add(cmm);
- cmm = new CodeMemberMethod();
- cmm.Name = "b_Click";
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
- cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
- class1.Members.Add(cmm);
- }
+ cmm = new CodeMemberMethod();
+ cmm.Name = "CallingWork";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeParameterDeclarationExpression parames = new CodeParameterDeclarationExpression(typeof(int), "a");
+ cmm.Parameters.Add(parames);
+ cmm.ReturnType = new CodeTypeReference("System.int32");
+ cmm.Statements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"),
+ new CodePrimitiveExpression(10)));
+ cmm.Statements.Add(new CodeVariableDeclarationStatement(typeof(int), "b"));
+ // invoke the method called "work"
+ CodeMethodInvokeExpression methodinvoked = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression
+ (new CodeTypeReferenceExpression("TEST"), "Work"));
+ // add parameter with ref direction
+ CodeDirectionExpression parameter = new CodeDirectionExpression(FieldDirection.Ref,
+ new CodeVariableReferenceExpression("a"));
+ methodinvoked.Parameters.Add(parameter);
+ // add parameter with out direction
+ parameter = new CodeDirectionExpression(FieldDirection.Out, new CodeVariableReferenceExpression("b"));
+ methodinvoked.Parameters.Add(parameter);
+ cmm.Statements.Add(methodinvoked);
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeBinaryOperatorExpression
+ (new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add, new CodeVariableReferenceExpression("b"))));
+ cd.Members.Add(cmm);
+ }
- AssertEqual(cu,
- @"'------------------------------------------------------------------------------
- ' <auto-generated>
- ' This code was generated by a tool.
- '
- ' Changes to this file may cause incorrect behavior and will be lost if
- ' the code is regenerated.
- ' </auto-generated>
- '------------------------------------------------------------------------------
-
- Option Strict Off
- Option Explicit On
-
- Imports System
- Imports System.ComponentModel
- Imports System.Drawing
- Imports System.Windows.Forms
- <Assembly: System.Reflection.AssemblyTitle(""MyAssembly""), _
- Assembly: System.Reflection.AssemblyVersion(""1.0.6.2"")>
-
- Namespace NSPC
-
- Public Class TEST
-
- Public Function ArraysOfArrays() As Integer
- Dim arrayOfArrays()() As Integer = New Integer()() {New Integer() {3, 4}, New Integer() {1}}
- Return arrayOfArrays(0)(1)
- End Function
-
- Public Shared Function ChainedConstructorUse() As String
- Dim t As Test2 = New Test2()
- Return t.accessStringField
- End Function
-
- Public Function ComplexExpressions(ByVal i As Integer) As Integer
- i = (i _
- * (i + 3))
- Return i
- End Function
-
- Public Shared Function OutputDecimalEnumVal(ByVal i As Integer) As Integer
- If (i = 3) Then
- Return CType(DecimalEnum.Num3,Integer)
- End If
- If (i = 4) Then
- Return CType(DecimalEnum.Num4,Integer)
- End If
- If (i = 2) Then
- Return CType(DecimalEnum.Num2,Integer)
- End If
- If (i = 1) Then
- Return CType(DecimalEnum.Num1,Integer)
- End If
- If (i = 0) Then
- Return CType(DecimalEnum.Num0,Integer)
- End If
- Return (i + 10)
- End Function
-
- Public Shared Function TestSingleInterface(ByVal i As Integer) As Integer
- Dim t As TestSingleInterfaceImp = New TestSingleInterfaceImp()
- Return t.InterfaceMethod(i)
- End Function
-
- Public Shared Function TestMultipleInterfaces(ByVal i As Integer) As Integer
- Dim t As TestMultipleInterfaceImp = New TestMultipleInterfaceImp()
- Dim interfaceAobject As InterfaceA = CType(t,InterfaceA)
- Dim interfaceBobject As InterfaceB = CType(t,InterfaceB)
- Return (interfaceAobject.InterfaceMethod(i) - interfaceBobject.InterfaceMethod(i))
- End Function
-
- Public Shared Function NestedStructMethod() As Integer
- Dim varStructA As structA
- varStructA.innerStruct.int1 = 3
- Return varStructA.innerStruct.int1
- End Function
-
- Public Shared Sub Main()
- End Sub
-
- Public Function GoToMethod(ByVal i As Integer) As Integer
- If (i < 1) Then
- goto comehere
- End If
- Return 6
- comehere:
- Return 7
- End Function
-
- Public Shared Function CallingPublicNestedScenario(ByVal i As Integer) As Integer
- Dim t As PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC = New PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC()
- Return t.publicNestedClassesMethod(i)
- End Function
-
- Public Sub MyMethod(<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)> ByVal blah As String)
- End Sub
-
- Public Shared Function PublicStaticMethod() As Integer
- Return 16
- End Function
-
- Shared Sub Work(ByRef i As Integer, ByRef j As Integer)
- i = (i + 4)
- j = 5
- End Sub
-
- Public Shared Function CallingWork(ByVal a As Integer) As Integer
- a = 10
- Dim b As Integer
- TEST.Work(a, b)
- Return (a + b)
- End Function
-
- Public Function MyFunction() As <System.Xml.Serialization.XmlIgnoreAttribute(), System.Xml.Serialization.XmlRootAttribute([Namespace]:=""Namespace Value"", ElementName:=""Root, hehehe"")> String
- Return ""Return""
- End Function
-
- Public Shared Function TestStaticConstructor(ByVal a As Integer) As Integer
- Dim t As Test4 = New Test4()
- t.i = a
- Return t.i
- End Function
-
- Public Shared Function TryCatchMethod(ByVal a As Integer) As Integer
- Try
- Finally
- a = (a + 5)
- End Try
- Return a
- End Function
- End Class
-
- Public Class Test2
-
- Private stringField As String
-
- Public Sub New()
- Me.New(""testingString"", Nothing, Nothing)
- End Sub
-
- Public Sub New(ByVal p1 As String, ByVal p2 As String, ByVal p3 As String)
- MyBase.New
- Me.stringField = p1
- End Sub
-
- Public Property accessStringField() As String
- Get
- Return Me.stringField
- End Get
- Set
- Me.stringField = value
- End Set
- End Property
- End Class
-
- Public Enum DecimalEnum
-
- Num0 = 0
-
- Num1 = 1
-
- Num2 = 2
-
- Num3 = 3
-
- Num4 = 4
- End Enum
-
- Public Interface InterfaceA
+ if (provider.Supports(GeneratorSupport.ReturnTypeAttributes))
+ {
+ CodeMemberMethod function1 = new CodeMemberMethod();
+ function1.Name = "MyFunction";
+ function1.ReturnType = new CodeTypeReference(typeof(string));
+ function1.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ function1.ReturnTypeCustomAttributes.Add(new
+ CodeAttributeDeclaration("System.Xml.Serialization.XmlIgnoreAttribute"));
+ function1.ReturnTypeCustomAttributes.Add(new CodeAttributeDeclaration("System.Xml.Serialization.XmlRootAttribute", new
+ CodeAttributeArgument("Namespace", new CodePrimitiveExpression("Namespace Value")), new
+ CodeAttributeArgument("ElementName", new CodePrimitiveExpression("Root, hehehe"))));
+ function1.Statements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression("Return")));
+ cd.Members.Add(function1);
+ }
- Function InterfaceMethod(ByVal a As Integer) As Integer
- End Interface
-
- Public Interface InterfaceB
+ if (provider.Supports(GeneratorSupport.StaticConstructors))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "TestStaticConstructor";
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
+ cmm.Parameters.Add(param);
+ // utilize constructor
+ cmm.Statements.Add(new CodeVariableDeclarationStatement("Test4", "t", new CodeObjectCreateExpression("Test4")));
+ // set then get number
+ cmm.Statements.Add(new CodeAssignStatement(new CodePropertyReferenceExpression(new CodeVariableReferenceExpression("t"), "i")
+ , new CodeVariableReferenceExpression("a")));
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeMethodReferenceExpression(
+ new CodeVariableReferenceExpression("t"), "i")));
+ cd.Members.Add(cmm);
- Function InterfaceMethod(ByVal a As Integer) As Integer
- End Interface
+ class1 = new CodeTypeDeclaration();
+ class1.Name = "Test4";
+ class1.IsClass = true;
+ nspace.Types.Add(class1);
+
+ class1.Members.Add(new CodeMemberField(new CodeTypeReference(typeof(int)), "number"));
+ CodeMemberProperty prop = new CodeMemberProperty();
+ prop.Name = "i";
+ prop.Attributes = MemberAttributes.Public | MemberAttributes.Final;
+ prop.Type = new CodeTypeReference(typeof(int));
+ prop.GetStatements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("number")));
+ prop.SetStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("number"),
+ new CodePropertySetValueReferenceExpression()));
+ class1.Members.Add(prop);
+ CodeTypeConstructor ctc = new CodeTypeConstructor();
+ class1.Members.Add(ctc);
+ }
- Public Class TestMultipleInterfaceImp
- Inherits Object
- Implements InterfaceB, InterfaceA
+ if (provider.Supports(GeneratorSupport.TryCatchStatements))
+ {
+ cmm = new CodeMemberMethod();
+ cmm.Name = "TryCatchMethod";
+ cmm.ReturnType = new CodeTypeReference(typeof(int));
+ cmm.Attributes = MemberAttributes.Public | MemberAttributes.Static;
+ CodeParameterDeclarationExpression param = new CodeParameterDeclarationExpression(typeof(int), "a");
+ cmm.Parameters.Add(param);
+
+ CodeTryCatchFinallyStatement tcfstmt = new CodeTryCatchFinallyStatement();
+ tcfstmt.FinallyStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression("a"), new
+ CodeBinaryOperatorExpression(new CodeVariableReferenceExpression("a"), CodeBinaryOperatorType.Add,
+ new CodePrimitiveExpression(5))));
+ cmm.Statements.Add(tcfstmt);
+ cmm.Statements.Add(new CodeMethodReturnStatement(new CodeVariableReferenceExpression("a")));
+ cd.Members.Add(cmm);
+ }
- Public Function InterfaceMethod(ByVal a As Integer) As Integer Implements InterfaceA.InterfaceMethod , InterfaceB.InterfaceMethod
- Return a
- End Function
- End Class
+ if (provider.Supports(GeneratorSupport.DeclareEvents))
+ {
+ CodeNamespace ns = new CodeNamespace();
+ ns.Name = "MyNamespace";
+ ns.Imports.Add(new CodeNamespaceImport("System"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Drawing"));
+ ns.Imports.Add(new CodeNamespaceImport("System.Windows.Forms"));
+ ns.Imports.Add(new CodeNamespaceImport("System.ComponentModel"));
+ cu.Namespaces.Add(ns);
+ class1 = new CodeTypeDeclaration("Test");
+ class1.IsClass = true;
+ class1.BaseTypes.Add(new CodeTypeReference("Form"));
+ ns.Types.Add(class1);
- Public Class TestSingleInterfaceImp
- Inherits Object
- Implements InterfaceA
+ CodeMemberField mfield = new CodeMemberField(new CodeTypeReference("Button"), "b");
+ mfield.InitExpression = new CodeObjectCreateExpression(new CodeTypeReference("Button"));
+ class1.Members.Add(mfield);
- Public Overridable Function InterfaceMethod(ByVal a As Integer) As Integer Implements InterfaceA.InterfaceMethod
- Return a
- End Function
- End Class
+ CodeConstructor ctor = new CodeConstructor();
+ ctor.Attributes = MemberAttributes.Public;
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeThisReferenceExpression(),
+ "Size"), new CodeObjectCreateExpression(new CodeTypeReference("Size"),
+ new CodePrimitiveExpression(600), new CodePrimitiveExpression(600))));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Text"), new CodePrimitiveExpression("Test")));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "TabIndex"), new CodePrimitiveExpression(0)));
+ ctor.Statements.Add(new CodeAssignStatement(new CodeFieldReferenceExpression(new CodeTypeReferenceExpression("b"),
+ "Location"), new CodeObjectCreateExpression(new CodeTypeReference("Point"),
+ new CodePrimitiveExpression(400), new CodePrimitiveExpression(525))));
+ ctor.Statements.Add(new CodeAttachEventStatement(new CodeEventReferenceExpression(new
+ CodeThisReferenceExpression(), "MyEvent"), new CodeDelegateCreateExpression(new CodeTypeReference("EventHandler")
+ , new CodeThisReferenceExpression(), "b_Click")));
+ class1.Members.Add(ctor);
- Public Structure structA
+ CodeMemberEvent evt = new CodeMemberEvent();
+ evt.Name = "MyEvent";
+ evt.Type = new CodeTypeReference("System.EventHandler");
+ evt.Attributes = MemberAttributes.Public;
+ class1.Members.Add(evt);
- Public innerStruct As structB
+ cmm = new CodeMemberMethod();
+ cmm.Name = "b_Click";
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(object), "sender"));
+ cmm.Parameters.Add(new CodeParameterDeclarationExpression(typeof(EventArgs), "e"));
+ class1.Members.Add(cmm);
+ }
- Public Structure structB
+ AssertEqual(cu,
+ @"'------------------------------------------------------------------------------
+ ' <auto-generated>
+ ' This code was generated by a tool.
+ '
+ ' Changes to this file may cause incorrect behavior and will be lost if
+ ' the code is regenerated.
+ ' </auto-generated>
+ '------------------------------------------------------------------------------
+
+ Option Strict Off
+ Option Explicit On
+
+ Imports System
+ Imports System.ComponentModel
+ Imports System.Drawing
+ Imports System.Windows.Forms
+ <Assembly: System.Reflection.AssemblyTitle(""MyAssembly""), _
+ Assembly: System.Reflection.AssemblyVersion(""1.0.6.2"")>
+
+ Namespace NSPC
+
+ Public Class TEST
+
+ Public Function ArraysOfArrays() As Integer
+ Dim arrayOfArrays()() As Integer = New Integer()() {New Integer() {3, 4}, New Integer() {1}}
+ Return arrayOfArrays(0)(1)
+ End Function
+
+ Public Shared Function ChainedConstructorUse() As String
+ Dim t As Test2 = New Test2()
+ Return t.accessStringField
+ End Function
+
+ Public Function ComplexExpressions(ByVal i As Integer) As Integer
+ i = (i _
+ * (i + 3))
+ Return i
+ End Function
+
+ Public Shared Function OutputDecimalEnumVal(ByVal i As Integer) As Integer
+ If (i = 3) Then
+ Return CType(DecimalEnum.Num3,Integer)
+ End If
+ If (i = 4) Then
+ Return CType(DecimalEnum.Num4,Integer)
+ End If
+ If (i = 2) Then
+ Return CType(DecimalEnum.Num2,Integer)
+ End If
+ If (i = 1) Then
+ Return CType(DecimalEnum.Num1,Integer)
+ End If
+ If (i = 0) Then
+ Return CType(DecimalEnum.Num0,Integer)
+ End If
+ Return (i + 10)
+ End Function
+
+ Public Shared Function TestSingleInterface(ByVal i As Integer) As Integer
+ Dim t As TestSingleInterfaceImp = New TestSingleInterfaceImp()
+ Return t.InterfaceMethod(i)
+ End Function
+
+ Public Shared Function TestMultipleInterfaces(ByVal i As Integer) As Integer
+ Dim t As TestMultipleInterfaceImp = New TestMultipleInterfaceImp()
+ Dim interfaceAobject As InterfaceA = CType(t,InterfaceA)
+ Dim interfaceBobject As InterfaceB = CType(t,InterfaceB)
+ Return (interfaceAobject.InterfaceMethod(i) - interfaceBobject.InterfaceMethod(i))
+ End Function
+
+ Public Shared Function NestedStructMethod() As Integer
+ Dim varStructA As structA
+ varStructA.innerStruct.int1 = 3
+ Return varStructA.innerStruct.int1
+ End Function
+
+ Public Shared Sub Main()
+ End Sub
+
+ Public Function GoToMethod(ByVal i As Integer) As Integer
+ If (i < 1) Then
+ goto comehere
+ End If
+ Return 6
+ comehere:
+ Return 7
+ End Function
+
+ Public Shared Function CallingPublicNestedScenario(ByVal i As Integer) As Integer
+ Dim t As PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC = New PublicNestedClassA.PublicNestedClassB2.PublicNestedClassC()
+ Return t.publicNestedClassesMethod(i)
+ End Function
+
+ Public Sub MyMethod(<System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=false)> ByVal blah As String)
+ End Sub
+
+ Public Shared Function PublicStaticMethod() As Integer
+ Return 16
+ End Function
+
+ Shared Sub Work(ByRef i As Integer, ByRef j As Integer)
+ i = (i + 4)
+ j = 5
+ End Sub
+
+ Public Shared Function CallingWork(ByVal a As Integer) As Integer
+ a = 10
+ Dim b As Integer
+ TEST.Work(a, b)
+ Return (a + b)
+ End Function
+
+ Public Function MyFunction() As <System.Xml.Serialization.XmlIgnoreAttribute(), System.Xml.Serialization.XmlRootAttribute([Namespace]:=""Namespace Value"", ElementName:=""Root, hehehe"")> String
+ Return ""Return""
+ End Function
+
+ Public Shared Function TestStaticConstructor(ByVal a As Integer) As Integer
+ Dim t As Test4 = New Test4()
+ t.i = a
+ Return t.i
+ End Function
+
+ Public Shared Function TryCatchMethod(ByVal a As Integer) As Integer
+ Try
+ Finally
+ a = (a + 5)
+ End Try
+ Return a
+ End Function
+ End Class
+
+ Public Class Test2
+
+ Private stringField As String
+
+ Public Sub New()
+ Me.New(""testingString"", Nothing, Nothing)
+ End Sub
+
+ Public Sub New(ByVal p1 As String, ByVal p2 As String, ByVal p3 As String)
+ MyBase.New
+ Me.stringField = p1
+ End Sub
+
+ Public Property accessStringField() As String
+ Get
+ Return Me.stringField
+ End Get
+ Set
+ Me.stringField = value
+ End Set
+ End Property
+ End Class
+
+ Public Enum DecimalEnum
- Public int1 As Integer
- End Structure
- End Structure
+ Num0 = 0
- Public Class PublicNestedClassA
+ Num1 = 1
- Public Class PublicNestedClassB1
- End Class
+ Num2 = 2
- Public Class PublicNestedClassB2
+ Num3 = 3
- Public Class PublicNestedClassC
+ Num4 = 4
+ End Enum
- Public Function publicNestedClassesMethod(ByVal a As Integer) As Integer
- Return a
- End Function
- End Class
- End Class
- End Class
+ Public Interface InterfaceA
- Public Class Test4
+ Function InterfaceMethod(ByVal a As Integer) As Integer
+ End Interface
- Private number As Integer
+ Public Interface InterfaceB
- Shared Sub New()
- End Sub
+ Function InterfaceMethod(ByVal a As Integer) As Integer
+ End Interface
- Public Property i() As Integer
- Get
- Return number
- End Get
- Set
- number = value
- End Set
- End Property
- End Class
- End Namespace
+ Public Class TestMultipleInterfaceImp
+ Inherits Object
+ Implements InterfaceB, InterfaceA
- Namespace MyNamespace
+ Public Function InterfaceMethod(ByVal a As Integer) As Integer Implements InterfaceA.InterfaceMethod , InterfaceB.InterfaceMethod
+ Return a
+ End Function
+ End Class
- Public Class Test
- Inherits Form
+ Public Class TestSingleInterfaceImp
+ Inherits Object
+ Implements InterfaceA
- Private b As Button = New Button()
+ Public Overridable Function InterfaceMethod(ByVal a As Integer) As Integer Implements InterfaceA.InterfaceMethod
+ Return a
+ End Function
+ End Class
- Public Sub New()
- MyBase.New
- Me.Size = New Size(600, 600)
- b.Text = ""Test""
- b.TabIndex = 0
- b.Location = New Point(400, 525)
- AddHandler MyEvent, AddressOf Me.b_Click
- End Sub
+ Public Structure structA
- Public Event MyEvent As System.EventHandler
+ Public innerStruct As structB
- Private Sub b_Click(ByVal sender As Object, ByVal e As System.EventArgs)
- End Sub
- End Class
- End Namespace");
- }
- }).Dispose();
+ Public Structure structB
+
+ Public int1 As Integer
+ End Structure
+ End Structure
+
+ Public Class PublicNestedClassA
+
+ Public Class PublicNestedClassB1
+ End Class
+
+ Public Class PublicNestedClassB2
+
+ Public Class PublicNestedClassC
+
+ Public Function publicNestedClassesMethod(ByVal a As Integer) As Integer
+ Return a
+ End Function
+ End Class
+ End Class
+ End Class
+
+ Public Class Test4
+
+ Private number As Integer
+
+ Shared Sub New()
+ End Sub
+
+ Public Property i() As Integer
+ Get
+ Return number
+ End Get
+ Set
+ number = value
+ End Set
+ End Property
+ End Class
+ End Namespace
+
+ Namespace MyNamespace
+
+ Public Class Test
+ Inherits Form
+
+ Private b As Button = New Button()
+
+ Public Sub New()
+ MyBase.New
+ Me.Size = New Size(600, 600)
+ b.Text = ""Test""
+ b.TabIndex = 0
+ b.Location = New Point(400, 525)
+ AddHandler MyEvent, AddressOf Me.b_Click
+ End Sub
+
+ Public Event MyEvent As System.EventHandler
+
+ Private Sub b_Click(ByVal sender As Object, ByVal e As System.EventArgs)
+ End Sub
+ End Class
+ End Namespace");
+ }
}
[Fact]
<AssemblyVersion>4.0.14.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<RootNamespace>System.Collections.Concurrent</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Collections\Concurrent\BlockingCollection.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\CoreLib\System\Collections\Concurrent\IProducerConsumerCollectionDebugView.cs">
<AssemblyVersion>1.2.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.3-Debug;netstandard1.3-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Collections.Immutable.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' Or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Collections\ref\System.Collections.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.0'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.0'">
<Reference Include="System.Runtime" />
<Reference Include="System.Collections" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<Reference Include="System.Runtime" />
<Reference Include="System.Collections" />
<Reference Include="System.Runtime.InteropServices" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3' or '$(TargetGroup)' == 'netstandard'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3' or '$(TargetGroup)' == 'netstandard'">
<Reference Include="System.Memory" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<RootNamespace>System.Collections.Immutable</RootNamespace>
<FileAlignment>512</FileAlignment>
- <GenerateAppxPackageOnBuild>False</GenerateAppxPackageOnBuild>
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.0'">netstandard1.0;portable-net45+win8+wp8+wpa81</PackageTargetFramework>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.3-Debug;netstandard1.3-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\InternalsVisibleTo.cs" />
<Link>Common\System\Runtime\Versioning\NonVersionableAttribute.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.0' or '$(TargetGroup)' == 'netstandard1.3'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.0' or '$(TargetFramework)' == 'netstandard1.3'">
<Compile Include="$(CommonPath)\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs">
<Link>Common\CoreLib\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs</Link>
</Compile>
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Threading" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3' or '$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3' or '$(TargetsNetCoreApp)' == 'true'">
<Reference Include="System.Runtime.InteropServices" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3' or '$(TargetGroup)' == 'netstandard'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3' or '$(TargetGroup)' == 'netstandard'">
<Reference Include="System.Memory" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>0436</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs" Condition="'$(TargetsNetFx)' == 'true'">
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<RootNamespace>System.Collections.NonGeneric</RootNamespace>
<AssemblyName>System.Collections.NonGeneric</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
[InlineData("hello", "hello", 0)]
[InlineData("HELLO", "HELLO", 0)]
[InlineData("hello", "goodbye", 1)]
- [InlineData("hello", "null", 1)]
- [InlineData("null", "hello", -1)]
+ [InlineData("hello", null, 1)]
+ [InlineData(null, "hello", -1)]
[InlineData("file", "FILE", 0)] // Turkey's comparing system is ignored as this is invariant
[InlineData(5, 5, 0)]
[InlineData(10, 5, 1)]
[InlineData(5, 10, -1)]
- [InlineData(5, "null", 1)]
- [InlineData("null", 5, -1)]
- [InlineData("null", "null", 0)]
+ [InlineData(5, null, 1)]
+ [InlineData(null, 5, -1)]
+ [InlineData(null, null, 0)]
public void DefaultInvariant_Compare(object a, object b, int expected)
{
- RemoteExecutorForUap.Invoke((ra, rb, rexpected) =>
+ var cultureNames = new string[]
{
- Func<string, object> convert = (string o) =>
- {
- if (Int32.TryParse(o, out int ret))
- return ret;
-
- return (o == "null") ? null : o;
- };
-
- var ra_val = convert(ra);
- var rb_val = convert(rb);
- var rexpected_val = convert(rexpected);
+ "cs-CZ","da-DK","de-DE","el-GR","en-US",
+ "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
+ "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
+ "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
+ "zh-CN","zh-HK","zh-TW"
+ };
- var cultureNames = new string[]
+ foreach (string cultureName in cultureNames)
+ {
+ CultureInfo culture;
+ try
{
- "cs-CZ","da-DK","de-DE","el-GR","en-US",
- "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
- "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
- "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
- "zh-CN","zh-HK","zh-TW"
- };
-
- foreach (string cultureName in cultureNames)
+ culture = new CultureInfo(cultureName);
+ }
+ catch (CultureNotFoundException)
{
- CultureInfo culture;
- try
- {
- culture = new CultureInfo(cultureName);
- }
- catch (CultureNotFoundException)
- {
- continue;
- }
+ continue;
+ }
- // Set current culture
- using (new ThreadCultureChange(culture, culture))
- {
- // All cultures should sort the same way, irrespective of the thread's culture
- CaseInsensitiveComparer defaultInvComparer = CaseInsensitiveComparer.DefaultInvariant;
- Assert.Equal(rexpected_val, Math.Sign(defaultInvComparer.Compare(ra_val, rb_val)));
- }
+ // Set current culture
+ using (new ThreadCultureChange(culture, culture))
+ {
+ // All cultures should sort the same way, irrespective of the thread's culture
+ CaseInsensitiveComparer defaultInvComparer = CaseInsensitiveComparer.DefaultInvariant;
+ Assert.Equal(expected, Math.Sign(defaultInvComparer.Compare(a, b)));
}
- }, a.ToString(), b.ToString(), expected.ToString()).Dispose();
+ }
}
[Theory]
[InlineData(5, 10, false)]
public void Ctor_Empty_ChangeCurrentCulture_GetHashCodeCompare(object a, object b, bool expected)
{
- RemoteExecutorForUap.Invoke((ra, rb, rexpected) =>
+ var cultureNames = new string[]
{
- var cultureNames = new string[]
- {
- "cs-CZ","da-DK","de-DE","el-GR","en-US",
- "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
- "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
- "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
- "zh-CN","zh-HK","zh-TW"
- };
+ "cs-CZ","da-DK","de-DE","el-GR","en-US",
+ "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
+ "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
+ "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
+ "zh-CN","zh-HK","zh-TW"
+ };
- bool.TryParse(rexpected, out bool expectedResult);
+ foreach (string cultureName in cultureNames)
+ {
+ CultureInfo newCulture;
+ try
+ {
+ newCulture = new CultureInfo(cultureName);
+ }
+ catch (CultureNotFoundException)
+ {
+ continue;
+ }
- foreach (string cultureName in cultureNames)
+ using (new ThreadCultureChange(newCulture))
{
- CultureInfo newCulture;
- try
- {
- newCulture = new CultureInfo(cultureName);
- }
- catch (CultureNotFoundException)
- {
- continue;
- }
-
- using (new ThreadCultureChange(newCulture))
- {
- var provider = new CaseInsensitiveHashCodeProvider();
- Assert.Equal(provider.GetHashCode(ra), provider.GetHashCode(ra));
- Assert.Equal(provider.GetHashCode(rb), provider.GetHashCode(rb));
- Assert.Equal(expectedResult, provider.GetHashCode(ra) == provider.GetHashCode(rb));
- }
+ var provider = new CaseInsensitiveHashCodeProvider();
+ Assert.Equal(provider.GetHashCode(a), provider.GetHashCode(a));
+ Assert.Equal(provider.GetHashCode(b), provider.GetHashCode(b));
+ Assert.Equal(expected, provider.GetHashCode(a) == provider.GetHashCode(b));
}
- }, a.ToString(), b.ToString(), expected.ToString()).Dispose();
+ }
}
[Theory]
{
// Turkish has lower-case and upper-case version of the dotted "i", so the upper case of "i" (U+0069) isn't "I" (U+0049)
// but rather U+0130.
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("tr-TR"))
{
- using (new ThreadCultureChange("tr-TR"))
- {
- Assert.False(CaseInsensitiveHashCodeProvider.Default.GetHashCode("file") == CaseInsensitiveHashCodeProvider.Default.GetHashCode("FILE"));
- Assert.True(CaseInsensitiveHashCodeProvider.DefaultInvariant.GetHashCode("file") == CaseInsensitiveHashCodeProvider.DefaultInvariant.GetHashCode("FILE"));
- }
+ Assert.False(CaseInsensitiveHashCodeProvider.Default.GetHashCode("file") == CaseInsensitiveHashCodeProvider.Default.GetHashCode("FILE"));
+ Assert.True(CaseInsensitiveHashCodeProvider.DefaultInvariant.GetHashCode("file") == CaseInsensitiveHashCodeProvider.DefaultInvariant.GetHashCode("FILE"));
+ }
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(CaseInsensitiveHashCodeProvider.Default.GetHashCode("file") == CaseInsensitiveHashCodeProvider.Default.GetHashCode("FILE"));
- }
- }).Dispose();
+ using (new ThreadCultureChange("en-US"))
+ {
+ Assert.True(CaseInsensitiveHashCodeProvider.Default.GetHashCode("file") == CaseInsensitiveHashCodeProvider.Default.GetHashCode("FILE"));
+ }
}
}
}
[Fact]
public void DefaultInvariant_Compare()
{
- RemoteExecutorForUap.Invoke(() =>
+ var cultureNames = new string[]
{
- var cultureNames = new string[]
- {
- "cs-CZ","da-DK","de-DE","el-GR","en-US",
- "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
- "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
- "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
- "zh-CN","zh-HK","zh-TW"
- };
+ "cs-CZ","da-DK","de-DE","el-GR","en-US",
+ "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
+ "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
+ "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
+ "zh-CN","zh-HK","zh-TW"
+ };
+
+ var string1 = new string[] { "Apple", "abc", };
+ var string2 = new string[] { "\u00C6ble", "ABC" };
- var string1 = new string[] { "Apple", "abc", };
- var string2 = new string[] { "\u00C6ble", "ABC" };
+ foreach (string cultureName in cultureNames)
+ {
+ CultureInfo culture;
+ try
+ {
+ culture = new CultureInfo(cultureName);
+ }
+ catch (CultureNotFoundException)
+ {
+ continue;
+ }
- foreach (string cultureName in cultureNames)
+ // All cultures should sort the same way, irrespective of the thread's culture
+ using (new ThreadCultureChange(culture, culture))
{
- CultureInfo culture;
- try
- {
- culture = new CultureInfo(cultureName);
- }
- catch (CultureNotFoundException)
- {
- continue;
- }
-
- // All cultures should sort the same way, irrespective of the thread's culture
- using (new ThreadCultureChange(culture, culture))
- {
- Comparer comp = Comparer.DefaultInvariant;
- Assert.Equal(1, comp.Compare(string1[0], string2[0]));
- Assert.Equal(-1, comp.Compare(string1[1], string2[1]));
- }
+ Comparer comp = Comparer.DefaultInvariant;
+ Assert.Equal(1, comp.Compare(string1[0], string2[0]));
+ Assert.Equal(-1, comp.Compare(string1[1], string2[1]));
}
- }).Dispose();
+ }
}
[Fact]
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
public void Item_Get_DifferentCulture()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- var sortList = new SortedList();
+ var sortList = new SortedList();
- try
+ try
+ {
+ var cultureNames = new string[]
{
- var cultureNames = new string[]
- {
- "cs-CZ","da-DK","de-DE","el-GR","en-US",
- "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
- "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
- "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
- "zh-CN","zh-HK","zh-TW"
- };
-
- var installedCultures = new CultureInfo[cultureNames.Length];
- var cultureDisplayNames = new string[installedCultures.Length];
- int uniqueDisplayNameCount = 0;
-
- foreach (string cultureName in cultureNames)
- {
- var culture = new CultureInfo(cultureName);
- installedCultures[uniqueDisplayNameCount] = culture;
- cultureDisplayNames[uniqueDisplayNameCount] = culture.DisplayName;
- sortList.Add(cultureDisplayNames[uniqueDisplayNameCount], culture);
+ "cs-CZ","da-DK","de-DE","el-GR","en-US",
+ "es-ES","fi-FI","fr-FR","hu-HU","it-IT",
+ "ja-JP","ko-KR","nb-NO","nl-NL","pl-PL",
+ "pt-BR","pt-PT","ru-RU","sv-SE","tr-TR",
+ "zh-CN","zh-HK","zh-TW"
+ };
+
+ var installedCultures = new CultureInfo[cultureNames.Length];
+ var cultureDisplayNames = new string[installedCultures.Length];
+ int uniqueDisplayNameCount = 0;
+
+ foreach (string cultureName in cultureNames)
+ {
+ var culture = new CultureInfo(cultureName);
+ installedCultures[uniqueDisplayNameCount] = culture;
+ cultureDisplayNames[uniqueDisplayNameCount] = culture.DisplayName;
+ sortList.Add(cultureDisplayNames[uniqueDisplayNameCount], culture);
- uniqueDisplayNameCount++;
- }
+ uniqueDisplayNameCount++;
+ }
- // In Czech ch comes after h if the comparer changes based on the current culture of the thread
- // we will not be able to find some items
- using (new ThreadCultureChange("cs-CZ"))
+ // In Czech ch comes after h if the comparer changes based on the current culture of the thread
+ // we will not be able to find some items
+ using (new ThreadCultureChange("cs-CZ"))
+ {
+ for (int i = 0; i < uniqueDisplayNameCount; i++)
{
- for (int i = 0; i < uniqueDisplayNameCount; i++)
- {
- Assert.Equal(installedCultures[i], sortList[installedCultures[i].DisplayName]);
- }
+ Assert.Equal(installedCultures[i], sortList[installedCultures[i].DisplayName]);
}
}
- catch (CultureNotFoundException)
- {
- }
- }).Dispose();
+ }
+ catch (CultureNotFoundException)
+ {
+ }
}
[Fact]
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>System.Collections.Specialized</RootNamespace>
<AssemblyName>System.Collections.Specialized</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Common Collections tests -->
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<AssemblyName>System.Collections</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ComponentModel\DataAnnotations\AssociatedMetadataTypeTypeDescriptionProviderTests.cs" />
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void ParseDotSeparatorExtremaInCommaSeparatorCultures(Type type, string min, string max)
{
- RemoteExecutorForUap.Invoke((t, m1, m2) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(null));
- }
+ Assert.True(new RangeAttribute(type, min, max).IsValid(null));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(null));
- }
- }, type.ToString(), min, max).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(null));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void ParseDotSeparatorInvariantExtremaInCommaSeparatorCultures(Type type, string min, string max)
{
- RemoteExecutorForUap.Invoke((t, m1, m2) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- }.IsValid(null));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.True(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- }.IsValid(null));
- }
- }, type.ToString(), min, max).Dispose();
+ Assert.True(
+ new RangeAttribute(type, min, max)
+ {
+ ParseLimitsInInvariantCulture = true
+ }.IsValid(null));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.True(
+ new RangeAttribute(type, min, max)
+ {
+ ParseLimitsInInvariantCulture = true
+ }.IsValid(null));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void ParseCommaSeparatorExtremaInCommaSeparatorCultures(Type type, string min, string max)
{
- RemoteExecutorForUap.Invoke((t, m1, m2) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(null));
- }
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(null));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.True(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(null));
- }
- }, type.ToString(), min, max).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.True(new RangeAttribute(type, min, max).IsValid(null));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void ParseCommaSeparatorInvariantExtremaInCommaSeparatorCultures(Type type, string min, string max)
{
- RemoteExecutorForUap.Invoke((t, m1, m2) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(null));
- }
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(null));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.True(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(null));
- }
- }, type.ToString(), min, max).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.True(new RangeAttribute(type, min, max).IsValid(null));
+ }
}
[Theory][MemberData(nameof(DotDecimalValidValues))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndValues(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(v));
- }
+ Assert.True(new RangeAttribute(type, min, max).IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndValuesInvariantParse(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- }.IsValid(v));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
+ Assert.True(
+ new RangeAttribute(type, min, max)
{
ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ }.IsValid(value));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
+ {
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndValuesInvariantConvert(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true
- }.IsValid(v));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
+ Assert.True(
+ new RangeAttribute(type, min, max)
{
ConvertValueInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ }.IsValid(value));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
+ {
+ ConvertValueInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndValuesInvariantBoth(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.True(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- }.IsValid(v));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.True(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- }.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ Assert.True(
+ new RangeAttribute(type, min, max)
+ {
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ }.IsValid(value));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.True(
+ new RangeAttribute(type, min, max)
+ {
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ }.IsValid(value));
+ }
}
[Theory]
[MemberData(nameof(DotDecimalNonStringValidValues))]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndInvalidValues(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.False(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(v));
- }
+ Assert.False(new RangeAttribute(type, min, max).IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndInvalidValuesInvariantParse(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.False(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- }.IsValid(v));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
+ Assert.False(
+ new RangeAttribute(type, min, max)
{
ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ }.IsValid(value));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
+ {
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndInvalidValuesInvariantConvert(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.False(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true
- }.IsValid(v));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
+ Assert.False(
+ new RangeAttribute(type, min, max)
{
ConvertValueInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ }.IsValid(value));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
+ {
+ ConvertValueInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void DotDecimalExtremaAndInvalidValuesInvariantBoth(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Assert.False(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- }.IsValid(v));
- }
-
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.False(
- new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- }.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ Assert.False(
+ new RangeAttribute(type, min, max)
+ {
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ }.IsValid(value));
+ }
+
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.False(
+ new RangeAttribute(type, min, max)
+ {
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ }.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndValues(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.True(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.True(new RangeAttribute(type, min, max).IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndValuesInvariantParse(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndValuesInvariantConvert(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ ConvertValueInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ ConvertValueInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndValuesInvariantBoth(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndInvalidValues(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- var range = new RangeAttribute(Type.GetType(t), m1, m2);
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ var range = new RangeAttribute(type, min, max);
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- Assert.False(new RangeAttribute(Type.GetType(t), m1, m2).IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Assert.False(new RangeAttribute(type, min, max).IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndInvalidValuesInvariantParse(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndInvalidValuesInvariantConvert(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ ConvertValueInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ ConvertValueInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "2648 not fixed on NetFX")]
public static void CommaDecimalExtremaAndInvalidValuesInvariantBoth(Type type, string min, string max, string value)
{
- RemoteExecutorForUap.Invoke((t, m1, m2, v) =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
- using (new ThreadCultureChange("fr-FR"))
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ var range = new RangeAttribute(type, min, max)
{
- var range = new RangeAttribute(Type.GetType(t), m1, m2)
- {
- ConvertValueInInvariantCulture = true,
- ParseLimitsInInvariantCulture = true
- };
- AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(v));
- }
- }, type.ToString(), min, max, value).Dispose();
+ ConvertValueInInvariantCulture = true,
+ ParseLimitsInInvariantCulture = true
+ };
+ AssertExtensions.Throws<ArgumentException>("value", () => range.IsValid(value));
+ }
}
[Theory]
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="InternalCalls.cs" />
$(PackageConfigurations);
_netfx;
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<!-- CommonStrings needs RootNamespace to be empty -->
<NoWarn>$(NoWarn);CS1573</NoWarn>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_ComponentModel_Composition</GeneratePlatformNotSupportedAssemblyMessage>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp2.0-Debug;netcoreapp2.0-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp2.0-Debug;netcoreapp2.0-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<!-- TODO: Add netfx configuration after OOB package bug is fixed: https://github.com/dotnet/corefx/issues/23889 -->
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
public const string ComImportAvailable = nameof(Helpers) + "." + nameof(CheckComImportAvailable);
- private static bool CheckComImportAvailable() => PlatformDetection.IsWindows && PlatformDetection.IsNotWindowsNanoServer && !PlatformDetection.IsUap;
+ private static bool CheckComImportAvailable() => PlatformDetection.IsWindows && PlatformDetection.IsNotWindowsNanoServer && !PlatformDetection.IsInAppContainer;
}
public class ComposablePartDefinitionTests
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.ComponentModel.EventBasedAsync.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>System.ComponentModel.EventBasedAsync</RootNamespace>
<AssemblyName>System.ComponentModel.EventBasedAsync</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ComponentModel\AsyncCompletedEvent.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncOperationManagerTests.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>System.ComponentModel.Primitives</RootNamespace>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\ComponentModel\BrowsableAttributeTests.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.ComponentModel.manual.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AssemblyName>System.ComponentModel.TypeConverter</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MS\Internal\Xml\Linq\ComponentModel\XComponentModel.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
public void DesignerOptionConverter_ConvertToString_ReturnsExpected()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(null, CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(null, CultureInfo.InvariantCulture))
- {
- TypeConverter converter = TypeDescriptor.GetConverter(typeof(DesignerOptionService.DesignerOptionCollection));
- Assert.Equal("(Collection)", converter.ConvertToString(null));
- }
- }).Dispose();
+ TypeConverter converter = TypeDescriptor.GetConverter(typeof(DesignerOptionService.DesignerOptionCollection));
+ Assert.Equal("(Collection)", converter.ConvertToString(null));
+ }
}
[Fact]
[Fact]
public static void ConvertTo_WithContext()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(null, CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(null, CultureInfo.InvariantCulture))
- {
- ConvertTo_WithContext(new object[1, 3]
- {
- { "any string", "(Text)", null }
- },
- new MultilineStringConverter());
- }
- }).Dispose();
+ ConvertTo_WithContext(new object[1, 3]
+ {
+ { "any string", "(Text)", null }
+ },
+ new MultilineStringConverter());
+ }
}
}
}
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<RootNamespace />
<AssemblyVersion>9.9.9.9</AssemblyVersion>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="Drawing\ColorConverterTests.cs" />
}
else
{
- RemoteExecutorForUap.Invoke((typeName, testString) =>
+ using (new ThreadCultureChange(convertTest.RemoteInvokeCulture))
{
- // Deserialize the current test.
- TypeConverterTestBase testBase = (TypeConverterTestBase)Activator.CreateInstance(Type.GetType(typeName));
- ConvertTest test = ConvertTest.FromSerializedString(testString);
+ Assert.Equal(convertTest.CanConvert, this.Converter.CanConvertTo(convertTest.Context, convertTest.DestinationType));
- using (new ThreadCultureChange(test.RemoteInvokeCulture))
+ if (convertTest.CanConvert)
{
- Assert.Equal(test.CanConvert, testBase.Converter.CanConvertTo(test.Context, test.DestinationType));
-
- if (test.CanConvert)
- {
- object actual = testBase.Converter.ConvertTo(test.Context, test.Culture, test.Source, test.DestinationType);
- Assert.Equal(test.Expected, actual);
- }
- else
- {
- Assert.Throws<NotSupportedException>(() => testBase.Converter.ConvertTo(test.Context, test.Culture, test.Source, test.DestinationType));
- }
+ object actual = this.Converter.ConvertTo(convertTest.Context, convertTest.Culture, convertTest.Source, convertTest.DestinationType);
+ Assert.Equal(convertTest.Expected, actual);
}
- }, this.GetType().AssemblyQualifiedName, convertTest.GetSerializedString()).Dispose();
+ else
+ {
+ Assert.Throws<NotSupportedException>(() => this.Converter.ConvertTo(convertTest.Context, convertTest.Culture, convertTest.Source, convertTest.DestinationType));
+ }
+ }
}
});
}
}
else
{
- RemoteExecutorForUap.Invoke((typeName, testString) =>
+ using (new ThreadCultureChange(convertTest.RemoteInvokeCulture))
{
- // Deserialize the current test.
- TypeConverterTestBase testBase = (TypeConverterTestBase)Activator.CreateInstance(Type.GetType(typeName));
- ConvertTest test = ConvertTest.FromSerializedString(testString);
+ if (convertTest.Source != null)
+ {
+ Assert.Equal(convertTest.CanConvert, this.Converter.CanConvertFrom(convertTest.Context, convertTest.Source.GetType()));
+ }
- using (new ThreadCultureChange(test.RemoteInvokeCulture))
+ if (convertTest.NetCoreExceptionType == null)
+ {
+ object actual = this.Converter.ConvertFrom(convertTest.Context, convertTest.Culture, convertTest.Source);
+ Assert.Equal(convertTest.Expected, actual);
+ }
+ else
{
- if (test.Source != null)
- {
- Assert.Equal(test.CanConvert, testBase.Converter.CanConvertFrom(test.Context, test.Source.GetType()));
- }
-
- if (test.NetCoreExceptionType == null)
- {
- object actual = testBase.Converter.ConvertFrom(test.Context, test.Culture, test.Source);
- Assert.Equal(test.Expected, actual);
- }
- else
- {
- AssertExtensions.Throws(test.NetCoreExceptionType, test.NetFrameworkExceptionType, () => testBase.Converter.ConvertFrom(test.Context, test.Culture, test.Source));
- }
+ AssertExtensions.Throws(convertTest.NetCoreExceptionType, convertTest.NetFrameworkExceptionType, () => this.Converter.ConvertFrom(convertTest.Context, convertTest.Culture, convertTest.Source));
}
- }, this.GetType().AssemblyQualifiedName, convertTest.GetSerializedString()).Dispose();
+ }
}
});
}
[Fact]
public static void ConvertFrom_InstanceDescriptor()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("fr-FR"))
{
- using (new ThreadCultureChange("fr-FR"))
+ DateTime testDateAndTime = DateTime.UtcNow;
+ ConstructorInfo ctor = typeof(DateTime).GetConstructor(new Type[]
{
- DateTime testDateAndTime = DateTime.UtcNow;
- ConstructorInfo ctor = typeof(DateTime).GetConstructor(new Type[]
- {
- typeof(int), typeof(int), typeof(int), typeof(int),
- typeof(int), typeof(int), typeof(int)
- });
+ typeof(int), typeof(int), typeof(int), typeof(int),
+ typeof(int), typeof(int), typeof(int)
+ });
- InstanceDescriptor descriptor = new InstanceDescriptor(ctor, new object[]
- {
- testDateAndTime.Year, testDateAndTime.Month, testDateAndTime.Day, testDateAndTime.Hour,
- testDateAndTime.Minute, testDateAndTime.Second, testDateAndTime.Millisecond
- });
+ InstanceDescriptor descriptor = new InstanceDescriptor(ctor, new object[]
+ {
+ testDateAndTime.Year, testDateAndTime.Month, testDateAndTime.Day, testDateAndTime.Hour,
+ testDateAndTime.Minute, testDateAndTime.Second, testDateAndTime.Millisecond
+ });
- const string format = "dd MMM yyyy hh:mm";
- object o = s_converter.ConvertFrom(descriptor);
- Assert.Equal(testDateAndTime.ToString(format), ((DateTime)o).ToString(format));
- }
- }).Dispose();
+ const string format = "dd MMM yyyy hh:mm";
+ object o = s_converter.ConvertFrom(descriptor);
+ Assert.Equal(testDateAndTime.ToString(format), ((DateTime)o).ToString(format));
+ }
}
[Fact]
[Fact]
public static void ConvertTo_WithContext()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("pl-PL"))
{
- using (new ThreadCultureChange("pl-PL"))
- {
- Assert.Throws<ArgumentNullException>(
- () => s_converter.ConvertTo(s_context, null, c_conversionInputValue, null));
+ Assert.Throws<ArgumentNullException>(
+ () => s_converter.ConvertTo(s_context, null, c_conversionInputValue, null));
- Assert.Throws<NotSupportedException>(
- () => s_converter.ConvertTo(s_context, null, c_conversionInputValue, typeof(int)));
+ Assert.Throws<NotSupportedException>(
+ () => s_converter.ConvertTo(s_context, null, c_conversionInputValue, typeof(int)));
- object o = s_converter.ConvertTo(s_context, null, c_conversionInputValue, typeof(string));
- VerifyConversionToString(o);
+ object o = s_converter.ConvertTo(s_context, null, c_conversionInputValue, typeof(string));
+ VerifyConversionToString(o);
- o = s_converter.ConvertTo(
- s_context, CultureInfo.CurrentCulture, c_conversionInputValue, typeof(string));
- VerifyConversionToString(o);
+ o = s_converter.ConvertTo(
+ s_context, CultureInfo.CurrentCulture, c_conversionInputValue, typeof(string));
+ VerifyConversionToString(o);
- o = s_converter.ConvertTo(
- s_context, CultureInfo.InvariantCulture, c_conversionInputValue, typeof(string));
- VerifyConversionToString(o);
+ o = s_converter.ConvertTo(
+ s_context, CultureInfo.InvariantCulture, c_conversionInputValue, typeof(string));
+ VerifyConversionToString(o);
- string s = s_converter.ConvertTo(
- s_context, CultureInfo.InvariantCulture, new FormattableClass(), typeof(string)) as string;
- Assert.NotNull(s);
- Assert.Equal(FormattableClass.Token, s);
- }
- }).Dispose();
+ string s = s_converter.ConvertTo(
+ s_context, CultureInfo.InvariantCulture, new FormattableClass(), typeof(string)) as string;
+ Assert.NotNull(s);
+ Assert.Equal(FormattableClass.Token, s);
+ }
}
[Fact]
[Fact]
public static void ConvertTo_WithContext()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- ConvertTo_WithContext(new object[2, 3]
- {
- { typeof(char), "System.Char", null }, // the base class is not verifying if this type is not in the list
- { null, "(none)", CultureInfo.InvariantCulture }
- },
- TypeListConverterTests.s_converter);
- }
- }).Dispose();
+ ConvertTo_WithContext(new object[2, 3]
+ {
+ { typeof(char), "System.Char", null }, // the base class is not verifying if this type is not in the list
+ { null, "(none)", CultureInfo.InvariantCulture }
+ },
+ TypeListConverterTests.s_converter);
+ }
}
[Fact]
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.ComponentModel</RootNamespace>
<AssemblyName>System.ComponentModel</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CancelEventArgsTests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="SharingBoundaryAttributeTests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Composition.Convention.Tests</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AttributedModelConventionExtensions.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Composition\Hosting\Core\CompositionDependencyTests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Composition\Hosting\Core\CompositionContractTests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ContainerConfigurationTests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<RootNamespace>System.Composition.Lightweight.UnitTests</RootNamespace>
<AssemblyName>System.Composition.Tests</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ActivationEventOrderingTests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<XUnitNoAppdomain>true</XUnitNoAppdomain>
<XUnitMaxThreads>1</XUnitMaxThreads>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
[Fact]
public void MinValueString_TooSmall()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- TimeSpanValidatorAttribute attribute = new TimeSpanValidatorAttribute();
-
- attribute.MaxValueString = new TimeSpan(2, 2, 2, 2).ToString();
- ArgumentOutOfRangeException result = Assert.Throws<ArgumentOutOfRangeException>(() =>
- attribute.MinValueString = new TimeSpan(3, 3, 3, 3).ToString());
- ArgumentOutOfRangeException expectedException =
- new ArgumentOutOfRangeException("value", SR.Validator_min_greater_than_max);
- Assert.Equal(expectedException.Message, result.Message);
- }
- }).Dispose();
+ TimeSpanValidatorAttribute attribute = new TimeSpanValidatorAttribute();
+
+ attribute.MaxValueString = new TimeSpan(2, 2, 2, 2).ToString();
+ ArgumentOutOfRangeException result = Assert.Throws<ArgumentOutOfRangeException>(() =>
+ attribute.MinValueString = new TimeSpan(3, 3, 3, 3).ToString());
+ ArgumentOutOfRangeException expectedException =
+ new ArgumentOutOfRangeException("value", SR.Validator_min_greater_than_max);
+ Assert.Equal(expectedException.Message, result.Message);
+ }
}
[Fact]
public void MaxValueString_TooBig()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- TimeSpanValidatorAttribute attribute = new TimeSpanValidatorAttribute();
-
- attribute.MinValueString = new TimeSpan(2, 2, 2, 2).ToString();
- ArgumentOutOfRangeException result = Assert.Throws<ArgumentOutOfRangeException>(() =>
- attribute.MaxValueString = new TimeSpan(1, 1, 1, 1).ToString());
- ArgumentOutOfRangeException expectedException =
- new ArgumentOutOfRangeException("value", SR.Validator_min_greater_than_max);
- Assert.Equal(expectedException.Message, result.Message);
- }
- }).Dispose();
+ TimeSpanValidatorAttribute attribute = new TimeSpanValidatorAttribute();
+
+ attribute.MinValueString = new TimeSpan(2, 2, 2, 2).ToString();
+ ArgumentOutOfRangeException result = Assert.Throws<ArgumentOutOfRangeException>(() =>
+ attribute.MaxValueString = new TimeSpan(1, 1, 1, 1).ToString());
+ ArgumentOutOfRangeException expectedException =
+ new ArgumentOutOfRangeException("value", SR.Validator_min_greater_than_max);
+ Assert.Equal(expectedException.Message, result.Message);
+ }
}
}
}
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.Console</RootNamespace>
<AssemblyName>System.Console</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp;
netcoreapp-Windows_NT;
- uap;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CancelKeyPress.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);0618</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Data.Common.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
<PlatformTarget>AnyCPU</PlatformTarget>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Data.Common.TypeForwards.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<NoWarn>0168,0169,0414,0219,0649</NoWarn>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Data\Common\DataColumnMappingTest.cs" />
[Fact]
public void LocaleOnRootWithoutIsDataSet()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("fi-FI"))
{
- using (new ThreadCultureChange("fi-FI"))
- {
- string xs = @"<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>
- <xs:element name='Root' msdata:Locale='ja-JP'>
- <xs:complexType>
- <xs:sequence>
- <xs:element name='Child' type='xs:string' />
- </xs:sequence>
- <xs:attribute name='Attr' type='xs:integer' />
- </xs:complexType>
- </xs:element>
+ string xs = @"<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>
+<xs:element name='Root' msdata:Locale='ja-JP'>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name='Child' type='xs:string' />
+ </xs:sequence>
+ <xs:attribute name='Attr' type='xs:integer' />
+ </xs:complexType>
+</xs:element>
</xs:schema>";
- var ds = new DataSet();
- ds.ReadXmlSchema(new StringReader(xs));
- DataSetAssertion.AssertDataSet("ds", ds, "NewDataSet", 1, 0);
- Assert.Equal("fi-FI", ds.Locale.Name); // DataSet's Locale comes from current thread
- DataTable dt = ds.Tables[0];
- DataSetAssertion.AssertDataTable("dt", dt, "Root", 2, 0, 0, 0, 0, 0);
- Assert.Equal("ja-JP", dt.Locale.Name); // DataTable's Locale comes from msdata:Locale
- DataSetAssertion.AssertDataColumn("col1", dt.Columns[0], "Attr", true, false, 0, 1, "Attr", MappingType.Attribute, typeof(long), DBNull.Value, string.Empty, -1, string.Empty, 0, string.Empty, false, false);
- DataSetAssertion.AssertDataColumn("col2", dt.Columns[1], "Child", false, false, 0, 1, "Child", MappingType.Element, typeof(string), DBNull.Value, string.Empty, -1, string.Empty, 1, string.Empty, false, false);
- }
- }).Dispose();
+ var ds = new DataSet();
+ ds.ReadXmlSchema(new StringReader(xs));
+ DataSetAssertion.AssertDataSet("ds", ds, "NewDataSet", 1, 0);
+ Assert.Equal("fi-FI", ds.Locale.Name); // DataSet's Locale comes from current thread
+ DataTable dt = ds.Tables[0];
+ DataSetAssertion.AssertDataTable("dt", dt, "Root", 2, 0, 0, 0, 0, 0);
+ Assert.Equal("ja-JP", dt.Locale.Name); // DataTable's Locale comes from msdata:Locale
+ DataSetAssertion.AssertDataColumn("col1", dt.Columns[0], "Attr", true, false, 0, 1, "Attr", MappingType.Attribute, typeof(long), DBNull.Value, string.Empty, -1, string.Empty, 0, string.Empty, false, false);
+ DataSetAssertion.AssertDataColumn("col2", dt.Columns[1], "Child", false, false, 0, 1, "Child", MappingType.Element, typeof(string), DBNull.Value, string.Empty, -1, string.Empty, 1, string.Empty, false, false);
+ }
}
[Fact]
public void WriteXmlSchema()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("fi-FI"))
{
- using (new ThreadCultureChange("fi-FI"))
- {
- var ds = new DataSet();
- ds.ReadXml(new StringReader(DataProvider.region));
- TextWriter writer = new StringWriter();
- ds.WriteXmlSchema(writer);
-
-
- string TextString = DataSetAssertion.GetNormalizedSchema(writer.ToString());
- // string TextString = writer.ToString ();
-
- string substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal("<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- // This is original DataSet.WriteXmlSchema() output
- // Assert.Equal ("<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);
- Assert.Equal("<xs:schema id=\"Root\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:element msdata:IsDataSet=\"true\" msdata:Locale=\"en-US\" name=\"Root\">", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:complexType>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:choice maxOccurs=\"unbounded\" minOccurs=\"0\">", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:element name=\"Region\">", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:complexType>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:sequence>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- // This is original DataSet.WriteXmlSchema() output
- // Assert.Equal (" <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);
- Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionID\" type=\"xs:string\" />", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- // This is original DataSet.WriteXmlSchema() output
- // Assert.Equal (" <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);
- Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionDescription\" type=\"xs:string\" />", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:sequence>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:complexType>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:element>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:choice>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:complexType>", substring);
-
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:element>", substring);
-
- Assert.Equal("</xs:schema>", TextString);
- }
- }).Dispose();
-
+ var ds = new DataSet();
+ ds.ReadXml(new StringReader(DataProvider.region));
+ TextWriter writer = new StringWriter();
+ ds.WriteXmlSchema(writer);
+
+
+ string TextString = DataSetAssertion.GetNormalizedSchema(writer.ToString());
+ // string TextString = writer.ToString ();
+
+ string substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal("<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ // This is original DataSet.WriteXmlSchema() output
+ // Assert.Equal ("<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);
+ Assert.Equal("<xs:schema id=\"Root\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:element msdata:IsDataSet=\"true\" msdata:Locale=\"en-US\" name=\"Root\">", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:complexType>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:choice maxOccurs=\"unbounded\" minOccurs=\"0\">", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:element name=\"Region\">", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:complexType>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:sequence>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ // This is original DataSet.WriteXmlSchema() output
+ // Assert.Equal (" <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);
+ Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionID\" type=\"xs:string\" />", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ // This is original DataSet.WriteXmlSchema() output
+ // Assert.Equal (" <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);
+ Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionDescription\" type=\"xs:string\" />", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:sequence>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:complexType>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:element>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:choice>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:complexType>", substring);
+
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:element>", substring);
+
+ Assert.Equal("</xs:schema>", TextString);
+ }
}
[Fact]
[Fact]
public void WriteXmlModeSchema1()
{
- RemoteExecutorForUap.Invoke(() =>
+ // Keeping the brackets as the test otherwise starts to fail.
{
using (new ThreadCultureChange("fi-FI"))
{
string result = w.ToString();
Assert.Equal(expected.Replace("\r", ""), result.Replace("\r", ""));
}
- }).Dispose();
+ }
}
[Fact]
[Fact]
public void DataSetSpecificCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("cs-CZ"))
{
- using (new ThreadCultureChange("cs-CZ"))
- {
- var ds = new DataSet();
- ds.Locale = CultureInfo.GetCultureInfo(1033);
- var dt = ds.Tables.Add("machine");
- dt.Locale = ds.Locale;
- Assert.Same(dt, ds.Tables["MACHINE"]);
- }
- }).Dispose();
+ var ds = new DataSet();
+ ds.Locale = CultureInfo.GetCultureInfo(1033);
+ var dt = ds.Tables.Add("machine");
+ dt.Locale = ds.Locale;
+ Assert.Same(dt, ds.Tables["MACHINE"]);
+ }
}
[Fact]
[Fact]
public void XsdSchemaSerializationIgnoresLocale()
{
- RemoteExecutorForUap.Invoke(() =>
+ var serializer = new BinaryFormatter();
+ var table = new DataTable();
+ table.Columns.Add(new DataColumn("RowID", typeof(int))
+ {
+ AutoIncrement = true,
+ AutoIncrementSeed = -1, // These lines produce attributes within the schema portion of the underlying XML representation of the DataTable with the values "-1" and "-2".
+ AutoIncrementStep = -2,
+ });
+ table.Columns.Add("Value", typeof(string));
+ table.Rows.Add(1, "Test");
+ table.Rows.Add(2, "Data");
+
+ var buffer = new MemoryStream();
+ using (new ThreadCultureChange(new CultureInfo("en-US") { NumberFormat = new NumberFormatInfo() { NegativeSign = "()" } }))
{
- var serializer = new BinaryFormatter();
+ // Before serializing, update the culture to use a weird negative number format. This test is ensuring that this is ignored.
+ serializer.Serialize(buffer, table);
+ }
+
+ // The raw serialized data now contains an embedded XML schema. We need to verify that this embedded schema used "-1" for the numeric value
+ // negative 1, instead of "()1" as indicated by the current culture.
+
+ string rawSerializedData = System.Text.Encoding.ASCII.GetString(buffer.ToArray());
+
+ const string SchemaStartTag = "<xs:schema";
+ const string SchemaEndTag = "</xs:schema>";
+
+ int schemaStart = rawSerializedData.IndexOf(SchemaStartTag);
+ int schemaEnd = rawSerializedData.IndexOf(SchemaEndTag);
+ Assert.True(schemaStart >= 0);
+ Assert.True(schemaEnd > schemaStart);
+ Assert.True(rawSerializedData.IndexOf("<xs:schema", schemaStart + 1) < 0);
+
+ schemaEnd += SchemaEndTag.Length;
+
+ string rawSchemaXML = rawSerializedData.Substring(
+ startIndex: schemaStart,
+ length: schemaEnd - schemaStart);
+ Assert.Contains(@"AutoIncrementSeed=""-1""", rawSchemaXML);
+ Assert.Contains(@"AutoIncrementStep=""-2""", rawSchemaXML);
+ Assert.DoesNotContain("()1", rawSchemaXML);
+ Assert.DoesNotContain("()2", rawSchemaXML);
+ }
+
+ [Fact]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not yet have the fix for this bug")]
+ public void XsdSchemaDeserializationIgnoresLocale()
+ {
+ var serializer = new BinaryFormatter();
+
+ /*
+
+ Test data generator:
+
var table = new DataTable();
table.Columns.Add(new DataColumn("RowID", typeof(int))
{
AutoIncrement = true,
- AutoIncrementSeed = -1, // These lines produce attributes within the schema portion of the underlying XML representation of the DataTable with the values "-1" and "-2".
+ AutoIncrementSeed = -1, // These lines produce attributes within the schema portion of the underlying XML representation of the DataTable with the value "-1".
AutoIncrementStep = -2,
});
table.Columns.Add("Value", typeof(string));
table.Rows.Add(2, "Data");
var buffer = new MemoryStream();
- using (new ThreadCultureChange(new CultureInfo("en-US") { NumberFormat = new NumberFormatInfo() { NegativeSign = "()" } }))
+ serializer.Serialize(buffer, table);
+
+ This test data (binary serializer output) embeds the following XML schema:
+
+ <?xml version="1.0" encoding="utf-16"?>
+ <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xs:element name="Table1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="RowID" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-2" type="xs:int" msdata:targetNamespace="" minOccurs="0" />
+ <xs:element name="Value" type="xs:string" msdata:targetNamespace="" minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="tmpDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Table1" msdata:UseCurrentLocale="true">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded" />
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+
+ The bug being tested here is that the negative integer values in AutoInecrementSeed and AutoIncrementStep fail to parse because the deserialization code
+ incorrectly uses the current culture instead of the invariant culture when parsing strings like "-1" and "-2".
+
+ */
+
+ var buffer = new MemoryStream(new byte[]
{
- // Before serializing, update the culture to use a weird negative number format. This test is ensuring that this is ignored.
- serializer.Serialize(buffer, table);
- }
-
- // The raw serialized data now contains an embedded XML schema. We need to verify that this embedded schema used "-1" for the numeric value
- // negative 1, instead of "()1" as indicated by the current culture.
-
- string rawSerializedData = System.Text.Encoding.ASCII.GetString(buffer.ToArray());
-
- const string SchemaStartTag = "<xs:schema";
- const string SchemaEndTag = "</xs:schema>";
-
- int schemaStart = rawSerializedData.IndexOf(SchemaStartTag);
- int schemaEnd = rawSerializedData.IndexOf(SchemaEndTag);
- Assert.True(schemaStart >= 0);
- Assert.True(schemaEnd > schemaStart);
- Assert.True(rawSerializedData.IndexOf("<xs:schema", schemaStart + 1) < 0);
-
- schemaEnd += SchemaEndTag.Length;
-
- string rawSchemaXML = rawSerializedData.Substring(
- startIndex: schemaStart,
- length: schemaEnd - schemaStart);
- Assert.Contains(@"AutoIncrementSeed=""-1""", rawSchemaXML);
- Assert.Contains(@"AutoIncrementStep=""-2""", rawSchemaXML);
- Assert.DoesNotContain("()1", rawSchemaXML);
- Assert.DoesNotContain("()2", rawSchemaXML);
- }).Dispose();
- }
+ 0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,78,83,121,115,116,101,109,46,68,97,116,97,44,32,86,101,114,115,105,111,110,61,52,46,48,46,48,46,48,44,32,67,117,
+ 108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,98,55,55,97,53,99,53,54,49,57,51,52,101,48,56,57,5,1,0,
+ 0,0,21,83,121,115,116,101,109,46,68,97,116,97,46,68,97,116,97,84,97,98,108,101,3,0,0,0,25,68,97,116,97,84,97,98,108,101,46,82,101,109,111,116,105,110,103,86,101,114,
+ 115,105,111,110,9,88,109,108,83,99,104,101,109,97,11,88,109,108,68,105,102,102,71,114,97,109,3,1,1,14,83,121,115,116,101,109,46,86,101,114,115,105,111,110,2,0,0,0,9,
+ 3,0,0,0,6,4,0,0,0,177,6,60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,110,99,111,100,105,110,103,61,34,117,116,102,45,49,54,34,63,62,13,
+ 10,60,120,115,58,115,99,104,101,109,97,32,120,109,108,110,115,61,34,34,32,120,109,108,110,115,58,120,115,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,
+ 114,103,47,50,48,48,49,47,88,77,76,83,99,104,101,109,97,34,32,120,109,108,110,115,58,109,115,100,97,116,97,61,34,117,114,110,58,115,99,104,101,109,97,115,45,109,105,
+ 99,114,111,115,111,102,116,45,99,111,109,58,120,109,108,45,109,115,100,97,116,97,34,62,13,10,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,
+ 84,97,98,108,101,49,34,62,13,10,32,32,32,32,60,120,115,58,99,111,109,112,108,101,120,84,121,112,101,62,13,10,32,32,32,32,32,32,60,120,115,58,115,101,113,117,101,110,
+ 99,101,62,13,10,32,32,32,32,32,32,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,82,111,119,73,68,34,32,109,115,100,97,116,97,58,65,117,116,
+ 111,73,110,99,114,101,109,101,110,116,61,34,116,114,117,101,34,32,109,115,100,97,116,97,58,65,117,116,111,73,110,99,114,101,109,101,110,116,83,101,101,100,61,34,45,
+ 49,34,32,109,115,100,97,116,97,58,65,117,116,111,73,110,99,114,101,109,101,110,116,83,116,101,112,61,34,45,50,34,32,116,121,112,101,61,34,120,115,58,105,110,116,34,
+ 32,109,115,100,97,116,97,58,116,97,114,103,101,116,78,97,109,101,115,112,97,99,101,61,34,34,32,109,105,110,79,99,99,117,114,115,61,34,48,34,32,47,62,13,10,32,32,32,
+ 32,32,32,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,86,97,108,117,101,34,32,116,121,112,101,61,34,120,115,58,115,116,114,105,110,103,34,
+ 32,109,115,100,97,116,97,58,116,97,114,103,101,116,78,97,109,101,115,112,97,99,101,61,34,34,32,109,105,110,79,99,99,117,114,115,61,34,48,34,32,47,62,13,10,32,32,32,
+ 32,32,32,60,47,120,115,58,115,101,113,117,101,110,99,101,62,13,10,32,32,32,32,60,47,120,115,58,99,111,109,112,108,101,120,84,121,112,101,62,13,10,32,32,60,47,120,115,
+ 58,101,108,101,109,101,110,116,62,13,10,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,116,109,112,68,97,116,97,83,101,116,34,32,109,115,100,
+ 97,116,97,58,73,115,68,97,116,97,83,101,116,61,34,116,114,117,101,34,32,109,115,100,97,116,97,58,77,97,105,110,68,97,116,97,84,97,98,108,101,61,34,84,97,98,108,101,
+ 49,34,32,109,115,100,97,116,97,58,85,115,101,67,117,114,114,101,110,116,76,111,99,97,108,101,61,34,116,114,117,101,34,62,13,10,32,32,32,32,60,120,115,58,99,111,109,
+ 112,108,101,120,84,121,112,101,62,13,10,32,32,32,32,32,32,60,120,115,58,99,104,111,105,99,101,32,109,105,110,79,99,99,117,114,115,61,34,48,34,32,109,97,120,79,99,99,
+ 117,114,115,61,34,117,110,98,111,117,110,100,101,100,34,32,47,62,13,10,32,32,32,32,60,47,120,115,58,99,111,109,112,108,101,120,84,121,112,101,62,13,10,32,32,60,47,
+ 120,115,58,101,108,101,109,101,110,116,62,13,10,60,47,120,115,58,115,99,104,101,109,97,62,6,5,0,0,0,221,3,60,100,105,102,102,103,114,58,100,105,102,102,103,114,97,
+ 109,32,120,109,108,110,115,58,109,115,100,97,116,97,61,34,117,114,110,58,115,99,104,101,109,97,115,45,109,105,99,114,111,115,111,102,116,45,99,111,109,58,120,109,108,
+ 45,109,115,100,97,116,97,34,32,120,109,108,110,115,58,100,105,102,102,103,114,61,34,117,114,110,58,115,99,104,101,109,97,115,45,109,105,99,114,111,115,111,102,116,45,
+ 99,111,109,58,120,109,108,45,100,105,102,102,103,114,97,109,45,118,49,34,62,13,10,32,32,60,116,109,112,68,97,116,97,83,101,116,62,13,10,32,32,32,32,60,84,97,98,108,
+ 101,49,32,100,105,102,102,103,114,58,105,100,61,34,84,97,98,108,101,49,49,34,32,109,115,100,97,116,97,58,114,111,119,79,114,100,101,114,61,34,48,34,32,100,105,102,
+ 102,103,114,58,104,97,115,67,104,97,110,103,101,115,61,34,105,110,115,101,114,116,101,100,34,62,13,10,32,32,32,32,32,32,60,82,111,119,73,68,62,49,60,47,82,111,119,73,
+ 68,62,13,10,32,32,32,32,32,32,60,86,97,108,117,101,62,84,101,115,116,60,47,86,97,108,117,101,62,13,10,32,32,32,32,60,47,84,97,98,108,101,49,62,13,10,32,32,32,32,60,
+ 84,97,98,108,101,49,32,100,105,102,102,103,114,58,105,100,61,34,84,97,98,108,101,49,50,34,32,109,115,100,97,116,97,58,114,111,119,79,114,100,101,114,61,34,49,34,32,
+ 100,105,102,102,103,114,58,104,97,115,67,104,97,110,103,101,115,61,34,105,110,115,101,114,116,101,100,34,62,13,10,32,32,32,32,32,32,60,82,111,119,73,68,62,50,60,47,
+ 82,111,119,73,68,62,13,10,32,32,32,32,32,32,60,86,97,108,117,101,62,68,97,116,97,60,47,86,97,108,117,101,62,13,10,32,32,32,32,60,47,84,97,98,108,101,49,62,13,10,32,
+ 32,60,47,116,109,112,68,97,116,97,83,101,116,62,13,10,60,47,100,105,102,102,103,114,58,100,105,102,102,103,114,97,109,62,4,3,0,0,0,14,83,121,115,116,101,109,46,86,
+ 101,114,115,105,111,110,4,0,0,0,6,95,77,97,106,111,114,6,95,77,105,110,111,114,6,95,66,117,105,108,100,9,95,82,101,118,105,115,105,111,110,0,0,0,0,8,8,8,8,2,0,0,0,0,
+ 0,0,0,255,255,255,255,255,255,255,255,11
+ });
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full framework does not yet have the fix for this bug")]
- public void XsdSchemaDeserializationIgnoresLocale()
- {
- RemoteExecutorForUap.Invoke(() =>
+ DataTable table;
+ using (new ThreadCultureChange(new CultureInfo("en-US") { NumberFormat = new NumberFormatInfo() { NegativeSign = "()" } }))
{
- var serializer = new BinaryFormatter();
-
- /*
-
- Test data generator:
-
- var table = new DataTable();
- table.Columns.Add(new DataColumn("RowID", typeof(int))
- {
- AutoIncrement = true,
- AutoIncrementSeed = -1, // These lines produce attributes within the schema portion of the underlying XML representation of the DataTable with the value "-1".
- AutoIncrementStep = -2,
- });
- table.Columns.Add("Value", typeof(string));
- table.Rows.Add(1, "Test");
- table.Rows.Add(2, "Data");
-
- var buffer = new MemoryStream();
- serializer.Serialize(buffer, table);
-
- This test data (binary serializer output) embeds the following XML schema:
-
- <?xml version="1.0" encoding="utf-16"?>
- <xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="Table1">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="RowID" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-2" type="xs:int" msdata:targetNamespace="" minOccurs="0" />
- <xs:element name="Value" type="xs:string" msdata:targetNamespace="" minOccurs="0" />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="tmpDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Table1" msdata:UseCurrentLocale="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded" />
- </xs:complexType>
- </xs:element>
- </xs:schema>
-
- The bug being tested here is that the negative integer values in AutoInecrementSeed and AutoIncrementStep fail to parse because the deserialization code
- incorrectly uses the current culture instead of the invariant culture when parsing strings like "-1" and "-2".
-
- */
-
- var buffer = new MemoryStream(new byte[]
- {
- 0,1,0,0,0,255,255,255,255,1,0,0,0,0,0,0,0,12,2,0,0,0,78,83,121,115,116,101,109,46,68,97,116,97,44,32,86,101,114,115,105,111,110,61,52,46,48,46,48,46,48,44,32,67,117,
- 108,116,117,114,101,61,110,101,117,116,114,97,108,44,32,80,117,98,108,105,99,75,101,121,84,111,107,101,110,61,98,55,55,97,53,99,53,54,49,57,51,52,101,48,56,57,5,1,0,
- 0,0,21,83,121,115,116,101,109,46,68,97,116,97,46,68,97,116,97,84,97,98,108,101,3,0,0,0,25,68,97,116,97,84,97,98,108,101,46,82,101,109,111,116,105,110,103,86,101,114,
- 115,105,111,110,9,88,109,108,83,99,104,101,109,97,11,88,109,108,68,105,102,102,71,114,97,109,3,1,1,14,83,121,115,116,101,109,46,86,101,114,115,105,111,110,2,0,0,0,9,
- 3,0,0,0,6,4,0,0,0,177,6,60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,110,99,111,100,105,110,103,61,34,117,116,102,45,49,54,34,63,62,13,
- 10,60,120,115,58,115,99,104,101,109,97,32,120,109,108,110,115,61,34,34,32,120,109,108,110,115,58,120,115,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,
- 114,103,47,50,48,48,49,47,88,77,76,83,99,104,101,109,97,34,32,120,109,108,110,115,58,109,115,100,97,116,97,61,34,117,114,110,58,115,99,104,101,109,97,115,45,109,105,
- 99,114,111,115,111,102,116,45,99,111,109,58,120,109,108,45,109,115,100,97,116,97,34,62,13,10,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,
- 84,97,98,108,101,49,34,62,13,10,32,32,32,32,60,120,115,58,99,111,109,112,108,101,120,84,121,112,101,62,13,10,32,32,32,32,32,32,60,120,115,58,115,101,113,117,101,110,
- 99,101,62,13,10,32,32,32,32,32,32,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,82,111,119,73,68,34,32,109,115,100,97,116,97,58,65,117,116,
- 111,73,110,99,114,101,109,101,110,116,61,34,116,114,117,101,34,32,109,115,100,97,116,97,58,65,117,116,111,73,110,99,114,101,109,101,110,116,83,101,101,100,61,34,45,
- 49,34,32,109,115,100,97,116,97,58,65,117,116,111,73,110,99,114,101,109,101,110,116,83,116,101,112,61,34,45,50,34,32,116,121,112,101,61,34,120,115,58,105,110,116,34,
- 32,109,115,100,97,116,97,58,116,97,114,103,101,116,78,97,109,101,115,112,97,99,101,61,34,34,32,109,105,110,79,99,99,117,114,115,61,34,48,34,32,47,62,13,10,32,32,32,
- 32,32,32,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,86,97,108,117,101,34,32,116,121,112,101,61,34,120,115,58,115,116,114,105,110,103,34,
- 32,109,115,100,97,116,97,58,116,97,114,103,101,116,78,97,109,101,115,112,97,99,101,61,34,34,32,109,105,110,79,99,99,117,114,115,61,34,48,34,32,47,62,13,10,32,32,32,
- 32,32,32,60,47,120,115,58,115,101,113,117,101,110,99,101,62,13,10,32,32,32,32,60,47,120,115,58,99,111,109,112,108,101,120,84,121,112,101,62,13,10,32,32,60,47,120,115,
- 58,101,108,101,109,101,110,116,62,13,10,32,32,60,120,115,58,101,108,101,109,101,110,116,32,110,97,109,101,61,34,116,109,112,68,97,116,97,83,101,116,34,32,109,115,100,
- 97,116,97,58,73,115,68,97,116,97,83,101,116,61,34,116,114,117,101,34,32,109,115,100,97,116,97,58,77,97,105,110,68,97,116,97,84,97,98,108,101,61,34,84,97,98,108,101,
- 49,34,32,109,115,100,97,116,97,58,85,115,101,67,117,114,114,101,110,116,76,111,99,97,108,101,61,34,116,114,117,101,34,62,13,10,32,32,32,32,60,120,115,58,99,111,109,
- 112,108,101,120,84,121,112,101,62,13,10,32,32,32,32,32,32,60,120,115,58,99,104,111,105,99,101,32,109,105,110,79,99,99,117,114,115,61,34,48,34,32,109,97,120,79,99,99,
- 117,114,115,61,34,117,110,98,111,117,110,100,101,100,34,32,47,62,13,10,32,32,32,32,60,47,120,115,58,99,111,109,112,108,101,120,84,121,112,101,62,13,10,32,32,60,47,
- 120,115,58,101,108,101,109,101,110,116,62,13,10,60,47,120,115,58,115,99,104,101,109,97,62,6,5,0,0,0,221,3,60,100,105,102,102,103,114,58,100,105,102,102,103,114,97,
- 109,32,120,109,108,110,115,58,109,115,100,97,116,97,61,34,117,114,110,58,115,99,104,101,109,97,115,45,109,105,99,114,111,115,111,102,116,45,99,111,109,58,120,109,108,
- 45,109,115,100,97,116,97,34,32,120,109,108,110,115,58,100,105,102,102,103,114,61,34,117,114,110,58,115,99,104,101,109,97,115,45,109,105,99,114,111,115,111,102,116,45,
- 99,111,109,58,120,109,108,45,100,105,102,102,103,114,97,109,45,118,49,34,62,13,10,32,32,60,116,109,112,68,97,116,97,83,101,116,62,13,10,32,32,32,32,60,84,97,98,108,
- 101,49,32,100,105,102,102,103,114,58,105,100,61,34,84,97,98,108,101,49,49,34,32,109,115,100,97,116,97,58,114,111,119,79,114,100,101,114,61,34,48,34,32,100,105,102,
- 102,103,114,58,104,97,115,67,104,97,110,103,101,115,61,34,105,110,115,101,114,116,101,100,34,62,13,10,32,32,32,32,32,32,60,82,111,119,73,68,62,49,60,47,82,111,119,73,
- 68,62,13,10,32,32,32,32,32,32,60,86,97,108,117,101,62,84,101,115,116,60,47,86,97,108,117,101,62,13,10,32,32,32,32,60,47,84,97,98,108,101,49,62,13,10,32,32,32,32,60,
- 84,97,98,108,101,49,32,100,105,102,102,103,114,58,105,100,61,34,84,97,98,108,101,49,50,34,32,109,115,100,97,116,97,58,114,111,119,79,114,100,101,114,61,34,49,34,32,
- 100,105,102,102,103,114,58,104,97,115,67,104,97,110,103,101,115,61,34,105,110,115,101,114,116,101,100,34,62,13,10,32,32,32,32,32,32,60,82,111,119,73,68,62,50,60,47,
- 82,111,119,73,68,62,13,10,32,32,32,32,32,32,60,86,97,108,117,101,62,68,97,116,97,60,47,86,97,108,117,101,62,13,10,32,32,32,32,60,47,84,97,98,108,101,49,62,13,10,32,
- 32,60,47,116,109,112,68,97,116,97,83,101,116,62,13,10,60,47,100,105,102,102,103,114,58,100,105,102,102,103,114,97,109,62,4,3,0,0,0,14,83,121,115,116,101,109,46,86,
- 101,114,115,105,111,110,4,0,0,0,6,95,77,97,106,111,114,6,95,77,105,110,111,114,6,95,66,117,105,108,100,9,95,82,101,118,105,115,105,111,110,0,0,0,0,8,8,8,8,2,0,0,0,0,
- 0,0,0,255,255,255,255,255,255,255,255,11
- });
+ // Before deserializing, update the culture to use a weird negative number format. This test is ensuring that this is ignored.
+ // The bug this test is testing would cause "-1" to no longer be treated as a valid representation of the value -1, instead
+ // only accepting the string "()1".
+ table = (DataTable)serializer.Deserialize(buffer); // BUG: System.Exception: "-1 is not a valid value for Int64." }
+ }
- DataTable table;
- using (new ThreadCultureChange(new CultureInfo("en-US") { NumberFormat = new NumberFormatInfo() { NegativeSign = "()" } }))
- {
- // Before deserializing, update the culture to use a weird negative number format. This test is ensuring that this is ignored.
- // The bug this test is testing would cause "-1" to no longer be treated as a valid representation of the value -1, instead
- // only accepting the string "()1".
- table = (DataTable)serializer.Deserialize(buffer); // BUG: System.Exception: "-1 is not a valid value for Int64." }
- }
-
- DataColumn rowIDColumn = table.Columns["RowID"];
- Assert.Equal(-1, rowIDColumn.AutoIncrementSeed);
- Assert.Equal(-2, rowIDColumn.AutoIncrementStep);
- }).Dispose();
+ DataColumn rowIDColumn = table.Columns["RowID"];
+ Assert.Equal(-1, rowIDColumn.AutoIncrementSeed);
+ Assert.Equal(-2, rowIDColumn.AutoIncrementStep);
}
[Fact]
[Fact]
public void WriteXmlSchema()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-GB"))
{
- using (new ThreadCultureChange("en-GB"))
- {
- var ds = new DataSet();
- ds.ReadXml(new StringReader(DataProvider.region));
- TextWriter writer = new StringWriter();
- ds.Tables[0].WriteXmlSchema(writer);
+ var ds = new DataSet();
+ ds.ReadXml(new StringReader(DataProvider.region));
+ TextWriter writer = new StringWriter();
+ ds.Tables[0].WriteXmlSchema(writer);
- string TextString = DataSetAssertion.GetNormalizedSchema(writer.ToString());
- //string TextString = writer.ToString ();
+ string TextString = DataSetAssertion.GetNormalizedSchema(writer.ToString());
+ //string TextString = writer.ToString ();
- string substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal("<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
+ string substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal("<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal("<xs:schema id=\"Root\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal("<xs:schema id=\"Root\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- // Looks like whoever added this test depended on English culture, which is wrong.
- Assert.Equal(" <xs:element msdata:IsDataSet=\"true\" msdata:Locale=\"en-US\" msdata:MainDataTable=\"Region\" name=\"Root\">", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ // Looks like whoever added this test depended on English culture, which is wrong.
+ Assert.Equal(" <xs:element msdata:IsDataSet=\"true\" msdata:Locale=\"en-US\" msdata:MainDataTable=\"Region\" name=\"Root\">", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:complexType>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:complexType>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:choice maxOccurs=\"unbounded\" minOccurs=\"0\">", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:choice maxOccurs=\"unbounded\" minOccurs=\"0\">", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:element name=\"Region\">", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:element name=\"Region\">", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:complexType>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:complexType>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:sequence>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:sequence>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionID\" type=\"xs:string\" />", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionID\" type=\"xs:string\" />", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionDescription\" type=\"xs:string\" />", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" <xs:element minOccurs=\"0\" name=\"RegionDescription\" type=\"xs:string\" />", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:sequence>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:sequence>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:complexType>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:complexType>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:element>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:element>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:choice>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:choice>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:complexType>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:complexType>", substring);
- substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
- TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
- Assert.Equal(" </xs:element>", substring);
+ substring = TextString.Substring(0, TextString.IndexOfAny(new[] { '\r', '\n' }));
+ TextString = TextString.Substring(TextString.IndexOf('\n') + 1);
+ Assert.Equal(" </xs:element>", substring);
- Assert.Equal("</xs:schema>", TextString);
- }
- }).Dispose();
+ Assert.Equal("</xs:schema>", TextString);
+ }
}
[Fact]
[Fact]
public void Bug82109()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- DataTable tbl = new DataTable();
- tbl.Columns.Add("data", typeof(DateTime));
- DataRow row = tbl.NewRow();
- row["Data"] = new DateTime(2007, 7, 1);
- tbl.Rows.Add(row);
+ DataTable tbl = new DataTable();
+ tbl.Columns.Add("data", typeof(DateTime));
+ DataRow row = tbl.NewRow();
+ row["Data"] = new DateTime(2007, 7, 1);
+ tbl.Rows.Add(row);
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- Select(tbl);
- }
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ {
+ Select(tbl);
+ }
- using (new ThreadCultureChange("it-IT"))
- {
- Select(tbl);
- }
+ using (new ThreadCultureChange("it-IT"))
+ {
+ Select(tbl);
+ }
- using (new ThreadCultureChange("fr-FR"))
- {
- Select(tbl);
- }
- }).Dispose();
+ using (new ThreadCultureChange("fr-FR"))
+ {
+ Select(tbl);
+ }
}
private static void Select(DataTable tbl)
[Fact]
public void Properties()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-AU"))
{
- using (new ThreadCultureChange("en-AU"))
- {
- var one = new SqlString("First TestString");
+ var one = new SqlString("First TestString");
- // CompareInfo
- Assert.Equal(3081, one.CompareInfo.LCID);
+ // CompareInfo
+ Assert.Equal(3081, one.CompareInfo.LCID);
- // CultureInfo
- Assert.Equal(3081, one.CultureInfo.LCID);
+ // CultureInfo
+ Assert.Equal(3081, one.CultureInfo.LCID);
- // LCID
- Assert.Equal(3081, one.LCID);
+ // LCID
+ Assert.Equal(3081, one.LCID);
- // IsNull
- Assert.True(!one.IsNull);
- Assert.True(SqlString.Null.IsNull);
+ // IsNull
+ Assert.True(!one.IsNull);
+ Assert.True(SqlString.Null.IsNull);
- // SqlCompareOptions
- Assert.Equal("IgnoreCase, IgnoreKanaType, IgnoreWidth", one.SqlCompareOptions.ToString());
+ // SqlCompareOptions
+ Assert.Equal("IgnoreCase, IgnoreKanaType, IgnoreWidth", one.SqlCompareOptions.ToString());
- // Value
- Assert.Equal("First TestString", one.Value);
- }
- }).Dispose();
+ // Value
+ Assert.Equal("First TestString", one.Value);
+ }
}
// PUBLIC METHODS
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<BuildConfigurations>
netstandard;
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNETStandard)' == 'true'">
<Compile Include="System.Data.DataSetExtensions.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Data.DataSetExtensions</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Mono\DataRowComparerTest.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <RootNamespace>System.Data.OleDb</RootNamespace>
- <AssemblyName>System.Data.OleDb</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
- <DefineConstants>$(DefineConstants);</DefineConstants>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS' AND '$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_OleDb</GeneratePlatformNotSupportedAssemblyMessage>
<Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <EnablePinvokeUWPAnalyzer>false</EnablePinvokeUWPAnalyzer>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetFx)' != 'true' AND '$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<PropertyGroup>
<AssemblyVersion>4.6.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<SupportedFramework>net46;netcoreapp1.0</SupportedFramework>
</HarvestIncludePaths>
<HarvestIncludePaths Include="runtimes/unix/lib/netstandard1.3;runtimes/win/lib/netstandard1.3" />
+ <HarvestIncludePaths Include="runtimes/win/lib/uap10.0.16299" />
<!-- Since UAP and .NETCoreApp are package based we still want to enable
OOBing libraries that happen to overlap with their framework package.
<Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <SuppressPackageTargetFrameworkCompatibility Include="$(UAPvNextTFM);uap10.0.16299" />
<Compile Include="System.Data.SqlClient.cs" />
<Compile Include="System.Data.SqlClient.Forwards.cs" />
<Compile Condition="'$(TargetsNetFx)' != 'true'" Include="System.Data.SqlClient.Manual.cs" />
netcoreapp2.1;
netcoreapp2.1-Unix;
netcoreapp2.1-Windows_NT;
- uap10.0.16299-Windows_NT;
- uap-Windows_NT;
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations)
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573;nullable</NoWarn>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
- <IsUAPAssembly Condition="'$(TargetGroup)' == 'uap' OR '$(TargetGroup)' == 'uap10.0.16299'">true</IsUAPAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS'">SR.PlatformNotSupported_DataSqlClient</GeneratePlatformNotSupportedAssemblyMessage>
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.2'">4.0.0.0</AssemblyVersion>
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.3'">4.1.0.0</AssemblyVersion>
<DefineConstants Condition="'$(TargetsNetCoreApp)' != 'true'">$(DefineConstants);NETSTANDARD2_0</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);FEATURE_TCPKEEPALIVE</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' != 'netcoreapp'">$(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
- <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netstandard1.2-Debug;netstandard1.2-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uap10.0.16299-Windows_NT-Debug;uap10.0.16299-Windows_NT-Release</Configurations>
+ <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netstandard1.2-Debug;netstandard1.2-Release;netstandard1.3-Debug;netstandard1.3-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netcoreapp'">
<Compile Include="$(CommonPath)\CoreLib\System\Diagnostics\CodeAnalysis\NullableAttributes.cs">
<Link>Common\CoreLib\System\Diagnostics\CodeAnalysis\NullableAttributes.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard' OR '$(TargetsNetCoreApp)' == 'true' OR '$(IsUAPAssembly)' == 'true' ">
+ <ItemGroup Condition="'$(TargetGroup)' == 'netstandard' OR '$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System.Data.SqlClient.TypeForwards.cs" />
</ItemGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true' AND '$(OSGroup)' != 'AnyOS' AND '$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System\Data\SqlClient\SessionHandle.Windows.cs" />
<AdditionalFiles Include="$(MSBuildProjectDirectory)/*.analyzerdata.windows" />
</ItemGroup>
- <ItemGroup Condition="'$(IsUAPAssembly)' == 'true'">
- <Compile Include="System\Data\SqlClient\SNI\SNITcpHandle.Windows.cs" />
- <Compile Include="System\Data\SqlClient\TdsParserStateObjectFactory.Managed.cs" />
- <Compile Include="System\Data\SqlClient\LocalDBAPI.uap.cs" />
- <Compile Include="System\Data\SqlClient\SNI\LocalDB.uap.cs" />
- <Compile Include="System\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs" />
- <Compile Include="System\Data\SqlClient\TdsParser.Unix.cs" />
- <Compile Include="System\Data\SqlClient\PacketHandle.Unix.cs" />
- <Compile Include="System\Data\SqlClient\SessionHandle.Unix.cs" />
- </ItemGroup>
- <!-- Assets needed on Windows but should be avoided on UAP to avoid sni.dll -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(IsPartialFacadeAssembly)' != 'true' and '$(IsUAPAssembly)' != 'true'">
+ <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(IsPartialFacadeAssembly)' != 'true'">
<Compile Include="System\Data\SqlClient\TdsParserStateObjectNative.cs" />
<Compile Include="Interop\SNINativeMethodWrapper.Windows.cs" />
<Compile Include="System\Data\SqlClient\TdsParserSafeHandles.cs" />
<Compile Include="System\Data\SqlClient\PacketHandle.Unix.cs" />
<Compile Include="System\Data\SqlClient\SessionHandle.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' And '$(IsPartialFacadeAssembly)' != 'true' and '$(IsUAPAssembly)' != 'true'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true' And '$(IsPartialFacadeAssembly)' != 'true'">
<Reference Include="Microsoft.Win32.Registry" />
</ItemGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<Reference Include="System.Net.Primitives" />
<Reference Include="System.Net.NameResolution" />
</ItemGroup>
- <ItemGroup Condition="('$(OSGroup)' != 'AnyOS' AND '$(IsUAPAssembly)' == 'true') OR '$(TargetsNetCoreApp)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Reference Include="System.Transactions.Local" />
<Reference Include="System.Collections.NonGeneric" />
</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 System.Threading;
-using System.Data.SqlClient;
-using System.Data.SqlClient.SNI;
-using System.Runtime.InteropServices;
-
-namespace System.Data
-{
- internal static partial class LocalDBAPI
- {
- private static IntPtr LoadProcAddress() =>
- throw new PlatformNotSupportedException(SR.LocalDBNotSupported); // No Registry support on UAP
- }
-}
\ 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.
-
-namespace System.Data.SqlClient.SNI
-{
- internal class LocalDB
- {
- internal static string GetLocalDBConnectionString(string localDbInstance)
- {
- throw new PlatformNotSupportedException(SR.LocalDBNotSupported); // No Registry support on UAP
- }
- }
-}
\ No newline at end of file
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netfx-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
OpenBadConnection(builder.ConnectionString, invalidConnStringError);
}
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)]
- public static void LocalDBNotSupportedOnUapTest()
- {
- SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(@"server=(localdb)\MSSQLLocalDB")
- {
- IntegratedSecurity = true,
- ConnectTimeout = 2
- };
-
- Assert.Throws<PlatformNotSupportedException>(() =>
- {
- using (SqlConnection conn = new SqlConnection(builder.ConnectionString))
- {
- conn.Open();
- }
- });
- }
-
private void GenerateConnectionException(string connectionString)
{
using (SqlConnection sqlConnection = new SqlConnection(connectionString))
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AADAccessTokenTest.cs" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // Cannot retrieve UseManagedSNI flag via reflection on UAP
public static void NonAzureNoProtocolConnectionTest()
{
builder.DataSource = InvalidHostname;
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
private static bool IsLocalDBEnvironmentSet() => DataTestUtility.IsLocalDBInstalled();
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // No Registry support on UAP
[ConditionalFact(nameof(IsLocalDBEnvironmentSet))]
public static void LocalDBConnectionTest()
{
OpenConnection(builder.ConnectionString);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // No Registry support on UAP
[ConditionalFact(nameof(IsLocalDBEnvironmentSet))]
public static void LocalDBMarsTest()
{
OpenConnection(builder.ConnectionString);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // No Registry support on UAP
[ConditionalFact(nameof(IsLocalDBEnvironmentSet))]
public static void InvalidDBTest()
{
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
netcoreapp-Unix;
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AssemblyName>System.Data.SqlClient.Stress.Tests</AssemblyName>
<!-- These should not run in Helix: they produce no outputs and are only run manually -->
<ArchiveTest>false</ArchiveTest>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\System.Data.StressRunner\System.Data.StressRunner.csproj" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
netfx-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Stress.Data</RootNamespace>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\System.Data.StressRunner\System.Data.StressRunner.csproj" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
netfx-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<RootNamespace>DPStressHarness</RootNamespace>
<OutputType>Exe</OutputType>
<NoWarn>3021</NoWarn>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\IMonitorLoader\IMonitorLoader.csproj" />
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Diagnostics.Contracts</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Diagnostics.Debug</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.Diagnostics.Tests</RootNamespace>
<IgnoreArchitectureMismatches>true</IgnoreArchitectureMismatches>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
\ No newline at end of file
netcoreapp;
netstandard;
netfx;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
we also have a separate complilation of this DLL that works for V4.5
(which is netstandard1.1). Again we duplicate in a portable-* folder
to work with older NuGet clients -->
- <PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8+wpa81</PackageTargetFramework>
+ <PackageTargetFramework Condition="'$(TargetFramework)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8+wpa81</PackageTargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLSCompliant>false</CLSCompliant>
<NoWarn>$(NoWarn);SA1205</NoWarn>
- <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>
<Nullable>enable</Nullable>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)' == 'netstandard1.1' OR '$(TargetGroup)' == 'net45'">
- <DefineConstants>$(DefineConstants);NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)' == 'netstandard1.1'">
- <DefineConstants>$(DefineConstants);NETSTANDARD1_1</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)' == 'net45' OR '$(TargetGroup)' == 'net46' OR '$(TargetGroup)' == 'netfx'">
- <DefineConstants>$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS;ENABLE_HTTP_HANDLER</DefineConstants>
+ <DefineConstants Condition="'$(TargetFramework)' == 'netstandard1.1' OR '$(TargetFramework)' == 'net45'">$(DefineConstants);NO_EVENTSOURCE_COMPLEX_TYPE_SUPPORT</DefineConstants>
+ <DefineConstants Condition="'$(TargetsNetFx)' == 'true'">$(DefineConstants);ALLOW_PARTIALLY_TRUSTED_CALLERS;ENABLE_HTTP_HANDLER</DefineConstants>
+ <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</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Diagnostics\DiagnosticSource.cs" />
<Compile Include="System\Diagnostics\DiagnosticSourceEventSource.cs" />
<None Include="DiagnosticSourceUsersGuide.md" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' != 'netstandard1.1'">
+ <ItemGroup Condition=" '$(TargetFramework)' != 'netstandard1.1'">
<Compile Include="System\Diagnostics\Activity.cs" />
<Compile Include="System\Diagnostics\DiagnosticSourceActivity.cs" />
<Reference Include="System.Memory" />
<Reference Include="System.Runtime.CompilerServices.Unsafe" />
<None Include="ActivityUserGuide.md" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' != 'net45' And '$(TargetGroup)' != 'netstandard1.1'">
+ <ItemGroup Condition=" '$(TargetFramework)' != 'net45' And '$(TargetFramework)' != 'netstandard1.1'">
<Compile Include="System\Diagnostics\Activity.Current.net46.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' == 'net45' ">
+ <ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Compile Include="System\Diagnostics\Activity.Current.net45.cs" />
<TargetingPackReference Include="System" />
<TargetingPackReference Include="System.Runtime.Remoting" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap' OR '$(TargetGroup)' == 'netstandard1.1' OR '$(TargetGroup)' == 'netstandard1.3' OR '$(TargetGroup)' == 'netstandard'">
+ <ItemGroup Condition=" '$(TargetsNetCoreApp)' == 'true' OR '$(TargetFramework)' == 'netstandard1.1' OR '$(TargetGroup)' == 'netstandard1.3' OR '$(TargetGroup)' == 'netstandard'">
<Compile Include="System\Diagnostics\Activity.DateTime.corefx.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap' OR '$(TargetGroup)' == 'netstandard2.1'">
+ <ItemGroup Condition=" '$(TargetsNetCoreApp)' == 'true' OR '$(TargetFramework)' == 'netstandard2.1'">
<Compile Include="System\Diagnostics\Activity.GenerateRootId.netcoreapp.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' != 'netcoreapp' AND '$(TargetGroup)' != 'uap' AND '$(TargetGroup)' != 'netstandard2.1' AND '$(TargetGroup)' != 'netstandard1.1'">
+ <ItemGroup Condition=" '$(TargetsNetCoreApp)' != 'true' AND '$(TargetFramework)' != 'netstandard2.1' AND '$(TargetFramework)' != 'netstandard1.1'">
<Compile Include="System\Diagnostics\Activity.GenerateRootId.netfx.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'net45' OR '$(TargetGroup)' == 'net46' OR '$(TargetGroup)' == 'netfx'">
+ <ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Compile Include="System\Diagnostics\HttpHandlerDiagnosticListener.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netfx'">
<Reference Include="System.Threading" />
<Reference Include="System.Resources.ResourceManager" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'net45' OR '$(TargetGroup)' == 'net46' OR '$(TargetGroup)' == 'netfx'">
+ <ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Compile Include="AssemblyInfo.netfx.cs" />
<Compile Include="System\Diagnostics\Activity.DateTime.netfx.cs" />
<Reference Include="mscorlib" />
<BuildConfigurations>
netcoreapp;
netfx-Windows_NT;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetsNetFx)' != 'true'">
<Compile Include="DiagnosticSourceEventSourceBridgeTests.cs" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_EventLog</GeneratePlatformNotSupportedAssemblyMessage>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
<Configurations>net461-Debug;net461-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.FileVersionInfo.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
</BuildConfigurations>
<AssemblyName>System.Diagnostics.FileVersionInfo</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap' or '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup>
<Compile Include="System\Diagnostics\FileVersionInfo.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Link>Common\Interop\Windows\Interop.VSFixedFileInfo.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="System\Diagnostics\FileVersionInfo.Unix.cs" />
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.InteropServices" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' OR '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<ProjectReference Include="../../System.Reflection.Metadata/src/System.Reflection.Metadata.csproj" />
<Reference Include="System.Collections.Immutable" />
<Reference Include="System.IO" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<OutputType>Exe</OutputType>
<TargetExt>.dll</TargetExt>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Assembly1.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Don't want to create temp file in app container current directory")]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFX throws ArgumentException in this case")]
public void FileVersionInfo_RelativePath_CorrectFilePath()
{
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Diagnostics.FileVersionInfo.Tests</AssemblyName>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_PerfCounters</GeneratePlatformNotSupportedAssemblyMessage>
- <UWPCompatible>false</UWPCompatible>
<Configurations>net461-Debug;net461-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp'))">
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class CounterCreationDataCollectionTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class CounterCreationDataTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class CounterSampleCalculatorTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class CounterSampleTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class InstanceDataTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class PerformanceCounterCategoryTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public static class PerformanceCounterTests
{
[ConditionalFact(typeof(Helpers), nameof(Helpers.IsElevatedAndCanWriteToPerfCounters))]
namespace System.Diagnostics.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // In appcontainer, cannot write to perf counters
public class PerformanceDataTests : IClassFixture<PerformanceDataTestsFixture>
{
PerformanceDataTestsFixture _fixture = null;
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.Process.cs" />
netcoreapp-Linux;
netcoreapp-OSX;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>System.Diagnostics.Process</RootNamespace>
- <AssemblyName>System.Diagnostics.Process</AssemblyName>
- <DefineConstants Condition="'$(TargetGroup)' != 'uap'">$(DefineConstants);FEATURE_REGISTRY</DefineConstants>
+ <DefineConstants>$(DefineConstants);FEATURE_REGISTRY</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
- <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetsFreeBSD)' == 'true' OR '$(TargetsUnknownUnix)' == 'true' ">
<!-- Suppress unused field warnings when using PlatformNotSupportedException stubs -->
<Link>Common\Interop\Windows\Interop.Errors.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.EnumProcessModules.cs">
<Link>Common\Interop\Windows\Kernel32\Interop.EnumProcessModules.cs</Link>
</Compile>
<Compile Include="System\Diagnostics\ProcessManager.Win32.cs" />
<Compile Include="System\Diagnostics\ProcessStartInfo.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Compile Include="System\Diagnostics\Process.Uap.cs" />
- <Compile Include="System\Diagnostics\ProcessManager.Uap.cs" />
- <Compile Include="System\Diagnostics\ProcessStartInfo.Uap.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap'">
+ <ItemGroup>
<Compile Include="System\Diagnostics\Process.NonUap.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsFreeBSD)' == 'true'">
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
- <Reference Condition="'$(TargetGroup)' != 'uap'" Include="Microsoft.Win32.Registry" />
+ <Reference Include="Microsoft.Win32.Registry" />
<Reference Include="System.Buffers" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.Concurrent" />
+++ /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.
-
-namespace System.Diagnostics
-{
- public partial class Process : IDisposable
- {
- private bool StartCore(ProcessStartInfo startInfo)
- {
- return startInfo.UseShellExecute
- ? throw new PlatformNotSupportedException(SR.UseShellExecuteNotSupported)
- : StartWithCreateProcess(startInfo);
- }
-
- public IntPtr MainWindowHandle => IntPtr.Zero;
-
- private bool CloseMainWindowCore() => false;
-
- public string MainWindowTitle => string.Empty;
-
- public bool Responding => true;
-
- private bool WaitForInputIdleCore(int milliseconds) => throw new InvalidOperationException(SR.InputIdleUnkownError);
-
- public void Kill(bool entireProcessTree) => throw new PlatformNotSupportedException();
- }
-}
+++ /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.Buffers;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Globalization;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Text;
-using System.Threading;
-using Microsoft.Win32.SafeHandles;
-
-namespace System.Diagnostics
-{
- internal static partial class ProcessManager
- {
- public static IntPtr GetMainWindowHandle(int processId) => IntPtr.Zero;
- }
-
- internal static partial class NtProcessManager
- {
- private static ProcessModuleCollection GetModules(int processId, bool firstModuleOnly)
- {
- // We don't have a good way of getting all of the modules of the particular process,
- // but we can at least get the path to the executable file for the process, and
- // other than for debugging tools, that's the main reason consumers of Modules care about it,
- // and why MainModule exists.
- char[] chars = null;
- int capacity = 64, length = 0;
- try
- {
- // Get the path to the executable
- using (Process process = Process.GetProcessById(processId))
- {
- do
- {
- if (chars != null)
- {
- ArrayPool<char>.Shared.Return(chars);
- }
- capacity = Math.Min(capacity * 2, short.MaxValue);
- chars = ArrayPool<char>.Shared.Rent(capacity);
- length = Interop.Kernel32.GetModuleFileNameEx(process.SafeHandle, IntPtr.Zero, chars, chars.Length);
- // GetModuleFileNameEx truncates the name if capacity isn't sufficient. If provided buffer is full and smaller
- // than the maximum size of a Windows string (see UNICODE_STRING), retry with a bigger buffer.
- } while (length == chars.Length - 1 && capacity <= short.MaxValue);
-
- string exePath = new string(chars, 0, length);
-
- if (!string.IsNullOrEmpty(exePath))
- {
- return new ProcessModuleCollection(1)
- {
- new ProcessModule()
- {
- FileName = exePath,
- ModuleName = Path.GetFileName(exePath)
- }
- };
- }
- }
- }
- catch { } // eat all errors
- finally
- {
- if (chars != null)
- {
- ArrayPool<char>.Shared.Return(chars);
- }
- }
-
- return new ProcessModuleCollection(0);
- }
- }
-
- internal static class NtProcessInfoHelper
- {
- internal static ProcessInfo[] GetProcessInfos(Predicate<int> processIdFilter = null)
- {
- throw new PlatformNotSupportedException(SR.GetProcessInfoNotSupported); // NtDll.NtQuerySystemInformation is not available in Uap
- }
- }
-}
+++ /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.
-
-namespace System.Diagnostics
-{
- public sealed partial class ProcessStartInfo
- {
- public string[] Verbs => Array.Empty<string>();
-
- // Not available on Uap as ShellExecuteEx isn't whitelisted. Note that using ShellExecuteEx
- // also depends on being able to change the apartment state for a thread to STA (CLR is MTA).
- public bool UseShellExecute
- {
- get { return false; }
- set { if (value) throw new PlatformNotSupportedException(SR.UseShellExecuteNotSupported); }
- }
- }
-}
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestThreadCollectionBehavior()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Process.Modules is not supported on uap")]
public void Modules_Get_ContainsHostFileName()
{
ProcessModuleCollection modules = Process.GetCurrentProcess().Modules;
private const int s_ConsoleEncoding = 437;
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Get/SetConsoleOutputCP not supported yet https://github.com/dotnet/corefx/issues/21483")]
public void TestChangesInConsoleEncoding()
{
Action<int> run = expectedCodePage =>
namespace System.Diagnostics.Tests
{
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public partial class ProcessStartInfoTests : ProcessTestBase
{
[Fact]
}
[Fact]
- [ActiveIssue(29865, TargetFrameworkMonikers.Uap)]
public void TestSetEnvironmentOnChildProcess()
{
const string name = "b5a715d3-d74f-465d-abb7-2abe844750c9";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestEnvironmentOfChildProcess()
{
const string ItemSeparator = "CAFF9451396B4EEF8A5155A15BDC2080"; // random string that shouldn't be in any env vars; used instead of newline to separate env var strings
}
}
- [PlatformSpecific(TestPlatforms.Windows)]
- [Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap, "Only UAP blocks setting ShellExecute to true")]
- public void UseShellExecute_GetSetWindows_Success_Uap()
- {
- ProcessStartInfo psi = new ProcessStartInfo();
- Assert.False(psi.UseShellExecute);
-
- // Calling the setter
- Assert.Throws<PlatformNotSupportedException>(() => { psi.UseShellExecute = true; });
- psi.UseShellExecute = false;
-
- // Calling the getter
- Assert.False(psi.UseShellExecute, "UseShellExecute=true is not supported on onecore.");
- }
-
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
- public void TestUseShellExecuteProperty_SetAndGet_NotUapOrNetFX()
+ public void TestUseShellExecuteProperty_SetAndGet()
{
ProcessStartInfo psi = new ProcessStartInfo();
Assert.False(psi.UseShellExecute);
[InlineData(0)]
[InlineData(1)]
[InlineData(2)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void TestUseShellExecuteProperty_Redirects_NotSupported(int std)
{
Process p = CreateProcessLong();
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Nano does not support these verbs
[PlatformSpecific(TestPlatforms.Windows)] // Test case is specific to Windows
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void Verbs_GetWithExeExtension_ReturnsExpected()
{
var psi = new ProcessStartInfo { FileName = $"{Process.GetCurrentProcess().ProcessName}.exe" };
[Fact(Skip = "Manual test")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void StartInfo_WebPage()
{
ProcessStartInfo info = new ProcessStartInfo
[MemberData(nameof(UseShellExecute))]
[OuterLoop("Launches notepad")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WaitForInputIdle, ProcessName, and MainWindowTitle are not supported on UAP")]
public void StartInfo_NotepadWithContent(bool useShellExecute)
{
string tempFile = GetTestFilePath() + ".txt";
nameof(PlatformDetection.IsNotWindows8x))] // https://github.com/dotnet/corefx/issues/20388
[OuterLoop("Launches notepad")]
[PlatformSpecific(TestPlatforms.Windows)]
- // We don't have the ability yet for UseShellExecute in UAP
- [ActiveIssue("https://github.com/dotnet/corefx/issues/20204", TargetFrameworkMonikers.Uap)]
public void StartInfo_TextFile_ShellExecute()
{
if (Thread.CurrentThread.CurrentCulture.ToString() != "en-US")
process.WaitForInputIdle(); // Give the file a chance to load
Assert.Equal("notepad", process.ProcessName);
- if (PlatformDetection.IsUap)
+ if (PlatformDetection.IsInAppContainer)
{
Assert.Throws<PlatformNotSupportedException>(() => process.MainWindowTitle);
}
{
TheoryData<bool> data = new TheoryData<bool> { false };
- if ( !PlatformDetection.IsUap // https://github.com/dotnet/corefx/issues/20204
+ if ( !PlatformDetection.IsInAppContainer // https://github.com/dotnet/corefx/issues/20204
&& !PlatformDetection.IsWindowsNanoServer // By design
&& !PlatformDetection.IsWindowsIoTCore)
data.Add(true);
[MemberData(nameof(UseShellExecute))]
[OuterLoop("Launches notepad")]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WaitForInputIdle, ProcessName, and MainWindowTitle are not supported on UAP")]
public void StartInfo_NotepadWithContent_withArgumentList(bool useShellExecute)
{
string tempFile = GetTestFilePath() + ".txt";
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Pipe doesn't work well on UAP")]
async public Task TestAsyncOutputStream_CancelOutputRead()
{
// This test might have some false negatives due to possible race condition in System.Diagnostics.AsyncStreamReader.ReadBufferAsync
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Pipe doesn't work well on UAP")]
async public Task TestAsyncOutputStream_BeginCancelBeginOutputRead()
{
using (AnonymousPipeServerStream pipeWrite = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable))
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "No simple way to perform this on uap using cmd.exe")]
public void TestAsyncHalfCharacterAtATime()
{
var receivedOutput = false;
public partial class ProcessStreamReadTests : ProcessTestBase
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemotelyInvokable.ReadLineWithCustomEncodingWriteLineWithUtf8 is not supported on uap")]
public void TestCustomStandardInputEncoding()
{
var process = CreateProcessPortable(RemotelyInvokable.ReadLineWithCustomEncodingWriteLineWithUtf8, Encoding.UTF32.WebName);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemotelyInvokable.ReadLineWithCustomEncodingWriteLineWithUtf8 is not supported on uap")]
public void TestMismatchedStandardInputEncoding()
{
var process = CreateProcessPortable(RemotelyInvokable.ReadLineWithCustomEncodingWriteLineWithUtf8, Encoding.UTF32.WebName);
+++ /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.Reflection;
-using System.Threading;
-using Xunit;
-
-namespace System.Diagnostics.Tests
-{
- partial class ProcessTestBase
- {
- protected static readonly string RunnerName = "cmd.exe";
-
- protected Process CreateProcessLong()
- {
- return CreateSleepProcess(RemotelyInvokable.WaitInMS);
- }
-
- protected Process CreateSleepProcess(int durationMs)
- {
- return CreateProcessForUap(RemotelyInvokable.Sleep, durationMs.ToString());
- }
-
- protected Process CreateProcessPortable(Func<int> func)
- {
- return CreateProcessForUap(func);
- }
-
- protected Process CreateProcessPortable(Func<string, int> func, string arg)
- {
- return CreateProcessForUap(func, arg);
- }
-
- protected Process CreateProcessForUap(Func<int> func)
- {
- return CreateProcessForUap(func.Method, Array.Empty<string>());
- }
-
- protected Process CreateProcessForUap(Func<string, int> func, string arg)
- {
- return CreateProcessForUap(func.Method, new string[] { arg });
- }
-
- private MethodInfo GetMethodForUap(MethodInfo originalMethod)
- {
- string methodName = $"{originalMethod.Name}UapCmd";
-
- MethodInfo mi = typeof(RemotelyInvokable)
- .GetMethod(methodName, BindingFlags.Static | BindingFlags.Public);
- if (mi == null || mi.ReturnType != typeof(string) || mi.GetParameters().Length != originalMethod.GetParameters().Length)
- {
- throw new Exception($"Method {methodName} could not be found in class {nameof(RemotelyInvokable)}.");
- }
-
- return mi;
- }
-
- protected Process CreateProcessForUap(MethodInfo method, string[] args)
- {
- if (method.DeclaringType != typeof(RemotelyInvokable))
- {
- throw new Exception($"Method needs to be defined in {nameof(RemotelyInvokable)} class.");
- }
-
- if (method.Name == nameof(RemotelyInvokable.Sleep))
- {
- return CreateSleepProcess(int.Parse(args[0]));
- }
-
- MethodInfo uapMethod = GetMethodForUap(method);
- string cmdArgs = (string)uapMethod.Invoke(null, args);
-
- var p = new Process()
- {
- StartInfo = new ProcessStartInfo()
- {
- FileName = RunnerName,
- Arguments = $"/C {PasteArguments.Paste(new string[] { cmdArgs }, false)}"
- }
- };
-
- AddProcessForDispose(p);
- return p;
- }
- }
-}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
[PlatformSpecific(TestPlatforms.Windows)] // Expected behavior varies on Windows and Unix
public void TestBasePriorityOnWindows()
{
}
[Theory]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
[InlineData(true)]
[InlineData(false)]
[InlineData(null)]
[Fact]
[PlatformSpecific(~TestPlatforms.OSX)] // OSX doesn't support throwing on Process.Start
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // UWP overrides WorkingDirectory (https://github.com/dotnet/corefx/pull/25266#issuecomment-347719832).
public void TestStartWithBadWorkingDirectory()
{
string program;
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasWindowsShell))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "not supported on UAP")]
[OuterLoop("Launches File Explorer")]
public void ProcessStart_UseShellExecute_OnWindows_OpenMissingFile_Throws()
{
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.HasWindowsShell))]
[InlineData(true)]
[InlineData(false)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "not supported on UAP")]
[OuterLoop("Launches File Explorer")]
public void ProcessStart_UseShellExecute_OnWindows_DoesNotThrow(bool isFolder)
{
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsServerCore),
nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsIoTCore))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "not supported on UAP")]
[InlineData(true), InlineData(false)]
public void ProcessStart_UseShellExecute_Executes(bool filenameAsUrl)
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsServerCore),
nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsIoTCore))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "not supported on UAP")]
public void ProcessStart_UseShellExecute_ExecuteOrder()
{
// Create a directory that we will use as PATH
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsServerCore),
nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsIoTCore))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "not supported on UAP")]
public void ProcessStart_UseShellExecute_WorkingDirectory()
{
// Create a directory that will ProcessStartInfo.WorkingDirectory
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestExitCode()
{
{
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestExitTime()
{
// Try twice, since it's possible that the system clock could be adjusted backwards between when we snapshot it
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestId()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestHasExited()
{
{
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestMachineName()
{
CreateDefaultProcess();
Process p = Process.GetCurrentProcess();
// On UAP casing may not match - we use Path.GetFileName(exePath) instead of kernel32!GetModuleFileNameEx which is not available on UAP
- Func<string, string> normalize = PlatformDetection.IsUap ?
+ Func<string, string> normalize = PlatformDetection.IsInAppContainer ?
(Func<string, string>)((s) => s.ToLowerInvariant()) :
(s) => s;
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestMaxWorkingSet()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestMinWorkingSet()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestNonpagedSystemMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPagedMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPagedSystemMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPeakPagedMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPeakVirtualMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPeakWorkingSet64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPrivateMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestVirtualMemorySize64()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestWorkingSet64()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestProcessorTime()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TotalProcessorTime_PerformLoop_TotalProcessorTimeValid()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void ProcessStartTime_Deterministic_Across_Instances()
{
CreateDefaultProcess();
[Fact]
[PlatformSpecific(~(TestPlatforms.OSX | TestPlatforms.FreeBSD))] // getting/setting affinity not supported on OSX and BSD
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestProcessorAffinity()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestPriorityBoostEnabled()
{
CreateDefaultProcess();
}
[Fact, PlatformSpecific(TestPlatforms.Windows)] // Expected behavior varies on Windows and Unix
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestPriorityClassWindows()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestProcessName()
{
CreateDefaultProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestSafeHandle()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestSessionId()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestGetProcessById()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestGetProcesses()
{
Process currentProcess = Process.GetCurrentProcess();
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/32780
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void GetProcessesByName_ProcessName_ReturnsExpected()
{
// Get the current process using its name
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
[MemberData(nameof(MachineName_TestData))]
public void GetProcessesByName_ProcessNameMachineName_ReturnsExpected(string machineName)
{
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
[MemberData(nameof(MachineName_Remote_TestData))]
[PlatformSpecific(TestPlatforms.Windows)] // Accessing processes on remote machines is only supported on Windows.
public void GetProcessesByName_RemoteMachineNameWindows_ReturnsExpected(string machineName)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void GetProcessesByName_NoSuchProcess_ReturnsEmpty()
{
string processName = Guid.NewGuid().ToString("N");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void GetProcessesByName_NullMachineName_ThrowsArgumentNullException()
{
Process currentProcess = Process.GetCurrentProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void GetProcessesByName_EmptyMachineName_ThrowsArgumentException()
{
Process currentProcess = Process.GetCurrentProcess();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Behavior differs on Windows and Unix
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestProcessOnRemoteMachineWindows()
{
Process currentProccess = Process.GetCurrentProcess();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void StartInfo_GetFileName_ReturnsExpected()
{
Process process = CreateProcessLong();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void StartInfo_SetOnRunningProcess_ThrowsInvalidOperationException()
{
Process process = CreateProcessLong();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
[PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX
public void TestHandleCount()
{
[OuterLoop]
[Fact]
[PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void HandleCountChanges()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // MainWindowHandle is not supported on Unix.
public void MainWindowHandle_NoWindow_ReturnsEmptyHandle()
{
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "HWND not available")]
public void MainWindowHandle_GetNotStarted_ThrowsInvalidOperationException()
{
var process = new Process();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void MainWindowTitle_NoWindow_ReturnsEmpty()
{
CreateDefaultProcess();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // MainWindowTitle is a no-op and always returns string.Empty on Unix.
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "HWND not available")]
public void MainWindowTitle_GetNotStarted_ThrowsInvalidOperationException()
{
var process = new Process();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void CloseMainWindow_NoWindow_ReturnsFalse()
{
CreateDefaultProcess();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
- public void CloseMainWindow_NotStarted_ThrowsInvalidOperationException_WindowsNonUap()
+ public void CloseMainWindow_NotStarted_ThrowsInvalidOperationException_Windows()
{
var process = new Process();
Assert.Throws<InvalidOperationException>(() => process.CloseMainWindow());
}
[Fact]
- // CloseMainWindow is a no-op and always returns false on Unix or Uap.
- public void CloseMainWindow_NotStarted_ReturnsFalse_UapOrNonWindows()
+ // CloseMainWindow is a no-op and always returns false on Unix or UWP.
+ public void CloseMainWindow_NotStarted_ReturnsFalse_UWPNonWindows()
{
- if (PlatformDetection.IsWindows && !PlatformDetection.IsUap)
+ if (PlatformDetection.IsWindows && !PlatformDetection.IsInAppContainer)
return;
var process = new Process();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Responding always returns true on Unix.
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "HWND not available")]
public void Responding_GetNotStarted_ThrowsInvalidOperationException()
{
var process = new Process();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestNonpagedSystemMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPagedMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPagedSystemMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPeakPagedMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPeakVirtualMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPeakWorkingSet()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestPrivateMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestVirtualMemorySize()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestWorkingSet()
{
CreateDefaultProcess();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void Process_StartWithInvalidUserNamePassword()
{
SecureString password = AsSecureString("Value");
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void Process_StartTest()
{
string name = "xcopy.exe";
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void Process_StartWithArgumentsTest()
{
string currentProcessName = GetCurrentProcessName();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void TestLongProcessIsWorking()
{
// Sanity check for CreateProcessLong
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void StartProcessWithArgumentList()
{
ProcessStartInfo psi = new ProcessStartInfo(GetCurrentProcessName());
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void StartProcessWithSameArgumentList()
{
ProcessStartInfo psi = new ProcessStartInfo(GetCurrentProcessName());
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void BothArgumentCtorAndArgumentListSet()
{
ProcessStartInfo psi = new ProcessStartInfo(GetCurrentProcessName(), "arg3");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void BothArgumentSetAndArgumentListSet()
{
ProcessStartInfo psi = new ProcessStartInfo(GetCurrentProcessName());
}
[Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)]
- public void Kill_EntireProcessTree_ThrowsPlatformNotSupportedException()
- {
- var process = new Process();
- Assert.Throws<PlatformNotSupportedException>(() => process.Kill(entireProcessTree: true));
- Assert.Throws<PlatformNotSupportedException>(() => process.Kill(entireProcessTree: false));
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void Kill_EntireProcessTree_True_ProcessNotStarted_ThrowsInvalidOperationException()
{
var process = new Process();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Currently, remote processes are only supported on Windows. If that changes, adjust accordingly.
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void Kill_EntireProcessTree_True_CalledByNonLocalProcess_ThrowsInvalidOperationException()
{
Process currentProcess = Process.GetCurrentProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void Kill_EntireProcessTree_True_CalledOnCallingProcess_ThrowsInvalidOperationException()
{
var process = Process.GetCurrentProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void Kill_EntireProcessTree_True_CalledOnTreeContainingCallingProcess_ThrowsInvalidOperationException()
{
Process containingProcess = CreateProcess(() =>
[Theory]
[InlineData(true)]
[InlineData(false)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void Kill_ExitedChildProcess_DoesNotThrow(bool killTree)
{
Process process = CreateProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public async Task Kill_EntireProcessTree_False_OnlyRootProcessTerminated()
{
IReadOnlyList<Process> tree = CreateProcessTree();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public async Task Kill_EntireProcessTree_True_EntireTreeTerminated()
{
IReadOnlyList<Process> tree = CreateProcessTree();
{
[PlatformSpecific(TestPlatforms.Windows)] // P/Invokes
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void PriorityLevel_Roundtrips()
{
using (Barrier b = new Barrier(2))
public partial class ProcessThreadTests : ProcessTestBase
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestCommonPriorityAndTimeProperties()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestThreadCount()
{
int numOfThreads = 10;
[Fact]
[PlatformSpecific(TestPlatforms.Linux|TestPlatforms.Windows)] // OSX and FreeBSD throw PNSE from StartTime
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public async Task TestStartTimeProperty()
{
TimeSpan allowedWindow = TimeSpan.FromSeconds(2);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestStartAddressProperty()
{
using (Process p = Process.GetCurrentProcess())
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void TestThreadStateProperty()
{
CreateDefaultProcess();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Retrieving information about local processes is not supported on uap")]
public void Threads_GetMultipleTimes_ReturnsSameInstance()
{
CreateDefaultProcess();
public class ProcessWaitingTests : ProcessTestBase
{
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void MultipleProcesses_StartAllKillAllWaitAll()
{
const int Iters = 10;
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void MultipleProcesses_SerialStartKillWait()
{
const int Iters = 10;
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void MultipleProcesses_ParallelStartKillWait()
{
const int Tasks = 4, ItersPerTask = 10;
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void SingleProcess_TryWaitMultipleTimesBeforeCompleting()
{
Process p = CreateProcessLong();
[Theory]
[InlineData(false)]
[InlineData(true)]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public async Task SingleProcess_WaitAfterExited(bool addHandlerBeforeStart)
{
Process p = CreateProcessLong();
}
[Fact]
- [ActiveIssue(31908, TargetFrameworkMonikers.Uap)]
public void SingleProcess_CopiesShareExitInformation()
{
Process p = CreateProcessLong();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting handle of child process running on UAP is not possible")]
public void WaitForPeerProcess()
{
Process child1 = CreateProcessLong();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not applicable on uap - RemoteInvoke does not give back process handle")]
[ActiveIssue(15844, TestPlatforms.AnyUnix)]
public void WaitChain()
{
public const string TestConsoleApp = "System.Diagnostics.Process.Tests";
public static event EventHandler ClosedEvent;
-
- public static string DummyUapCmd()
- {
- return $@"exit {SuccessExitCode}";
- }
-
public static int Dummy()
{
return SuccessExitCode;
return SuccessExitCode;
}
- public static string ExitWithCodeUapCmd(string exitCodeStr)
- {
- return $@"exit {exitCodeStr}";
- }
-
public static int ExitWithCode(string exitCodeStr)
{
return int.Parse(exitCodeStr);
}
- public static string ErrorProcessBodyUapCmd()
- {
- return $"(echo {TestConsoleApp} started error stream) 1>&2 & " +
- $"(echo {TestConsoleApp} closed error stream) 1>&2 & " +
- $"exit {SuccessExitCode}";
- }
-
public static int ErrorProcessBody()
{
Console.Error.WriteLine(TestConsoleApp + " started error stream");
return SuccessExitCode;
}
- public static string StreamBodyUapCmd()
- {
- return $"(echo {TestConsoleApp} started) & " +
- $"(echo {TestConsoleApp} closed) & " +
- $"exit {SuccessExitCode}";
- }
-
public static int StreamBody()
{
Console.WriteLine(TestConsoleApp + " started");
return SuccessExitCode;
}
- public static string ReadLineUapCmd()
- {
- return "findstr -src:^..*$";
- }
-
public static int ReadLine()
{
Console.ReadLine();
return SuccessExitCode;
}
- public static string WriteLineReadLineUapCmd()
- {
- return $"((echo Signal) && findstr -src:^Success$ && exit {SuccessExitCode}) || exit {SuccessExitCode + 1}";
- }
-
public static int WriteLineReadLine()
{
Console.WriteLine("Signal");
return line == "Success" ? SuccessExitCode : SuccessExitCode + 1;
}
- public static string ReadLineWriteIfNullUapCmd()
- {
- return $"(((findstr -src:^..*$) && (echo NOT_NULL)) || (echo NULL)) & exit {SuccessExitCode}";
- }
-
public static int ReadLineWriteIfNull()
{
string line = Console.ReadLine();
return SuccessExitCode;
}
- public static string WriteSlowlyByByteUapCmd()
- {
- throw new Exception("No simple way of doing this using cmd.exe");
- }
-
public static int WriteSlowlyByByte()
{
var stdout = Console.OpenStandardOutput();
return SuccessExitCode;
}
- public static string Write144LinesUapCmd()
- {
- return $"for /L %i in (1,1,144) do @echo %i";
- }
-
public static int Write144Lines()
{
for (int i = 0; i < 144; i++)
return SuccessExitCode;
}
- public static string WriteLinesAfterCloseUapCmd()
- {
- ClosedEvent += (s, e) =>
- {
- // Finish the pause
- Console.WriteLine();
- };
- return "(pause > nul) & (echo This is a line to output) & (echo This is a line to error 1>&2)";
- }
-
- public static string ConcatThreeArgumentsUapCmd(string one, string two, string three)
- {
- return $"echo {string.Join(",", one, two, three)} & exit {SuccessExitCode}";
- }
-
public static int ConcatThreeArguments(string one, string two, string three)
{
Console.Write(string.Join(",", one, two, three));
return SuccessExitCode;
}
- public static string SelfTerminateUapCmd()
- {
- return $"exit 0";
- }
-
public static int SelfTerminate()
{
Process.GetCurrentProcess().Kill();
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);TargetsWindows</DefineConstants>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\CoreLib\System\PasteArguments.cs">
<Compile Include="ProcessStartInfoTests.cs" />
<Compile Include="ProcessStreamReadTests.cs" />
<Compile Include="ProcessTestBase.cs" />
- <Compile Condition="'$(TargetsUap)' != 'true'" Include="ProcessTestBase.NonUap.cs" />
- <Compile Condition="'$(TargetsUap)' == 'true'" Include="ProcessTestBase.Uap.cs" />
+ <Compile Include="ProcessTestBase.NonUap.cs" />
<Compile Include="ProcessTests.cs" />
<Compile Include="ProcessThreadTests.cs" />
<Compile Include="ProcessWaitingTests.cs" />
<Compile Include="RemotelyInvokable.cs" />
<Compile Include="XunitAssemblyAttributes.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
<Compile Include="ProcessStartInfoTests.netcoreapp.cs" />
<Compile Include="ProcessStreamReadTests.netcoreapp.cs" />
<Compile Include="ProcessTests.netcoreapp.cs" />
</ItemGroup>
- <!-- WINDOWS: Shared CoreCLR -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="ProcessTests.Windows.cs" />
<Compile Include="ProcessThreadTests.Windows.cs" />
<Link>Common\CoreLib\System\PasteArguments.Windows.cs</Link>
</Compile>
</ItemGroup>
- <!-- UNIX -->
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' ">
<Compile Include="ProcessTests.Unix.cs" />
<Compile Include="ProcessThreadTests.Unix.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Nullable>enable</Nullable>
<!-- Disable 1685 (aka multiple type definitions) warning so it doesn't turn into an error -->
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Diagnostics\StackFrameExtensions.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.TextWriterTraceListener.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<RootNamespace>System.Diagnostics.TextWriterTraceListener</RootNamespace>
<AssemblyName>System.Diagnostics.TextWriterTraceListener</AssemblyName>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FxCopBaseline.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestTraceFilter.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<DefineConstants>$(DefineConstants);SYSTEM_DIAGNOSTICS_TOOLS</DefineConstants>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\CodeDom\Compiler\GeneratedCodeAttribute.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<RootNamespace>System</RootNamespace>
<AssemblyName>System.Diagnostics.Tools.Tests</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.TraceSource.cs" />
netcoreapp-Linux;
netcoreapp-OSX;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<RootNamespace>System.Diagnostics.TraceSource</RootNamespace>
<AssemblyName>System.Diagnostics.TraceSource</AssemblyName>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
- <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FxCopBaseline.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
+++ /dev/null
-namespace System.Diagnostics.Tracing
-{
- public partial class EventCounter : System.IDisposable
- {
- public EventCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) { }
- public void Dispose() { }
- public void WriteMetric(float value) { }
- }
-}
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- CS0067: unused event, reference assembly does not care -->
<NoWarn>$(NoWarn);0067</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Diagnostics.Tracing.cs" />
- <Compile Include="System.Diagnostics.Tracing.Counters.cs" Condition="'$(TargetGroup)' != 'uap'" />
- <Compile Include="System.Diagnostics.Tracing.CountersUap.cs" Condition="'$(TargetGroup)' == 'uap'" />
+ <Compile Include="System.Diagnostics.Tracing.Counters.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Diagnostics.Tracing</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);FLAVOR_WHIDBEY;PAPI_AD;PAPI_REGSAM;USE_CTX_CACHE</DefineConstants>
<NoWarn>$(NoWarn);8073;CA1810</NoWarn>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.DirectoryServicesAccountManagement_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true'">SR.DirectoryServicesAccountManagement_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' != 'true'">
<Compile Include="System\DirectoryServices\AccountManagement\ExternDll.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\interopt.cs" />
<Compile Include="System\DirectoryServices\AccountManagement\PrincipalSearcher.cs" />
<Reference Include="System.Security.AccessControl" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' != 'true'">
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Xml.ReaderWriter" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp2.0'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<Reference Include="System.ComponentModel.TypeConverter" />
</ItemGroup>
</Project>
<AssemblyName>System.DirectoryServices.Protocols</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);0649;CA1810</NoWarn>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.DirectoryServicesProtocols_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
<AssemblyName>System.DirectoryServices</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);0649</NoWarn>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.DirectoryServices_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
+ <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true'">SR.DirectoryServices_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' != 'true'">
<Compile Include="System\DirectoryServices\ExternDll.cs" />
<Compile Include="System\DirectoryServices\ActiveDirectorySecurity.cs" />
<Compile Include="System\DirectoryServices\AdsVLV.cs" />
<Reference Include="System.Security.Permissions" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' != 'true'">
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections.Specialized" />
<Reference Include="System.ComponentModel" />
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")]
public void FindByTransportType_ForestNoDomainAssociatedWithoutName_ThrowsActiveDirectoryOperationException()
{
var context = new DirectoryContext(DirectoryContextType.Forest);
AssertExtensions.Throws<ArgumentException>("context", () => ActiveDirectoryInterSiteTransport.FindByTransportType(context, ActiveDirectoryTransportType.Rpc));
}
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
- public void FindByTransportType_ForestNoDomainAssociatedWithName_ThrowsActiveDirectoryOperationException_NoUap()
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotDomainJoinedMachine))]
+ public void FindByTransportType_ForestNoDomainAssociatedWithName_ThrowsActiveDirectoryOperationException_NoDomain()
{
- // Domain joined machines will not throw on the ActiveDirectoryInterSiteTransport.FindByTransportType call.
- if (!PlatformDetection.IsDomainJoinedMachine)
- {
- var context = new DirectoryContext(DirectoryContextType.Forest, "\0");
- AssertExtensions.Throws<ArgumentException>("context", () => ActiveDirectoryInterSiteTransport.FindByTransportType(context, ActiveDirectoryTransportType.Rpc));
- }
+ var context = new DirectoryContext(DirectoryContextType.Forest, "\0");
+ AssertExtensions.Throws<ArgumentException>("context", () => ActiveDirectoryInterSiteTransport.FindByTransportType(context, ActiveDirectoryTransportType.Rpc));
}
[Fact]
[InlineData(DirectoryContextType.ApplicationPartition)]
[InlineData(DirectoryContextType.DirectoryServer)]
[InlineData(DirectoryContextType.Domain)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Access to common path is denied inside App")]
public void FindByTransportType_InvalidContextTypeWithName(DirectoryContextType type)
{
var context = new DirectoryContext(type, "Name");
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")]
public void FindByTransportType_ConfigurationSetTypeWithName_Throws()
{
var context = new DirectoryContext(DirectoryContextType.ConfigurationSet, "Name");
[OuterLoop("Takes too long on domain joined machines")]
[InlineData("\0")]
[InlineData("[")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Access to path is denied when in App container")]
public void GetDomainController_InvalidName(string name)
{
var context = new DirectoryContext(DirectoryContextType.DirectoryServer, name);
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsIoTCore))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Access to path is denied when in App container")]
public void GetDomainController_InvalidIPV6()
{
var context = new DirectoryContext(DirectoryContextType.DirectoryServer, "[::1]:port");
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void FindAll_NoSuchName_ReturnsEmpty()
{
// Domain joined machines can have entries in the DomainController.
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Getting information about domain is denied inside App")]
public void FindAll_NullName_ThrowsActiveDirectoryOperationException()
{
var context = new DirectoryContext(DirectoryContextType.Domain);
[Fact]
[OuterLoop]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetForest_NullNameAndNotRootedDomain_ThrowsActiveDirectoryOperationException()
{
var context = new DirectoryContext(DirectoryContextType.Forest);
[OuterLoop("Takes too long on domain joined machines")]
[InlineData(DirectoryContextType.Forest, "\0")]
[InlineData(DirectoryContextType.DirectoryServer, "server:port")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
- public void GetForest_NonNullNameAndNotRootedDomain_NonUap(DirectoryContextType type, string name)
+ public void GetForest_NonNullNameAndNotRootedDomain(DirectoryContextType type, string name)
{
var context = new DirectoryContext(type, name);
if (!PlatformDetection.IsDomainJoinedMachine)
namespace System.DirectoryServices.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "DirectoryObjectSecurity is not supported.")]
public class ActiveDirectorySecurityTests
{
[Fact]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "PNSE in UAP")]
public void ObjectSecurity_Set_GetReturnsExpected()
{
var security = new ActiveDirectorySecurity();
<PropertyGroup>
<PackageConfigurations>
netcoreapp3.0;
- uap;
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Drawing.Common.cs" />
<PackageConfigurations>
netcoreapp3.0-Windows_NT;
netcoreapp3.0-Unix;
- uap;
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations);
<WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
<DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS;FEATURE_SYSTEM_EVENTS</DefineConstants>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsUap)' == 'true'">SR.PlatformNotSupported_Drawing</GeneratePlatformNotSupportedAssemblyMessage>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Unix-Debug;netcoreapp3.0-Unix-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Unix-Debug;netcoreapp3.0-Unix-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release</Configurations>
</PropertyGroup>
- <!-- Shared source code, all configurations -->
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
+ <ItemGroup>
<Compile Include="System\Drawing\Bitmap.cs" />
<Compile Include="System\Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
<Compile Include="System\Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
</Compile>
</ItemGroup>
<!-- Unix specific -->
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="System\Drawing\Graphics.Unix.cs" />
<Compile Include="System\Drawing\Icon.Unix.cs" />
<Compile Include="System\Drawing\SystemFonts.Unix.cs" />
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<OutputType>Library</OutputType>
<RootNamespace>System.Drawing</RootNamespace>
<AssemblyName>System.Drawing.Primitives</AssemblyName>
- <DefineConstants Condition="'$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS</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>
+ <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS</DefineConstants>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<nullable>enable</nullable>
</PropertyGroup>
<ItemGroup>
<Link>System\Drawing\SystemColors.cs</Link>
</Compile>
</ItemGroup>
- <!-- System color features require Win32 PInvoke's which are disallowed in UAP. -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
</Compile>
{
public partial class ColorTests
{
- public static bool SupportsReadingUpdatedSystemColors => PlatformDetection.IsWindows && !PlatformDetection.IsUap && PlatformDetection.IsNotWindowsNanoServer;
+ public static bool SupportsReadingUpdatedSystemColors => PlatformDetection.IsWindows && !PlatformDetection.IsInAppContainer && PlatformDetection.IsNotWindowsNanoServer;
public static readonly IEnumerable<object[]> NamedArgbValues =
new[]
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ColorTranslatorTests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Dynamic.Runtime.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AssemblyName>System.Dynamic.Runtime</AssemblyName>
<RootNamespace>System.Dynamic.Runtime</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Linq.Expressions" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>67,168,219,414,162,184,458,464,78,169,114,693,108,1981,649,109,1066,3021,3026,3002,3014,3022,660,661,429;xUnit1013</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<AssembliesBeingTested Include="Microsoft.CSharp" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Globalization.Calendars.Forwards.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Globalization.Calendars</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Globalization.Extensions.Forwards.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AssemblyName>System.Globalization.Extensions</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Globalization.Forwards.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Globalization</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
public void TestCurrentCulturesAsync()
{
- RemoteExecutorForUap.Invoke(() =>
+ var newCurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
+ var newCurrentUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
+ using (new ThreadCultureChange(newCurrentCulture, newCurrentUICulture))
{
- var newCurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
- var newCurrentUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
- using (new ThreadCultureChange(newCurrentCulture, newCurrentUICulture))
+ Task t = Task.Run(() =>
{
- Task t = Task.Run(() =>
- {
- Assert.Equal(CultureInfo.CurrentCulture, newCurrentCulture);
- Assert.Equal(CultureInfo.CurrentUICulture, newCurrentUICulture);
- });
+ Assert.Equal(CultureInfo.CurrentCulture, newCurrentCulture);
+ Assert.Equal(CultureInfo.CurrentUICulture, newCurrentUICulture);
+ });
- ((IAsyncResult)t).AsyncWaitHandle.WaitOne();
- t.Wait();
- }
- }).Dispose();
+ ((IAsyncResult)t).AsyncWaitHandle.WaitOne();
+ t.Wait();
+ }
}
[Fact]
public void TestCurrentCulturesWithAwait()
{
- RemoteExecutorForUap.Invoke(() =>
+ var newCurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
+ var newCurrentUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
+ using (new ThreadCultureChange(newCurrentCulture, newCurrentUICulture))
{
- var newCurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
- var newCurrentUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "en-US" : "ja-JP");
- using (new ThreadCultureChange(newCurrentCulture, newCurrentUICulture))
- {
- MainAsync().Wait();
+ MainAsync().Wait();
- async Task MainAsync()
- {
- await Task.Delay(1).ConfigureAwait(false);
+ async Task MainAsync()
+ {
+ await Task.Delay(1).ConfigureAwait(false);
- Assert.Equal(CultureInfo.CurrentCulture, newCurrentCulture);
- Assert.Equal(CultureInfo.CurrentUICulture, newCurrentUICulture);
- }
+ Assert.Equal(CultureInfo.CurrentCulture, newCurrentCulture);
+ Assert.Equal(CultureInfo.CurrentUICulture, newCurrentUICulture);
}
- }).Dispose();
+ }
}
}
}
[Fact]
public void CurrentCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ var newCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
+ using (new ThreadCultureChange(newCulture))
{
- var newCulture = new CultureInfo(CultureInfo.CurrentCulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
- using (new ThreadCultureChange(newCulture))
- {
- Assert.Equal(CultureInfo.CurrentCulture, newCulture);
- }
+ Assert.Equal(CultureInfo.CurrentCulture, newCulture);
+ }
- newCulture = new CultureInfo("de-DE_phoneb");
- using (new ThreadCultureChange(newCulture))
- {
- Assert.Equal(CultureInfo.CurrentCulture, newCulture);
- Assert.Equal("de-DE_phoneb", newCulture.CompareInfo.Name);
- }
- }).Dispose();
+ newCulture = new CultureInfo("de-DE_phoneb");
+ using (new ThreadCultureChange(newCulture))
+ {
+ Assert.Equal(CultureInfo.CurrentCulture, newCulture);
+ Assert.Equal("de-DE_phoneb", newCulture.CompareInfo.Name);
+ }
}
[Fact]
[Fact]
public void CurrentUICulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ var newUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
+ using (new ThreadCultureChange(null, newUICulture))
{
- var newUICulture = new CultureInfo(CultureInfo.CurrentUICulture.Name.Equals("ja-JP", StringComparison.OrdinalIgnoreCase) ? "ar-SA" : "ja-JP");
- using (new ThreadCultureChange(null, newUICulture))
- {
- Assert.Equal(CultureInfo.CurrentUICulture, newUICulture);
- }
+ Assert.Equal(CultureInfo.CurrentUICulture, newUICulture);
+ }
- newUICulture = new CultureInfo("de-DE_phoneb");
- using (new ThreadCultureChange(null, newUICulture))
- {
- Assert.Equal(CultureInfo.CurrentUICulture, newUICulture);
- Assert.Equal("de-DE_phoneb", newUICulture.CompareInfo.Name);
- }
- }).Dispose();
+ newUICulture = new CultureInfo("de-DE_phoneb");
+ using (new ThreadCultureChange(null, newUICulture))
+ {
+ Assert.Equal(CultureInfo.CurrentUICulture, newUICulture);
+ Assert.Equal("de-DE_phoneb", newUICulture.CompareInfo.Name);
+ }
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Thread cultures is not honored in UWP.")]
public void DefaultThreadCurrentCulture()
{
RemoteExecutor.Invoke(() =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Thread cultures is not honored in UWP.")]
public void DefaultThreadCurrentUICulture()
{
RemoteExecutor.Invoke(() =>
[Fact]
public void TestSettingThreadCultures()
{
- RemoteExecutorForUap.Invoke(() =>
+ var culture = new CultureInfo("ja-JP");
+ using (new ThreadCultureChange(culture))
{
- var culture = new CultureInfo("ja-JP");
- using (new ThreadCultureChange(culture))
- {
- var dt = new DateTime(2014, 3, 14, 3, 14, 0);
- Assert.Equal(dt.ToString(), dt.ToString(culture));
- Assert.Equal(dt.ToString(), dt.ToString(culture.DateTimeFormat));
- }
- }).Dispose();
+ var dt = new DateTime(2014, 3, 14, 3, 14, 0);
+ Assert.Equal(dt.ToString(), dt.ToString(culture));
+ Assert.Equal(dt.ToString(), dt.ToString(culture.DateTimeFormat));
+ }
}
[Fact]
public static string[] FrFRDayNames()
{
-#if !uap
if (PlatformDetection.IsOSX && PlatformDetection.OSXVersion < new Version(10, 12))
{
return new string[] { "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi" };
}
-#endif
return new string[] { "dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi" };
}
public static string[] FrFRAbbreviatedDayNames()
{
-#if !uap
if (PlatformDetection.IsOSX && PlatformDetection.OSXVersion < new Version(10, 12))
{
return new string[] { "Dim.", "Lun.", "Mar.", "Mer.", "Jeu.", "Ven.", "Sam." };
}
-#endif
return new string[] { "dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam." };
}
yield return new object[] { CultureInfo.InvariantCulture };
}
- [ActiveIssue(33904, TargetFrameworkMonikers.Uap)]
[Theory]
[MemberData(nameof(CurrentInfo_CustomCulture_TestData))]
public void CurrentInfo_CustomCulture(CultureInfo newCurrentCulture)
{
- RemoteExecutorForUap.Invoke((cultureName) =>
+ using (new ThreadCultureChange(newCurrentCulture))
{
- var newCulture = CultureInfo.GetCultureInfo(cultureName);
- using (new ThreadCultureChange(newCulture))
- {
- Assert.Same(newCulture.NumberFormat, NumberFormatInfo.CurrentInfo);
- }
- }, newCurrentCulture.Name).Dispose();
+ Assert.Same(newCurrentCulture.NumberFormat, NumberFormatInfo.CurrentInfo);
+ }
}
[Fact]
public void CurrentInfo_Subclass_OverridesGetFormat()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(new CultureInfoSubclassOverridesGetFormat("en-US")))
{
- using (new ThreadCultureChange(new CultureInfoSubclassOverridesGetFormat("en-US")))
- {
- Assert.Same(CultureInfoSubclassOverridesGetFormat.CustomFormat, NumberFormatInfo.CurrentInfo);
- }
- }).Dispose();
+ Assert.Same(CultureInfoSubclassOverridesGetFormat.CustomFormat, NumberFormatInfo.CurrentInfo);
+ }
}
[Fact]
public void CurrentInfo_Subclass_OverridesNumberFormat()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(new CultureInfoSubclassOverridesNumberFormat("en-US")))
{
- using (new ThreadCultureChange(new CultureInfoSubclassOverridesNumberFormat("en-US")))
- {
- Assert.Same(CultureInfoSubclassOverridesNumberFormat.CustomFormat, NumberFormatInfo.CurrentInfo);
- }
- }).Dispose();
+ Assert.Same(CultureInfoSubclassOverridesNumberFormat.CustomFormat, NumberFormatInfo.CurrentInfo);
+ }
}
private class CultureInfoSubclassOverridesGetFormat : CultureInfo
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CompareInfo\CompareInfoTests.cs" />
[Fact]
public void CurrentRegion()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- RegionInfo ri = new RegionInfo(new RegionInfo(CultureInfo.CurrentCulture.Name).TwoLetterISORegionName);
- Assert.True(RegionInfo.CurrentRegion.Equals(ri) || RegionInfo.CurrentRegion.Equals(new RegionInfo(CultureInfo.CurrentCulture.Name)));
- Assert.Same(RegionInfo.CurrentRegion, RegionInfo.CurrentRegion);
- }
- }).Dispose();
+ RegionInfo ri = new RegionInfo(new RegionInfo(CultureInfo.CurrentCulture.Name).TwoLetterISORegionName);
+ Assert.True(RegionInfo.CurrentRegion.Equals(ri) || RegionInfo.CurrentRegion.Equals(new RegionInfo(CultureInfo.CurrentCulture.Name)));
+ Assert.Same(RegionInfo.CurrentRegion, RegionInfo.CurrentRegion);
+ }
}
[Theory]
[OuterLoop("May fail on machines with multiple language packs installed")] // https://github.com/dotnet/corefx/issues/39177
public void DisplayName(string name, string expected)
{
- RemoteExecutorForUap.Invoke((string _name, string _expected) =>
+ using (new ThreadCultureChange(name))
{
- using (new ThreadCultureChange(_name))
- {
- Assert.Equal(_expected, new RegionInfo(_name).DisplayName);
- }
- }, name, expected).Dispose();
+ Assert.Equal(expected, new RegionInfo(name).DisplayName);
+ }
}
[Theory]
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">$(DefineConstants);STREAM_MEMORY_OVERLOADS_AVAILABLE</DefineConstants>
+ <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true'">$(DefineConstants);STREAM_MEMORY_OVERLOADS_AVAILABLE</DefineConstants>
<Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.Compression.ZipFile.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AssemblyName>System.IO.Compression.ZipFile</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ZipFile.Create.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AssemblyName>System.IO.Compression</AssemblyName>
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<!-- This constant is only here for usage in $(CommonTestPath), since not all projects using these tests have been updated yet-->
<DefineConstants>$(DefineConstants);STREAM_MEMORY_OVERLOADS_AVAILABLE</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CompressionStreamUnitTests.Deflate.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
[ActiveIssue(24903, TargetFrameworkMonikers.NetFramework)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "System.DirectoryServices is not supported on this platform.")]
public void GetAccessRules_InvalidTargetType()
{
var activeDirectorySecurity = new ActiveDirectorySecurity();
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DirectoryObjectSecurityTests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.FileSystem.DriveInfo.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.IO.FileSystem.DriveInfo</RootNamespace>
<AssemblyName>System.IO.FileSystem.DriveInfo</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\IO\DriveInfo.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Accessing drive format is not permitted inside an AppContainer.")]
public void TestDriveFormat()
{
DriveInfo validDrive = DriveInfo.GetDrives().Where(d => d.DriveType == DriveType.Fixed).First();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "GetDiskFreeSpaceEx blocked in AC")]
public void TestValidDiskSpaceProperties()
{
bool win32Result;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DriveInfo.Unix.Tests.cs" Condition="'$(TargetsUnix)' == 'true'" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.FileSystem.Primitives.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.IO.FileSystem.Primitives</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.FileSystem.Watcher.cs" />
netcoreapp-OSX;
netcoreapp-FreeBSD;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\HResults.cs" />
</Compile>
</ItemGroup>
<!-- Windows : Win32 only -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFile.cs">
<Link>Common\Interop\Windows\Interop.CreateFile.cs</Link>
</Compile>
</ItemGroup>
- <!-- Windows : UAP - Win32 + WinRT -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' == 'uap'">
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFile2.cs">
- <Link>Common\Interop\Windows\Interop.CreateFile2.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs">
- <Link>Common\Interop\Windows\Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs</Link>
- </Compile>
- </ItemGroup>
<ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
netcoreapp-Linux;
netcoreapp-OSX;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Theory]
[MemberData(nameof(FilterTypes))]
[PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to set security info
- [ActiveIssue(21109, TargetFrameworkMonikers.Uap)]
public void FileSystemWatcher_Directory_NotifyFilter_Security(NotifyFilters filter)
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FileSystemWatcher.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.FileSystem.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetsUnix)' == 'true'">
<NoWarn>$(NoWarn);414</NoWarn>
<Link>Common\Interop\Windows\Interop.FILE_INFO_BY_HANDLE_CLASS.cs</Link>
</Compile>
</ItemGroup>
- <!-- Windows : Win32 only -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(UWPCompatible)' != 'true'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\IO\FileSystem.Win32.cs" />
<Compile Include="System\IO\Enumeration\FileSystemEnumerator.Win32.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFile.cs">
<Link>Common\Interop\Windows\Interop.RtlNtStatusToDosError.cs</Link>
</Compile>
</ItemGroup>
- <!-- Windows : UAP - Win32 + WinRT -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(UWPCompatible)' == 'true'">
- <Compile Include="System\IO\FileSystem.WinRT.cs" />
- <Compile Include="System\IO\Enumeration\FileSystemEnumerator.WinRT.cs" />
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFile2.cs">
- <Link>Common\Interop\Windows\Interop.CreateFile2.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs">
- <Link>Common\Interop\Windows\Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.GetFileInformationByHandleEx.cs">
- <Link>Common\Interop\Windows\Interop.GetFileInformationByHandleEx.cs</Link>
- </Compile>
- </ItemGroup>
- <!-- Unix -->
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="System\IO\FileStatus.Unix.cs" />
<Compile Include="System\IO\Enumeration\FileSystemEntry.Unix.cs" />
+++ /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.CompilerServices;
-using System.Runtime.InteropServices;
-
-namespace System.IO.Enumeration
-{
- public partial class FileSystemEnumerator<TResult>
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private unsafe bool GetData()
- {
- if (!Interop.Kernel32.GetFileInformationByHandleEx(
- _directoryHandle,
- Interop.Kernel32.FILE_INFO_BY_HANDLE_CLASS.FileFullDirectoryInfo,
- _buffer,
- (uint)_bufferLength))
- {
- int error = Marshal.GetLastWin32Error();
- switch (error)
- {
- case Interop.Errors.ERROR_NO_MORE_FILES:
- DirectoryFinished();
- return false;
- case Interop.Errors.ERROR_ACCESS_DENIED:
- if (_options.IgnoreInaccessible)
- {
- return false;
- }
- break;
- }
-
- if (!ContinueOnError(error))
- throw Win32Marshal.GetExceptionForWin32Error(error, _currentPath);
- }
-
- return true;
- }
-
- private IntPtr CreateRelativeDirectoryHandle(ReadOnlySpan<char> relativePath, string fullPath)
- {
- // We don't have access to any APIs that allow us to pass in a base handle in UAP,
- // just call our "normal" handle open.
- return CreateDirectoryHandle(fullPath, ignoreNotFound: true);
- }
- }
-}
+++ /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.
-
-namespace System.IO
-{
- internal static partial class FileSystem
- {
- public static void Encrypt(string path)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_FileEncryption);
- }
-
- public static void Decrypt(string path)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_FileEncryption);
- }
- }
-}
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[ConditionalTheory(nameof(UsingNewNormalization)),
MemberData(nameof(ValidPathComponentNames))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // trailing slash
public void ValidExtendedPathWithTrailingSlash(string component)
{
}
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds
public void DirectoryLongerThanMaxPath_Succeeds()
{
}
[ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)]
public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException()
{
}
[ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // long directory path with extended syntax succeeds
public void ExtendedDirectoryLongerThanLegacyMaxPath_Succeeds()
{
}
[ConditionalFact(nameof(AreAllLongPathsAvailable))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // long directory path succeeds
public void DirectoryLongerThanMaxDirectoryAsPath_Succeeds()
{
[ConditionalTheory(nameof(UsingNewNormalization)),
MemberData(nameof(SimpleWhiteSpace))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // extended syntax with whitespace
public void WindowsExtendedSyntaxWhiteSpace(string path)
{
[ConditionalTheory(nameof(UsingNewNormalization)),
MemberData(nameof(ReservedDeviceNames))]
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // device name prefixes
public void PathWithReservedDeviceNameAsExtendedPath(string path)
{
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // drive labels
- [ActiveIssue(20117, TargetFrameworkMonikers.Uap)]
public void CDriveCase()
{
DirectoryInfo dir = Create("c:\\");
public class EncryptDecrypt : FileSystemTest
{
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "File encryption is not supported on this platform.")]
public static void NullArg_ThrowsException()
{
AssertExtensions.Throws<ArgumentNullException>("path", () => File.Encrypt(null));
// On Windows Nano Server and Home Edition, file encryption with File.Encrypt(string path) throws an IOException
// because EFS (Encrypted File System), its underlying technology, is not available on these operating systems.
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsHomeEdition))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "File encryption is not supported on this platform.")]
[PlatformSpecific(TestPlatforms.Windows)]
public static void EncryptDecrypt_Read()
{
[Theory]
[InlineData(false, 10, 1024)]
[InlineData(true, 10, 1024)]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public async Task NamedPipeViaFileStream_AllDataCopied(bool useAsync, int writeSize, int numWrites)
{
long totalLength = writeSize * numWrites;
}
[PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to create async pipe handle
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Out of current directory operation.")]
[Fact]
public async Task NamedPipeViaFileStream_CancellationRequested_OperationCanceled()
{
[Fact]
public void NameReturnsUnknownForHandle()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite))
+ using (FileStream fsh = new FileStream(fs.SafeFileHandle, FileAccess.ReadWrite))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- using (FileStream fs = new FileStream(GetTestFilePath(), FileMode.Create, FileAccess.ReadWrite))
- using (FileStream fsh = new FileStream(fs.SafeFileHandle, FileAccess.ReadWrite))
- {
- Assert.Equal("[Unknown]", fsh.Name);
- }
- }).Dispose();
+ Assert.Equal("[Unknown]", fsh.Name);
+ }
}
}
}
}
[Fact]
- [ActiveIssue(31909, TargetFrameworkMonikers.Uap)]
public void InvalidAccess_Throws()
{
using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false))
}
[Fact]
- [ActiveIssue(31909, TargetFrameworkMonikers.Uap)]
public void InvalidAccess_DoesNotCloseHandle()
{
using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false))
[Theory,
InlineData(0),
InlineData(-1)]
- [ActiveIssue(31909, TargetFrameworkMonikers.Uap)]
public void InvalidBufferSize_Throws(int size)
{
using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false))
}
[Fact]
- [ActiveIssue(31909, TargetFrameworkMonikers.Uap)]
public void InvalidBufferSize_DoesNotCloseHandle()
{
using (var handle = new SafeFileHandle(new IntPtr(1), ownsHandle: false))
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Base\BaseGetSetAttributes.cs" />
<Compile Include="File\EncryptDecrypt.cs" />
<Compile Include="File\GetSetAttributesCommon.cs" />
<Compile Include="File\Replace.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
- <Compile Include="FileSystemTest.Unix.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
- <Compile Include="FileSystemTest.Windows.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="File\AppendAsync.cs" />
- <Compile Include="File\Move.netcoreapp.cs" />
+ <Compile Include="File\Move.netcoreapp.cs" />
<Compile Include="File\ReadWriteAllLinesAsync.cs" />
<Compile Include="File\ReadWriteAllBytesAsync.cs" />
<Compile Include="File\ReadWriteAllTextAsync.cs" />
- <Compile Include="FileInfo\MoveTo.netcoreapp.cs" />
+ <Compile Include="FileInfo\MoveTo.netcoreapp.cs" />
<Compile Include="FileStream\DisposeAsync.netcoreapp.cs" />
<Compile Include="FileStream\ReadWriteSpan.netcoreapp.cs" />
<Compile Include="Enumeration\ConstructionTests.netcoreapp.cs" />
<Compile Include="Enumeration\ExampleTests.netcoreapp.cs" />
<Compile Include="Enumeration\RemovedDirectoryTests.netcoreapp.cs" />
</ItemGroup>
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <Compile Include="FileSystemTest.Unix.cs" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
+ <Compile Include="FileSystemTest.Windows.cs" />
+ </ItemGroup>
<ItemGroup>
<!-- Rewritten -->
<Compile Include="DirectoryInfo\GetSetAttributes.cs" />
<Link>Common\System\IO\PathFeatures.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)' == 'true'">
- <Reference Include="mscorlib" />
- <Reference Include="Windows" />
- </ItemGroup>
</Project>
\ No newline at end of file
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.IsolatedStorage.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <AssemblyName>System.IO.IsolatedStorage</AssemblyName>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
- <!-- Default configurations to help VS understand the options -->
<ItemGroup>
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageException.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageFile.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorage.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageScope.cs" />
<Compile Include="System\IO\IsolatedStorage\Helper.cs" />
+ <Compile Include="System\IO\IsolatedStorage\Helper.Win32Unix.cs" />
<Compile Include="System\IO\IsolatedStorage\INormalizeForIsolatedStorage.cs" />
<Compile Include="$(CommonPath)\System\Security\IdentityHelper.cs">
<Link>Common\System\Security\IdentityHelper.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap'">
- <Compile Include="System\IO\IsolatedStorage\Helper.Win32Unix.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap' AND '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\IO\IsolatedStorage\Helper.Win32.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap' AND '$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="System\IO\IsolatedStorage\Helper.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Compile Include="System\IO\IsolatedStorage\Helper.WinRT.cs" />
- </ItemGroup>
<ItemGroup>
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Diagnostics.Tools" />
<Reference Include="System.Security.Cryptography.Primitives" />
<Reference Include="System.Threading" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Reference Include="System.IO.FileSystem.AccessControl" />
<Reference Include="System.Security.AccessControl" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Reference Include="mscorlib" />
- <Reference Include="Windows" />
- </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.Security;
-using Windows.ApplicationModel;
-using Windows.Storage;
-
-namespace System.IO.IsolatedStorage
-{
- internal static partial class Helper
- {
- internal static string GetDataDirectory(IsolatedStorageScope scope)
- {
- // This is the relevant special folder for the given scope plus "IsolatedStorage".
- // It is meant to replicate the behavior of the VM ComIsolatedStorage::GetRootDir().
-
- string dataDirectory = null;
-
- if (IsMachine(scope))
- {
- // Getting the shared local folder isn't possible if the policy for
- // "Allow a Windows app to share application data between users".
- dataDirectory = ApplicationData.Current.SharedLocalFolder?.Path;
-
- if (dataDirectory == null)
- {
- throw new IsolatedStorageException(SR.IsolatedStorage_Scope_Invalid);
- }
- }
- if (!IsRoaming(scope))
- {
- dataDirectory = ApplicationData.Current.LocalFolder.Path;
- }
- else
- {
- dataDirectory = ApplicationData.Current.RoamingFolder.Path;
- }
-
- dataDirectory = Path.Combine(dataDirectory, IsolatedStorageDirectoryName);
-
- return dataDirectory;
- }
-
- internal static void CreateDirectory(string path, IsolatedStorageScope scope)
- {
- // ACL'ing isn't an issue in WinRT, just create it
- Directory.CreateDirectory(path);
- }
-
- internal static void GetDefaultIdentityAndHash(out object identity, out string hash, char separator)
- {
- // WinRT creates an ApplicationSecurityInfo off of the AppDomain.CurrentDomain.ActivationContext.
- // Evidence is built as follows:
- //
- // StrongName <- ApplicationId.PublicKeyToken/Name/Version
- // Url <- ApplicationContext.Identity.CodeBase
- // Zone <- Zone.CreateFromUrl(Url)
- // Site <- Site.CreateFromUrl(Url) *if* not file://
-
- // TODO: https://github.com/dotnet/corefx/issues/11123
- // When we have Assembly.GetEntryAssembly() we can utilize it to get the AssemblyName and
- // Codebase to unify the logic. For now we'll use installed location from the package.
- Uri codeBase = new Uri(Package.Current.InstalledLocation.Path);
-
- hash = IdentityHelper.GetNormalizedUriHash(codeBase);
- hash = "Url" + separator + hash;
- identity = codeBase;
- }
-
- internal static string GetRandomDirectory(string rootDirectory, IsolatedStorageScope scope)
- {
- // We didn't create random directories for UAP/UWP in the past. As the root locations are
- // scoped beneath app isolated folders we don't need the extra layer of obfuscation.
- return rootDirectory;
- }
- }
-}
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
+ <ItemGroup>
<Compile Include="System\IO\IsolatedStorage\IdentityTests.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageBaseClassTests.cs" />
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageFileStreamTests.netcoreapp.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)' != 'true'">
+ <ItemGroup>
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32Unix.cs">
<Link>Internals\Helper.Win32Unix.cs</Link>
</Compile>
<Compile Include="System\IO\IsolatedStorage\HelperTests.Win32Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)' != 'true' AND '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32.cs">
<Link>Internals\Helper.Win32.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)' != 'true' AND '$(TargetsUnix)' == 'true'">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Unix.cs">
<Link>Internals\Helper.Unix.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)' == 'true'">
- <Compile Include="..\src\System\IO\IsolatedStorage\Helper.WinRT.cs">
- <Link>Internals\Helper.WinRT.cs</Link>
- </Compile>
- </ItemGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\TempDirectory.cs">
<Link>Common\System\IO\TempDirectory.cs</Link>
<Compile Include="System\IO\IsolatedStorage\TestHelper.cs" />
<Compile Include="System\IO\IsolatedStorage\RemoveTests.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUap)' == 'true'">
- <Reference Include="mscorlib" />
- <Reference Include="Windows" />
- </ItemGroup>
</Project>
\ No newline at end of file
public partial class HelperTests
{
[Fact]
- [ActiveIssue(18940, TargetFrameworkMonikers.Uap)]
public void GetDefaultIdentityAndHash()
{
object identity;
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.Roaming),
InlineData(IsolatedStorageScope.Machine)
]
- [ActiveIssue(18940, TargetFrameworkMonikers.Uap)]
public void GetDataDirectory(IsolatedStorageScope scope)
{
// Machine scope is behind a policy that isn't enabled by default
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.MemoryMappedFiles.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>System.IO.MemoryMappedFiles</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Compiled Source Files -->
<ItemGroup>
<Compile Include="System\IO\MemoryMappedFiles\MemoryMappedViewStream.cs" />
<Compile Include="System\IO\MemoryMappedFiles\MemoryMappedFileRights.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetGroup)' == 'uap'">
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFileMappingFromApp.cs">
- <Link>Common\Interop\Windows\Interop.CreateFileMappingFromApp.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.MapViewOfFileFromApp.cs">
- <Link>Common\Interop\Windows\Interop.MapViewOfFileFromApp.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.OpenFileMappingFromApp.cs">
- <Link>Common\Interop\Windows\Interop.OpenFileMappingFromApp.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.VirtualAllocFromApp.cs">
- <Link>Common\Interop\Windows\Interop.VirtualAllocFromApp.cs</Link>
- </Compile>
- <Compile Include="System\IO\MemoryMappedFiles\Interop.Windows.Uap.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\IO\MemoryMappedFiles\Interop.Windows.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFileMapping.cs">
<Link>Common\Interop\Windows\Interop.CreateFileMapping.cs</Link>
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.VirtualAlloc.cs">
<Link>Common\Interop\Windows\Interop.VirtualAlloc.cs</Link>
</Compile>
- </ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.GlobalMemoryStatusEx.cs">
<Link>Common\Interop\Windows\Interop.GlobalMemoryStatusEx.cs</Link>
</Compile>
+++ /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 Microsoft.Win32.SafeHandles;
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-
-internal partial class Interop
-{
- public static void CheckForAvailableVirtualMemory(ulong nativeSize)
- {
- // this cannot be implemented on UAP because we cannot get the total
- // available Virtual Memory.
- }
-
- public static SafeMemoryMappedFileHandle CreateFileMapping(
- SafeFileHandle hFile,
- ref Kernel32.SECURITY_ATTRIBUTES securityAttributes,
- int pageProtection,
- long maximumSize,
- string name)
- {
- return Interop.Kernel32.CreateFileMappingFromApp(hFile, ref securityAttributes, pageProtection, maximumSize, name);
- }
-
- public static SafeMemoryMappedFileHandle CreateFileMapping(
- IntPtr hFile,
- ref Kernel32.SECURITY_ATTRIBUTES securityAttributes,
- int pageProtection,
- long maximumSize,
- string name)
- {
- return Interop.Kernel32.CreateFileMappingFromApp(hFile, ref securityAttributes, pageProtection, maximumSize, name);
- }
-
- public static SafeMemoryMappedViewHandle MapViewOfFile(
- SafeMemoryMappedFileHandle hFileMappingObject,
- int desiredAccess,
- long fileOffset,
- UIntPtr numberOfBytesToMap)
- {
- return Interop.Kernel32.MapViewOfFileFromApp(hFileMappingObject, desiredAccess, fileOffset, numberOfBytesToMap);
- }
- public static SafeMemoryMappedFileHandle OpenFileMapping(
- int desiredAccess,
- bool inheritHandle,
- string name)
- {
- return Interop.mincore.OpenFileMappingFromApp(desiredAccess, inheritHandle, name);
- }
- public static IntPtr VirtualAlloc(
- SafeHandle baseAddress,
- UIntPtr size,
- int allocationType,
- int protection)
- {
- return Interop.mincore.VirtualAllocFromApp(baseAddress, size, allocationType, protection);
- }
-}
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
public void ValidAccessLevelCombinations(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess)
{
const int Capacity = 4096;
- AssertExtensions.ThrowsIf<IOException>(PlatformDetection.IsUap && mapAccess == MemoryMappedFileAccess.ReadWriteExecute && viewAccess == MemoryMappedFileAccess.ReadWriteExecute,
+ AssertExtensions.ThrowsIf<IOException>(PlatformDetection.IsInAppContainer && mapAccess == MemoryMappedFileAccess.ReadWriteExecute && viewAccess == MemoryMappedFileAccess.ReadWriteExecute,
() =>
{
try
[InlineData(MemoryMappedFileAccess.CopyOnWrite, MemoryMappedFileAccess.ReadWriteExecute)]
[InlineData(MemoryMappedFileAccess.ReadWrite, MemoryMappedFileAccess.ReadWriteExecute)]
[InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.ReadWriteExecute)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Windows API returns IO exception error code when viewAccess is ReadWriteExecute")]
public void InvalidAccessLevels_ReadWrite_NonUwp(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess)
{
const int Capacity = 4096;
}
}
- [Theory]
- [InlineData(MemoryMappedFileAccess.ReadExecute, MemoryMappedFileAccess.ReadWriteExecute)]
- [InlineData(MemoryMappedFileAccess.CopyOnWrite, MemoryMappedFileAccess.ReadWriteExecute)]
- [InlineData(MemoryMappedFileAccess.ReadWrite, MemoryMappedFileAccess.ReadWriteExecute)]
- [InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.ReadWriteExecute)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap, "Windows API returns IO exception error code when viewAccess is ReadWriteExecute")]
- public void InvalidAccessLevels_ReadWrite_Uwp(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess)
- {
- const int Capacity = 4096;
- using (MemoryMappedFile mmf = MemoryMappedFile.CreateNew(null, Capacity, mapAccess))
- {
- Assert.Throws<IOException>(() => mmf.CreateViewAccessor(0, Capacity, viewAccess));
- }
- }
-
/// <summary>
/// Test to verify the accessor's PointerOffset.
/// </summary>
public void ValidAccessLevelCombinations(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess)
{
const int Capacity = 4096;
- AssertExtensions.ThrowsIf<IOException>(PlatformDetection.IsUap && mapAccess == MemoryMappedFileAccess.ReadWriteExecute && viewAccess == MemoryMappedFileAccess.ReadWriteExecute,
+ AssertExtensions.ThrowsIf<IOException>(PlatformDetection.IsInAppContainer && mapAccess == MemoryMappedFileAccess.ReadWriteExecute && viewAccess == MemoryMappedFileAccess.ReadWriteExecute,
() =>
{
try
[InlineData(MemoryMappedFileAccess.ReadWrite, MemoryMappedFileAccess.ReadWriteExecute)]
[InlineData(MemoryMappedFileAccess.CopyOnWrite, MemoryMappedFileAccess.ReadWriteExecute)]
[InlineData(MemoryMappedFileAccess.ReadExecute, MemoryMappedFileAccess.ReadWriteExecute)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Windows API returns IO exception error code when viewAccess is ReadWriteExecute")]
public void InvalidAccessLevels_ReadWriteExecute_NonUwp(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess)
{
const int Capacity = 4096;
}
}
- [Theory]
- [InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.ReadWriteExecute)]
- [InlineData(MemoryMappedFileAccess.ReadWrite, MemoryMappedFileAccess.ReadWriteExecute)]
- [InlineData(MemoryMappedFileAccess.CopyOnWrite, MemoryMappedFileAccess.ReadWriteExecute)]
- [InlineData(MemoryMappedFileAccess.ReadExecute, MemoryMappedFileAccess.ReadWriteExecute)]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap, "Windows API returns IO exception error code when viewAccess is ReadWriteExecute")]
- public void InvalidAccessLevels_ReadWriteExecute_Uwp(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess)
- {
- const int Capacity = 4096;
- using (MemoryMappedFile mmf = MemoryMappedFile.CreateNew(null, Capacity, mapAccess))
- {
- Assert.Throws<IOException>(() => mmf.CreateViewStream(0, Capacity, viewAccess));
- }
- }
-
/// <summary>
/// Test to verify that setting the length of the stream is unsupported.
/// </summary>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MemoryMappedFile.CreateFromFile.Tests.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Tests.cs" />
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Desktop doesn't support Package.Open with FileAccess.Write")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Can't write to FileSystem in UAP")]
public void ZipPackage_CreateWithFileAccessWrite()
{
string packageName = "test.zip";
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<!-- Some internal types are needed, so we reference the implementation assembly, rather than the reference assembly. -->
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<IsPartialFacadeAssembly Condition="'$(TargetsWindows)' == 'true'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(TargetsWindows)' == 'true'">true</OmitResources>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ClientDisposed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ClientHandleClosed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ServerDisconnected()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ServerDisposed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NamedPipeStream_ServerHandleClosed()
{
string pipeName = GetUniquePipeName();
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void GetAccessControl_DisposedStream()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void GetAccessControl_ConnectedStream()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_NullPipeSecurity()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_DisposedStream()
{
using (var pair = CreateServerClientPair())
}
[Fact]
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public void SetAccessControl_ConnectedStream()
{
using (var pair = CreateServerClientPair())
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<AssembliesBeingTested Include="System.IO.Pipes" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.Pipes.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>System.IO.Pipes</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DefineConstants>$(DefineConstants)</DefineConstants>
<OmitTransitiveCompileReferences>true</OmitTransitiveCompileReferences>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Compiled Source Files -->
<ItemGroup>
<Compile Include="System\IO\Pipes\ReadWriteCompletionSource.cs" />
</ItemGroup>
<!-- Windows : Win32 only -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateNamedPipeClient.cs">
<Link>Common\Interop\Windows\Interop.CreateNamedPipeClient.cs</Link>
</Compile>
</Compile>
<Compile Include="System\IO\Pipes\NamedPipeServerStream.Win32.cs" />
</ItemGroup>
- <!-- Windows : UAP - Win32 + WinRT -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' == 'uap'">
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateNamedPipeClient.Uap.cs">
- <Link>Common\Interop\Windows\Interop.CreateNamedPipeClient.Uap.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs">
- <Link>Common\Interop\Windows\Interop.CREATEFILE2_EXTENDED_PARAMETERS.cs</Link>
- </Compile>
- <Compile Include="System\IO\Pipes\NamedPipeServerStream.Uap.cs" />
- </ItemGroup>
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' ">
<Compile Include="Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs" />
<Compile Include="System\IO\Pipes\AnonymousPipeServerStream.Unix.cs" />
+++ /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.IO.Pipes
-{
- /// <summary>
- /// Named pipe server
- /// </summary>
- public sealed partial class NamedPipeServerStream : PipeStream
- {
- // Depending on the Windows platform, we will try to reload a potentially missing DLL
- // and reattempt the retrieval of the impersonation username.
- private unsafe string HandleGetImpersonationUserNameError(int error, uint userNameMaxLength, char* userName)
- {
- // UAP does not allow calling LoadLibraryEx to try to load sspicli.dll like
- // in Win32, so we won't retry and will directly throw the passed error.
- throw WinIOError(error);
- }
- }
-}
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</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 Microsoft.Win32.SafeHandles;
-
-namespace System.IO.Pipes.Tests
-{
- /// <summary>
- /// The class contains interop declarations and helpers methods for them.
- /// </summary>
- internal static partial class InteropTest
- {
- private static unsafe bool TryHandleGetImpersonationUserNameError(SafePipeHandle handle, int error, uint userNameMaxLength, char* userName, out string impersonationUserName)
- {
- // Uap does not allow loading libraries
- impersonationUserName = string.Empty;
- return false;
- }
- }
-}
namespace System.IO.Pipes.Tests
{
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public sealed class NamedPipeTest_CrossProcess
{
[Fact]
namespace System.IO.Pipes.Tests
{
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerOut_ClientIn : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerIn_ClientOut : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerInOut_ClientInOut : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
public override bool SupportsBidirectionalReadingWriting => true;
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Read_ServerInOut_ClientInOut_APMWaitForConnection : PipeTest_Read
{
protected override ServerClientPair CreateServerClientPair()
[InlineData(TokenImpersonationLevel.Impersonation)]
[InlineData(TokenImpersonationLevel.Delegation)]
[PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public async Task RunAsClient_Windows(TokenImpersonationLevel tokenImpersonationLevel)
{
string pipeName = GetUniquePipeName();
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOutRead_ClientInOutWrite : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOutWrite_ClientInOutRead : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOut_ClientIn : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerInOut_ClientOut : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerOut_ClientIn : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Simple_ServerIn_ClientOut : NamedPipeTest_Simple
{
protected override NamedPipePair CreateNamedPipePair(PipeOptions serverOptions, PipeOptions clientOptions)
/// The Specific NamedPipe tests cover edge cases or otherwise narrow cases that
/// show up within particular server/client directional combinations.
/// </summary>
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Specific : NamedPipeTestBase
{
[Fact]
namespace System.IO.Pipes.Tests
{
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Write_ServerOut_ClientIn : PipeTest_Write
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Write_ServerIn_ClientOut : PipeTest_Write
{
protected override ServerClientPair CreateServerClientPair()
}
}
- [ActiveIssue(22271, TargetFrameworkMonikers.Uap)]
public class NamedPipeTest_Write_ServerInOut_ClientInOut : PipeTest_Write
{
protected override ServerClientPair CreateServerClientPair()
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AnonymousPipeTests\AnonymousPipeTest.CreateServer.cs" />
<Link>Common\System\Threading\Tasks\TaskTimeoutExtensions.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.CancelIoEx.cs">
<Link>Common\CoreLib\Interop\Windows\Interop.CancelIoEx.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.MaxLengths.cs">
<Link>Common\Interop\Windows\Interop.MaxLengths.cs</Link>
</Compile>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.netcoreapp.cs" />
<Compile Include="PipeTest.Read.netcoreapp.cs" />
<Compile Include="PipeTest.Write.netcoreapp.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsWindows)' == 'true'">
<Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.netcoreapp.Windows.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsUnix)' == 'true'">
- <Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs" />
- <Compile Include="NamedPipeTests\NamedPipeTest.UnixDomainSockets.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="InteropTest.Windows.cs" />
<Compile Include="NamedPipeTests\NamedPipeTest.RunAsClient.Windows.cs" />
- </ItemGroup>
- <!-- Windows: Win32 only -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetsUap)' != 'true'">
<Compile Include="InteropTest.Windows.Win32.cs" />
</ItemGroup>
- <!-- Windows: UAP - Win32 + WinRT -->
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetsUap)' == 'true'">
- <Compile Include="InteropTest.Windows.Uap.cs" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <Compile Include="NamedPipeTests\NamedPipeTest.CurrentUserOnly.netcoreapp.Unix.cs" />
+ <Compile Include="NamedPipeTests\NamedPipeTest.UnixDomainSockets.cs" />
<Compile Include="InteropTest.Unix.cs" />
<Compile Include="NamedPipeTests\NamedPipeTest.RunAsClient.Unix.cs" />
<Compile Include="NativeOverlapped.unix.cs" />
<PropertyGroup>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations)
- uap-Windows_NT;
netfx-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' != 'true' AND '$(TargetsLinux)' != 'true' AND '$(TargetsOSX)' != 'true'">SR.PlatformNotSupported_IOPorts</GeneratePlatformNotSupportedAssemblyMessage>
<DefineConstants>$(DefineConstants);NOSPAN</DefineConstants>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
- <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Linux-Debug;netstandard-Linux-Release;netstandard-OSX-Debug;netstandard-OSX-Release;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
- <!-- Default configurations to help VS understand the options -->
<ItemGroup Condition="'$(TargetsNetFx)' != 'true' AND ('$(TargetsWindows)' == 'true' OR '$(TargetsLinux)' == 'true' OR '$(TargetsOSX)' == 'true')">
<Compile Include="System\IO\Ports\Handshake.cs" />
<Compile Include="System\IO\Ports\InternalResources.cs" />
<Link>Common\CoreLib\Interop\Windows\Interop.FormatMessage.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.OpenCommPort.cs">
- <Link>Common\Interop\Windows\Mincore\Interop.OpenCommPort.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.FileOperations.cs">
- <Link>Common\Interop\Windows\Kernel32\Interop.FileOperations.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Mincore\Interop.GetCommPorts.cs">
- <Link>Common\Interop\Windows\Mincore\Interop.GetCommPorts.cs</Link>
- </Compile>
- <Compile Include="System\IO\Ports\SerialPort.Uap.cs" />
- <Compile Include="System\IO\Ports\SerialStream.Uap.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap' and '$(TargetsNetFx)' != 'true' and '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetFx)' != 'true' and '$(TargetsWindows)' == 'true'">
<Compile Include="System\IO\Ports\SerialPort.Win32.cs" />
<Compile Include="System\IO\Ports\SerialStream.Win32.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CreateFile.cs">
<Reference Include="System.Memory" />
<Reference Include="System.Threading.Tasks" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Reference Include="Microsoft.Win32.Primitives" />
- <Reference Include="System.ComponentModel.Primitives" />
- <Reference Include="System.Diagnostics.Debug" />
- <Reference Include="System.Diagnostics.Tools" />
- <Reference Include="System.Resources.ResourceManager" />
- <Reference Include="System.Runtime" />
- <Reference Include="System.Runtime.Extensions" />
- <Reference Include="System.Runtime.InteropServices" />
- <Reference Include="System.Text.Encoding.Extensions" />
- <Reference Include="System.Threading" />
- <Reference Include="System.Threading.Overlapped" />
- <Reference Include="System.Threading.Thread" />
- <Reference Include="System.Threading.ThreadPool" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetsLinux)' == 'true' OR '$(TargetsOSX)' == 'true'">
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
+++ /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;
-
-namespace System.IO.Ports
-{
- public partial class SerialPort : Component
- {
- public static string[] GetPortNames()
- {
- Span<uint> portNumbers = stackalloc uint[16];
- uint portNumbersFound;
- int error;
-
- try
- {
- error = Interop.mincore.GetCommPorts(portNumbers, out portNumbersFound);
- }
- catch (Exception e) when (e is EntryPointNotFoundException || e is DllNotFoundException)
- {
- throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_SerialPort_GetPortNames);
- }
-
- while (error == Interop.Errors.ERROR_MORE_DATA)
- {
- portNumbers = new uint[portNumbersFound];
- error = Interop.mincore.GetCommPorts(portNumbers, out portNumbersFound);
- }
-
- if (error != Interop.Errors.ERROR_SUCCESS)
- {
- // Try to match general behavior of Fx: return empty array for failures.
- return Array.Empty<string>();
- }
-
- var portNames = new string[portNumbersFound];
- for (int i = 0; i < portNumbersFound; ++i)
- {
- portNames[i] = "COM" + portNumbers[i].ToString();
- }
-
- return portNames;
- }
- }
-}
+++ /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 Microsoft.Win32.SafeHandles;
-
-namespace System.IO.Ports
-{
- internal sealed partial class SerialStream
- {
- public SafeFileHandle OpenPort(uint portNumber)
- {
- return Interop.mincore.OpenCommPort(
- portNumber,
- Interop.Kernel32.GenericOperations.GENERIC_READ | Interop.Kernel32.GenericOperations.GENERIC_WRITE,
- Interop.Kernel32.FileOperations.FILE_FLAG_OVERLAPPED);
- }
- }
-}
netcoreapp-Linux;
netcoreapp-OSX;
netfx;
- uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
/// </summary>
// This test requires access, via reflection, to internal type SerialStream and respective methods GetDcbFlag and
// SetDcbFlag, however, that requires either changes to the public type (increasing its size) or to the test itself.
- [ActiveIssue("https://github.com/dotnet/corefx/issues/23234", TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // depends on Windows implementation detail
[ConditionalFact(nameof(HasOneSerialPort))]
public void AbortOnErrorShouldBeClearedOnOpen()
/// Check that all ports either open correctly or fail with UnauthorizedAccessException (which implies they're already open)
/// </summary>
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [OuterLoop] // Occasionally flaky on UAP: https://github.com/dotnet/corefx/issues/32077
public void OpenEveryPortName()
{
foreach (string portName in SerialPort.GetPortNames())
public class OpenDevices : PortsTest
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // ActiveIssue: https://github.com/dotnet/corefx/issues/29756
- [ActiveIssue("https://github.com/dotnet/corefx/issues/23294", TargetFrameworkMonikers.Uap)]
public void OpenDevices01()
{
DosDevices dosDevices = new DosDevices();
return SerialPort.GetPortNames();
}
- if (PlatformDetection.IsUap)
+ if (PlatformDetection.IsInAppContainer)
{
// On UAP it is not possible to call QueryDosDevice, so use HARDWARE\DEVICEMAP\SERIALCOMM on the registry
// to get this information. The UAP code uses the GetCommPorts API to retrieve the same information.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.UnmanagedMemoryStream.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.IO.UnmanagedMemoryStream</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.IO.Manual.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.IO</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
public static void TestWriteMisc()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US")) // floating-point formatting comparison depends on culture
{
- using (new ThreadCultureChange("en-US")) // floating-point formatting comparison depends on culture
- {
- var sw = new StringWriter();
-
- sw.Write(true);
- sw.Write((char)'a');
- sw.Write(new decimal(1234.01));
- sw.Write((double)3452342.01);
- sw.Write((int)23456);
- sw.Write((long)long.MinValue);
- sw.Write((float)1234.50f);
- sw.Write((uint)uint.MaxValue);
- sw.Write((ulong)ulong.MaxValue);
-
- Assert.Equal("Truea1234.013452342.0123456-92233720368547758081234.5429496729518446744073709551615", sw.ToString());
- }
- }).Dispose();
+ var sw = new StringWriter();
+
+ sw.Write(true);
+ sw.Write((char)'a');
+ sw.Write(new decimal(1234.01));
+ sw.Write((double)3452342.01);
+ sw.Write((int)23456);
+ sw.Write((long)long.MinValue);
+ sw.Write((float)1234.50f);
+ sw.Write((uint)uint.MaxValue);
+ sw.Write((ulong)ulong.MaxValue);
+
+ Assert.Equal("Truea1234.013452342.0123456-92233720368547758081234.5429496729518446744073709551615", sw.ToString());
+ }
}
[Fact]
[Fact]
public static void TestWriteLineMisc()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US")) // floating-point formatting comparison depends on culture
{
- using (new ThreadCultureChange("en-US")) // floating-point formatting comparison depends on culture
- {
- var sw = new StringWriter();
- sw.WriteLine((bool)false);
- sw.WriteLine((char)'B');
- sw.WriteLine((int)987);
- sw.WriteLine((long)875634);
- sw.WriteLine((float)1.23457f);
- sw.WriteLine((uint)45634563);
- sw.WriteLine((ulong.MaxValue));
-
- Assert.Equal(
- string.Format("False{0}B{0}987{0}875634{0}1.23457{0}45634563{0}18446744073709551615{0}", Environment.NewLine),
- sw.ToString());
- }
- }).Dispose();
+ var sw = new StringWriter();
+ sw.WriteLine((bool)false);
+ sw.WriteLine((char)'B');
+ sw.WriteLine((int)987);
+ sw.WriteLine((long)875634);
+ sw.WriteLine((float)1.23457f);
+ sw.WriteLine((uint)45634563);
+ sw.WriteLine((ulong.MaxValue));
+
+ Assert.Equal(
+ string.Format("False{0}B{0}987{0}875634{0}1.23457{0}45634563{0}18446744073709551615{0}", Environment.NewLine),
+ sw.ToString());
+ }
}
[Fact]
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BinaryReader\BinaryReaderTests.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Json\JsonArrayTests.cs" />
[InlineData("0.000000000000000000000000000011", 1.1E-29)]
public void JsonValue_Parse_Double(string json, double expected)
{
- RemoteExecutorForUap.Invoke((jsonInner, expectedInner) =>
+ foreach (string culture in new[] { "en", "fr", "de" })
{
- foreach (string culture in new[] { "en", "fr", "de" })
+ using (new ThreadCultureChange(culture))
{
- using (new ThreadCultureChange(culture))
- {
- Assert.Equal(double.Parse(expectedInner, CultureInfo.InvariantCulture), (double)JsonValue.Parse(jsonInner));
- }
+ Assert.Equal(expected, (double)JsonValue.Parse(json));
}
- }, json, expected.ToString("R", CultureInfo.InvariantCulture)).Dispose();
+ }
}
[Theory]
[InlineData(1.123456789e-28)] // Values around the smallest positive decimal value
public void JsonValue_Parse_Double_ViaJsonPrimitive(double number)
{
- RemoteExecutorForUap.Invoke(numberText =>
+ foreach (string culture in new[] { "en", "fr", "de" })
{
- double numberInner = double.Parse(numberText, CultureInfo.InvariantCulture);
- foreach (string culture in new[] { "en", "fr", "de" })
+ using (new ThreadCultureChange(culture))
{
- using (new ThreadCultureChange(culture))
- {
- Assert.Equal(numberInner, (double)JsonValue.Parse(new JsonPrimitive(numberInner).ToString()));
- }
+ Assert.Equal(number, (double)JsonValue.Parse(new JsonPrimitive(number).ToString()));
}
- }, number.ToString("R", CultureInfo.InvariantCulture)).Dispose();
+ }
}
[Fact]
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Linq.Expressions.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<!-- Enabling the interpreter for RC1 in all builds, see https://github.com/dotnet/corefx/issues/4033 -->
<FeatureInterpret>true</FeatureInterpret>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.Linq.Expressions</AssemblyName>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<IsInterpreting>false</IsInterpreting>
<DefineConstants Condition=" '$(IsInterpreting)' != 'true' ">$(DefineConstants);FEATURE_COMPILE</DefineConstants>
<DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<DefaultReferenceExclusions Include="System.Linq.Expressions" />
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Linq.Parallel.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>System.Linq.Parallel</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Compiled Source Files -->
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Diagnostics\Tracing\TestEventListener.cs">
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Linq.Queryable.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>System.Linq.Queryable</AssemblyName>
<RootNamespace>System.Linq.Queryable</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Linq\CachedReflection.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="AppendPrependTests.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.Linq</AssemblyName>
<RootNamespace>System.Linq</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<TargetGroup>netcoreapp</TargetGroup>
</ContractProject>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'"> <!-- Optimize for speed -->
+ <ItemGroup> <!-- Optimize for speed -->
<Compile Include="System\Linq\AppendPrepend.SpeedOpt.cs" />
<Compile Include="System\Linq\Concat.SpeedOpt.cs" />
<Compile Include="System\Linq\DefaultIfEmpty.SpeedOpt.cs" />
<Link>System\Collections\Generic\LargeArrayBuilder.SpeedOpt.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'"> <!-- Optimize for size -->
- <Compile Include="System\Linq\Enumerable.SizeOpt.cs" />
- <Compile Include="System\Linq\Skip.SizeOpt.cs" />
- <Compile Include="System\Linq\Take.SizeOpt.cs" />
- <Compile Include="$(CommonPath)\System\Collections\Generic\LargeArrayBuilder.SizeOpt.cs">
- <Link>System\Collections\Generic\LargeArrayBuilder.SizeOpt.cs</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup>
<Compile Include="$(CommonPath)\System\Collections\Generic\ArrayBuilder.cs">
<Link>System\Collections\Generic\ArrayBuilder.cs</Link>
</Compile>
<AssemblyName>System.Management</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);0618</NoWarn>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_SystemManagement</GeneratePlatformNotSupportedAssemblyMessage>
<Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
PlatformDetection.IsNotArmNorArm64Process &&
PlatformDetection.IsNotWindowsNanoServer &&
PlatformDetection.IsNotWindowsIoTCore &&
- !PlatformDetection.IsUap;
+ !PlatformDetection.IsInAppContainer;
private static readonly string s_systemDriveId = Path.GetPathRoot(Environment.GetEnvironmentVariable("SystemDrive"));
// Use the environment variable below to do manual runs against remote boxes: just ensure that the credentials running the tests have
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
- <!-- System.Memory has forwarded types into the runtime on netcoreapp/uap
+ <!-- System.Memory has forwarded types into the runtime on netcoreapp.
It must win over assemblies versioned at 4.0.* -->
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<!-- ArrayBufferWriter is publicly exposed from the System.Memory ref and only it should define this constant as true. -->
<DefineConstants>$(DefineConstants);MAKE_ABW_PUBLIC</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<IncludePartialFacadeTests>true</IncludePartialFacadeTests>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(IncludePartialFacadeTests)' == 'true'">
- <!-- Tests specific to netcoreapp and uap -->
+ <ItemGroup>
<Compile Include="ArrayBufferWriter\ArrayBufferWriterTests.Byte.cs" />
<Compile Include="ArrayBufferWriter\ArrayBufferWriterTests.Char.cs" />
<Compile Include="ArrayBufferWriter\ArrayBufferWriterTests.String.cs" />
<Compile Include="Span\GetHashCode.cs" />
<Compile Include="Span\GetPinnableReference.cs" />
<Compile Include="Span\ImplicitConversion.cs" />
+ <Compile Include="Span\Indexer.cs" />
<Compile Include="Span\IndexOf.byte.cs" />
<Compile Include="Span\IndexOf.char.cs" />
<Compile Include="Span\IndexOf.T.cs" />
<Compile Include="ParsersAndFormatters\TestData.cs" />
<Compile Include="ParsersAndFormatters\TestUtils.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
- <Compile Include="Span\Indexer.cs" />
- </ItemGroup>
<ItemGroup>
<Compile Include="Base64\Base64DecoderUnitTests.cs" />
<Compile Include="Base64\Base64EncoderUnitTests.cs" />
+++ /dev/null
-<Project>
- <Import Project="..\Directory.Build.props" />
- <PropertyGroup>
- <AssemblyVersion>4.0.4.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- <IsUAP>true</IsUAP>
- </PropertyGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27213.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Http.Rtc", "src\System.Net.Http.Rtc.csproj", "{06A88496-DE20-4EDF-B694-C4B2FE38D5DC}"
- ProjectSection(ProjectDependencies) = postProject
- {45F02E74-C3B5-4751-8938-CBCEFE10FB93} = {45F02E74-C3B5-4751-8938-CBCEFE10FB93}
- EndProjectSection
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Http.Rtc", "ref\System.Net.Http.Rtc.csproj", "{45F02E74-C3B5-4751-8938-CBCEFE10FB93}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {06A88496-DE20-4EDF-B694-C4B2FE38D5DC}.Debug|Any CPU.ActiveCfg = uap-Windows_NT-Debug|Any CPU
- {06A88496-DE20-4EDF-B694-C4B2FE38D5DC}.Debug|Any CPU.Build.0 = uap-Windows_NT-Debug|Any CPU
- {06A88496-DE20-4EDF-B694-C4B2FE38D5DC}.Release|Any CPU.ActiveCfg = uap-Windows_NT-Release|Any CPU
- {06A88496-DE20-4EDF-B694-C4B2FE38D5DC}.Release|Any CPU.Build.0 = uap-Windows_NT-Release|Any CPU
- {45F02E74-C3B5-4751-8938-CBCEFE10FB93}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
- {45F02E74-C3B5-4751-8938-CBCEFE10FB93}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
- {45F02E74-C3B5-4751-8938-CBCEFE10FB93}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
- {45F02E74-C3B5-4751-8938-CBCEFE10FB93}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {06A88496-DE20-4EDF-B694-C4B2FE38D5DC} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
- {45F02E74-C3B5-4751-8938-CBCEFE10FB93} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {79584A84-9826-4735-A424-A360B71BB45B}
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<Project>
- <PropertyGroup>
- <BuildConfigurations>
- netcoreapp;
- uap;
- </BuildConfigurations>
- </PropertyGroup>
-</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.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the http://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-namespace System.Net.Http
-{
- public static partial class RtcRequestFactory
- {
- public static System.Net.Http.HttpRequestMessage Create(System.Net.Http.HttpMethod method, System.Uri uri) { throw null; }
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System.Net.Http.Rtc.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
- <ProjectReference Include="..\..\System.Net.Primitives\ref\System.Net.Primitives.csproj" />
- <ProjectReference Include="..\..\System.Net.Http\ref\System.Net.Http.csproj" />
- </ItemGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-<Project>
- <PropertyGroup>
- <BuildConfigurations>
- uap-Windows_NT;
- </BuildConfigurations>
- </PropertyGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <Configurations>uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System\Net\Http\RtcRequestFactory.cs" />
- <Reference Include="System.Runtime" />
- <Reference Include="System.Net.Http" />
- </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;
-
-namespace System.Net.Http
-{
- public static class RtcRequestFactory
- {
- public static HttpRequestMessage Create(HttpMethod method, Uri uri)
- {
- throw new PlatformNotSupportedException();
- }
- }
-}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Net.Http.WinHttpHandler</AssemblyName>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_WinHttpHandler</GeneratePlatformNotSupportedAssemblyMessage>
- <!-- Although we have a NS configuration, the actual UWP implementation is a shim over WinRT: so just validate against OneCore -->
- <UWPCompatible>false</UWPCompatible>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
<Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)' == 'net461'">
- <DefineConstants>$(DefineConstants);netfx</DefineConstants>
- </PropertyGroup>
<Import Project="System.Net.Http.WinHttpHandler.msbuild" Condition="'$(TargetsWindows)' == 'true'" />
- <ItemGroup Condition="'$(TargetGroup)' == 'net46' OR '$(TargetGroup)' == 'net461'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'net46' OR '$(TargetFramework)' == 'net461'">
<!-- Need to compile it here since the NET46 target here is building against System.Runtime whereas the
the list of other files in System.Net.Http.WinHttpHandler.msbuild is also used by System.Net.Http
library and the NET46 target there uses framework assembly references instead. -->
<Reference Include="System" />
<Reference Include="System.Net.Http" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Collections.NonGeneric" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
namespace System.Net.Http.WinHttpHandlerFunctional.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinHttpHandler not supported on UAP")]
public class ServerCertificateTest
{
private readonly ITestOutputHelper _output;
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
<Compile Include="$(CommonTestPath)\System\Net\Configuration.cs">
// Note: Disposing the HttpClient object automatically disposes the handler within. So, it is not necessary
// to separately Dispose (or have a 'using' statement) for the handler.
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinHttpHandler not supported on UAP")]
public class WinHttpHandlerTest
{
// TODO: This is a placeholder until GitHub Issue #2383 gets resolved.
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
protected override System.Threading.Tasks.Task SerializeToStreamAsync(System.IO.Stream stream, System.Net.TransportContext context) { throw null; }
protected internal override bool TryComputeLength(out long length) { throw null; }
}
-#if !uap
public sealed partial class SocketsHttpHandler : System.Net.Http.HttpMessageHandler
{
public SocketsHttpHandler() { }
protected override void Dispose(bool disposing) { }
protected internal override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { throw null; }
}
-#endif
public partial class StreamContent : System.Net.Http.HttpContent
{
public StreamContent(System.IO.Stream content) { }
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Http.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
<NoWarn>$(NoWarn);0436;CS1573</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);HTTP_DLL</DefineConstants>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;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="'$(TargetGroup)' == 'uap'">
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetsOSX)' == 'true' ">
<DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
</Compile>
</ItemGroup>
<!-- SocketsHttpHandler implementation -->
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup>
<Compile Include="System\Net\Http\SocketsHttpHandler\HPack\DynamicTable.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\IHttpHeadersHandler.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HPack\HPackDecoder.cs" />
</Compile>
</ItemGroup>
<!-- SocketsHttpHandler platform parts -->
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition=" '$(TargetsUnix)' == 'true'">
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs" />
<Compile Include="$(CommonPath)\System\Net\ContextFlagsAdapterPal.Unix.cs">
<Link>Common\System\Net\Security\Unix\SafeDeleteNegoContext.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsUnix)' == 'true' And '$(TargetsOSX)' != 'true' And '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition=" '$(TargetsUnix)' == 'true' And '$(TargetsOSX)' != 'true'">
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpNoProxy.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsOSX)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition=" '$(TargetsOSX)' == 'true'">
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.OSX.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\MacProxy.cs" />
<Compile Include="$(CommonPath)\Interop\OSX\Interop.CoreFoundation.cs">
<Link>Common\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.Windows.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.cs" />
<Compile Include="System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Windows.cs" />
</Compile>
</ItemGroup>
<!-- WinHttpHandler implementation -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="System\Net\Http\HttpClientHandler.Core.cs" />
<Compile Include="System\Net\Http\HttpClientHandler.netcoreapp.cs" />
<Compile Include="System\Net\Http\HttpClientHandler.Windows.cs" />
HttpMessageHandler.cs. We also use the HTTP_DLL define to change public classes into
internal ones to remove confusion if someone looks at the implementation dlls. They are
public in the separate WinHttpHandler.dll binary. -->
- <Import Project="..\..\System.Net.Http.WinHttpHandler\src\System.Net.Http.WinHttpHandler.msbuild" Condition="'$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'" />
+ <Import Project="..\..\System.Net.Http.WinHttpHandler\src\System.Net.Http.WinHttpHandler.msbuild" Condition="'$(TargetsWindows)' == 'true'" />
<!-- For source files to be shown within the visual tree in Solution Explorer, the items must be
included directly in the project file. We have the *.msbuild define the Compile items in a made
up item called CompileItem and then just include it here. -->
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="@(CompileItem)" />
</ItemGroup>
<!-- CurlHandler implementation -->
<ItemGroup Condition=" '$(TargetsOSX)' == 'true' ">
<Compile Include="System\Net\Http\CurlHandler\CurlHandler.SslProvider.OSX.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Reference Include="Windows" />
- <Reference Include="mscorlib" />
- <Reference Include="System.Runtime.InteropServices.WindowsRuntime" />
- <Reference Include="System.Runtime.WindowsRuntime" />
- <Reference Include="System.Security.Cryptography.X509Certificates" />
- <Reference Include="System.Text.Encoding.Extensions" />
- <Compile Include="$(CommonPath)\System\NotImplemented.cs">
- <Link>Common\System\NotImplemented.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.cs">
- <Link>Common\System\Net\HttpKnownHeaderNames.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Net\HttpStatusDescription.cs">
- <Link>Common\System\Net\HttpStatusDescription.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.cs">
- <Link>Common\System\Net\Security\CertificateHelper.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.Uap.cs">
- <Link>Common\System\Net\Security\CertificateHelper.Uap.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.Windows.cs">
- <Link>Common\System\Net\Security\CertificateHelper.Windows.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\StringExtensions.cs">
- <Link>Common\System\StringExtensions.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\CoreLib\System\Threading\Tasks\TaskToApm.cs">
- <Link>Common\CoreLib\System\Threading\Tasks\TaskToApm.cs</Link>
- </Compile>
- <Compile Include="uap\System\Net\cookie.cs" />
- <Compile Include="uap\System\Net\cookieexception.cs" />
- <Compile Include="uap\System\Net\CookieHelper.cs" />
- <Compile Include="uap\System\Net\HttpHandlerToFilter.cs" />
- <Compile Include="System\Net\Http\HttpClientHandler.Core.cs" />
- <Compile Include="System\Net\Http\SocketsHttpHandler\HttpNoProxy.cs" />
- <Compile Include="System\Net\Http\SocketsHttpHandler\SystemProxyInfo.uap.cs" />
- <Compile Include="uap\System\Net\HttpClientHandler.cs" />
- </ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Buffers" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.Threading.Timer" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<Reference Include="System.IO.Compression.Brotli" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
{
try
{
-#if uap
- new MailAddress(value);
-#else
MailAddressParser.ParseAddress(value);
-#endif
return true;
}
catch (FormatException e)
try
{
// We don't want '?' replacement characters, just fail.
-#if uap
- System.Text.Encoding decoder = new System.Text.UTF8Encoding(encoderShouldEmitUTF8Identifier: true, throwOnInvalidBytes: true);
-#else
System.Text.Encoding decoder = System.Text.Encoding.GetEncoding("utf-8", System.Text.EncoderFallback.ExceptionFallback,
System.Text.DecoderFallback.ExceptionFallback);
-#endif
return decoder.GetString(rawBytes, 0, rawBytes.Length);
}
catch (ArgumentException) { } // Not actually Utf-8
// automatically buffer the request content. That only happened if neither 'Content-Length' nor
// 'Transfer-Encoding: chunked' request headers were specified. So, the handler thus needed to buffer
// in the request content to determine its length and then would choose 'Content-Length' semantics when
- // POST'ing. In .NET Core and UAP platforms, the handler will resolve the ambiguity by always choosing
+ // POST'ing. In .NET Core, the handler will resolve the ambiguity by always choosing
// 'Transfer-Encoding: chunked'. The handler will never automatically buffer in the request content.
get
{
private const byte UTF8PreambleByte2 = 0xBF;
private const int UTF8PreambleFirst2Bytes = 0xEFBB;
-#if !uap
- // UTF32 not supported on Phone
private const int UTF32CodePage = 12000;
private const int UTF32PreambleLength = 4;
private const byte UTF32PreambleByte0 = 0xFF;
private const byte UTF32PreambleByte1 = 0xFE;
private const byte UTF32PreambleByte2 = 0x00;
private const byte UTF32PreambleByte3 = 0x00;
-#endif
private const int UTF32OrUnicodePreambleFirst2Bytes = 0xFFFE;
private const int UnicodeCodePage = 1200;
UTF8PreambleByte1,
UTF8PreambleByte2);
-#if !uap
// UTF32 not supported on Phone
AssertEncodingConstants(Encoding.UTF32, UTF32CodePage, UTF32PreambleLength, UTF32OrUnicodePreambleFirst2Bytes,
UTF32PreambleByte0,
UTF32PreambleByte1,
UTF32PreambleByte2,
UTF32PreambleByte3);
-#endif
AssertEncodingConstants(Encoding.Unicode, UnicodeCodePage, UnicodePreambleLength, UTF32OrUnicodePreambleFirst2Bytes,
UnicodePreambleByte0,
&& data[offset + 0] == UTF8PreambleByte0
&& data[offset + 1] == UTF8PreambleByte1
&& data[offset + 2] == UTF8PreambleByte2) ? UTF8PreambleLength : 0;
-#if !uap
- // UTF32 not supported on Phone
case UTF32CodePage:
return (dataLength >= UTF32PreambleLength
&& data[offset + 0] == UTF32PreambleByte0
&& data[offset + 1] == UTF32PreambleByte1
&& data[offset + 2] == UTF32PreambleByte2
&& data[offset + 3] == UTF32PreambleByte3) ? UTF32PreambleLength : 0;
-#endif
case UnicodeCodePage:
return (dataLength >= UnicodePreambleLength
&& data[offset + 0] == UnicodePreambleByte0
break;
case UTF32OrUnicodePreambleFirst2Bytes:
-#if !uap
// UTF32 not supported on Phone
if (dataLength >= UTF32PreambleLength && data[offset + 2] == UTF32PreambleByte2 && data[offset + 3] == UTF32PreambleByte3)
{
preambleLength = UTF32PreambleLength;
}
else
-#endif
{
encoding = Encoding.Unicode;
preambleLength = UnicodePreambleLength;
internal const int MaxInt32Digits = 10;
// iso-8859-1, Western European (ISO)
-#if uap
- internal static readonly Encoding DefaultHttpEncoding = Encoding.GetEncoding("iso-8859-1");
-#else
internal static readonly Encoding DefaultHttpEncoding = Encoding.GetEncoding(28591);
-#endif
private static bool[] CreateTokenChars()
{
{
internal static class HttpUtilities
{
- internal static Version DefaultRequestVersion =>
-#if uap
- HttpVersion.Version20;
-#else
- HttpVersion.Version11;
-#endif
+ internal static Version DefaultRequestVersion => HttpVersion.Version11;
internal static Version DefaultResponseVersion => HttpVersion.Version11;
+++ /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.
-
-namespace System.Net.Http
-{
- internal static partial class SystemProxyInfo
- {
- public static IWebProxy ConstructSystemProxy()
- {
- // For UAP this is currently not implemented.
- return new HttpNoProxy();
- }
- }
-}
+++ /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;
-using System.Collections.Generic;
-using System.Net.Internal;
-using InternalCookieException = System.Net.Internal.CookieException;
-
-namespace System.Net
-{
- internal static class CookieHelper
- {
- internal static IEnumerable<string> GetCookiesFromHeader(string setCookieHeader)
- {
- List<string> cookieStrings = new List<string>();
-
- try
- {
- CookieParser parser = new CookieParser(setCookieHeader);
- string cookieString;
-
- while ((cookieString = parser.GetString()) != null)
- {
- cookieStrings.Add(cookieString);
- }
- }
- catch (InternalCookieException)
- {
- // TODO (#7856): We should log this. But there isn't much we can do about it other
- // than to drop the rest of the cookies.
- }
-
- return cookieStrings;
- }
- }
-}
+++ /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.Diagnostics;
-using System.Globalization;
-using System.Net;
-using System.Net.Http.Headers;
-using System.Net.Security;
-using System.Runtime.ExceptionServices;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.InteropServices.WindowsRuntime;
-using System.Security.Authentication;
-using System.Security.Cryptography;
-using System.Security.Cryptography.X509Certificates;
-using System.Threading;
-using System.Threading.Tasks;
-
-using RTApiInformation = Windows.Foundation.Metadata.ApiInformation;
-using RTHttpBaseProtocolFilter = Windows.Web.Http.Filters.HttpBaseProtocolFilter;
-using RTHttpCacheReadBehavior = Windows.Web.Http.Filters.HttpCacheReadBehavior;
-using RTHttpCacheWriteBehavior = Windows.Web.Http.Filters.HttpCacheWriteBehavior;
-using RTHttpCookieUsageBehavior = Windows.Web.Http.Filters.HttpCookieUsageBehavior;
-using RTHttpRequestMessage = Windows.Web.Http.HttpRequestMessage;
-using RTPasswordCredential = Windows.Security.Credentials.PasswordCredential;
-using RTCertificate = Windows.Security.Cryptography.Certificates.Certificate;
-using RTChainValidationResult = Windows.Security.Cryptography.Certificates.ChainValidationResult;
-using RTHttpServerCustomValidationRequestedEventArgs = Windows.Web.Http.Filters.HttpServerCustomValidationRequestedEventArgs;
-
-namespace System.Net.Http
-{
- public partial class HttpClientHandler : HttpMessageHandler
- {
- private const string RequestMessageLookupKey = "System.Net.Http.HttpRequestMessage";
- private const string SavedExceptionDispatchInfoLookupKey = "System.Runtime.ExceptionServices.ExceptionDispatchInfo";
- private static Oid s_serverAuthOid = new Oid("1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.1");
- private static readonly Lazy<bool> s_RTCookieUsageBehaviorSupported =
- new Lazy<bool>(InitRTCookieUsageBehaviorSupported);
- internal static bool RTCookieUsageBehaviorSupported => s_RTCookieUsageBehaviorSupported.Value;
- private static readonly Lazy<bool> s_RTNoCacheSupported =
- new Lazy<bool>(InitRTNoCacheSupported);
- private static bool RTNoCacheSupported => s_RTNoCacheSupported.Value;
- private static readonly Lazy<bool> s_RTServerCustomValidationRequestedSupported =
- new Lazy<bool>(InitRTServerCustomValidationRequestedSupported);
- private static bool RTServerCustomValidationRequestedSupported => s_RTServerCustomValidationRequestedSupported.Value;
-
- #region Fields
-
- private readonly HttpHandlerToFilter _handlerToFilter;
- private readonly HttpMessageHandler _diagnosticsPipeline;
-
- private RTHttpBaseProtocolFilter _rtFilter;
- private ClientCertificateOption _clientCertificateOptions;
- private CookieContainer _cookieContainer;
- private bool _useCookies;
- private DecompressionMethods _automaticDecompression;
- private bool _allowAutoRedirect;
- private int _maxAutomaticRedirections;
- private ICredentials _defaultProxyCredentials;
- private ICredentials _credentials;
- private IWebProxy _proxy;
- private X509Certificate2Collection _clientCertificates;
- private IDictionary<string, object> _properties; // Only create dictionary when required.
- private Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> _serverCertificateCustomValidationCallback;
-
- #endregion Fields
-
- #region Properties
-
- public virtual bool SupportsAutomaticDecompression
- {
- get { return true; }
- }
-
- public virtual bool SupportsProxy
- {
- get { return false; }
- }
-
- public virtual bool SupportsRedirectConfiguration
- {
- get { return false; }
- }
-
- public bool UseCookies
- {
- get { return _useCookies; }
- set
- {
- CheckDisposedOrStarted();
- _useCookies = value;
- }
- }
-
- public CookieContainer CookieContainer
- {
- get { return _cookieContainer; }
- set
- {
- if (value == null)
- {
- throw new ArgumentNullException(nameof(value));
- }
- if (!UseCookies)
- {
- throw new InvalidOperationException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_http_invalid_enable_first, nameof(UseCookies), "true"));
- }
- CheckDisposedOrStarted();
- _cookieContainer = value;
- }
- }
-
- public ClientCertificateOption ClientCertificateOptions
- {
- get { return _clientCertificateOptions; }
- set
- {
- if (value != ClientCertificateOption.Manual &&
- value != ClientCertificateOption.Automatic)
- {
- throw new ArgumentOutOfRangeException(nameof(value));
- }
- CheckDisposedOrStarted();
- _clientCertificateOptions = value;
- }
- }
-
- public DecompressionMethods AutomaticDecompression
- {
- get { return _automaticDecompression; }
- set
- {
- CheckDisposedOrStarted();
-
- // Automatic decompression is implemented downstack.
- // HBPF will decompress both gzip and deflate, we will set
- // accept-encoding for one, the other, or both passed in here.
- _rtFilter.AutomaticDecompression = (value != DecompressionMethods.None);
- _automaticDecompression = value;
- }
- }
-
- public bool UseProxy
- {
- get { return _rtFilter.UseProxy; }
- set
- {
- CheckDisposedOrStarted();
- _rtFilter.UseProxy = value;
- }
- }
-
- public IWebProxy Proxy
- {
- // We don't actually support setting a different proxy because our Http stack in NETNative
- // layers on top of the WinRT HttpClient which uses Wininet. And that API layer simply
- // uses the proxy information in the registry (and the same that Internet Explorer uses).
- // However, we can't throw PlatformNotSupportedException because the .NET Desktop stack
- // does support this and doing so would break apps. So, we'll just let this get/set work
- // even though we ignore it. The majority of apps actually use the default proxy anyways
- // so setting it here would be a no-op.
- get { return _proxy; }
- set
- {
- CheckDisposedOrStarted();
- _proxy = value;
- }
- }
-
- public bool PreAuthenticate
- {
- get { return true; }
- set
- {
- CheckDisposedOrStarted();
- }
- }
-
- public bool UseDefaultCredentials
- {
- get { return false; }
- set
- {
- CheckDisposedOrStarted();
- }
- }
-
- public ICredentials Credentials
- {
- get
- {
- return _credentials;
- }
- set
- {
- CheckDisposedOrStarted();
- if (value != null && value != CredentialCache.DefaultCredentials && !(value is NetworkCredential))
- {
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_http_value_not_supported, value, nameof(Credentials)));
- }
-
- _credentials = value;
- }
- }
-
- public ICredentials DefaultProxyCredentials
- {
- get
- {
- return _defaultProxyCredentials;
- }
- set
- {
- CheckDisposedOrStarted();
- if (value != null && value != CredentialCache.DefaultCredentials && !(value is NetworkCredential))
- {
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_http_value_not_supported, value, nameof(DefaultProxyCredentials)));
- }
-
- _defaultProxyCredentials = value;;
- }
- }
-
- public bool AllowAutoRedirect
- {
- get { return _allowAutoRedirect; }
- set
- {
- CheckDisposedOrStarted();
- _allowAutoRedirect = value;
- }
- }
-
- public int MaxAutomaticRedirections
- {
- get { return _maxAutomaticRedirections; }
- set
- {
- if (value <= 0)
- {
- throw new ArgumentOutOfRangeException(nameof(value));
- }
- CheckDisposedOrStarted();
- }
- }
-
- public int MaxConnectionsPerServer
- {
- get { return (int)_rtFilter.MaxConnectionsPerServer; }
- set
- {
- CheckDisposedOrStarted();
- _rtFilter.MaxConnectionsPerServer = (uint)value;
- }
- }
-
- public int MaxResponseHeadersLength
- {
- // Windows.Web.Http is built on WinINet. There is no maximum limit (except for out of memory)
- // for received response headers. So, returning -1 (indicating no limit) is appropriate.
- get { return -1; }
-
- set
- {
- CheckDisposedOrStarted();
- }
- }
-
- public X509CertificateCollection ClientCertificates
- {
- get
- {
- if (_clientCertificateOptions != ClientCertificateOption.Manual)
- {
- throw new InvalidOperationException(SR.Format(
- SR.net_http_invalid_enable_first,
- nameof(ClientCertificateOptions),
- nameof(ClientCertificateOption.Manual)));
- }
-
- if (_clientCertificates == null)
- {
- _clientCertificates = new X509Certificate2Collection();
- }
-
- return _clientCertificates;
- }
- }
-
- public Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> ServerCertificateCustomValidationCallback
- {
- get
- {
- return _serverCertificateCustomValidationCallback;
- }
- set
- {
- CheckDisposedOrStarted();
- if (value != null)
- {
- if (!RTServerCustomValidationRequestedSupported)
- {
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_http_feature_requires_Windows10Version1607));
- }
- }
-
- _serverCertificateCustomValidationCallback = value;
- }
- }
-
- public bool CheckCertificateRevocationList
- {
- // The WinRT API always checks for certificate revocation. If the revocation status is indeterminate
- // (such as revocation server is offline), then the WinRT API will indicate "success" and not fail
- // the request.
- get { return true; }
- set
- {
- CheckDisposedOrStarted();
- }
- }
-
- public SslProtocols SslProtocols
- {
- // The WinRT API does not expose a property to control this. It always uses the system default.
- get { return SslProtocols.None; }
- set
- {
- CheckDisposedOrStarted();
- }
- }
-
- public IDictionary<string, object> Properties
- {
- get
- {
- if (_properties == null)
- {
- _properties = new Dictionary<string, object>();
- }
-
- return _properties;
- }
- }
-
- #endregion Properties
-
- #region De/Constructors
-
- public HttpClientHandler()
- {
- _rtFilter = CreateFilter();
-
- _handlerToFilter = new HttpHandlerToFilter(_rtFilter, this);
- _handlerToFilter.RequestMessageLookupKey = RequestMessageLookupKey;
- _handlerToFilter.SavedExceptionDispatchInfoLookupKey = SavedExceptionDispatchInfoLookupKey;
- _diagnosticsPipeline = new DiagnosticsHandler(_handlerToFilter);
-
- _clientCertificateOptions = ClientCertificateOption.Manual;
-
- _useCookies = true; // deal with cookies by default.
- _cookieContainer = new CookieContainer(); // default container used for dealing with auto-cookies.
-
- _allowAutoRedirect = true;
- _maxAutomaticRedirections = 50;
-
- _automaticDecompression = DecompressionMethods.None;
- }
-
- private RTHttpBaseProtocolFilter CreateFilter()
- {
- var filter = new RTHttpBaseProtocolFilter();
-
- // Always turn off WinRT cookie processing if the WinRT API supports turning it off.
- // Use .NET CookieContainer handling only.
- if (RTCookieUsageBehaviorSupported)
- {
- filter.CookieUsageBehavior = RTHttpCookieUsageBehavior.NoCookies;
- }
-
- // Handle redirections at the .NET layer so that we can see cookies on redirect responses
- // and have control of the number of redirections allowed.
- filter.AllowAutoRedirect = false;
-
- filter.AutomaticDecompression = false;
-
- // We don't support using the UI model in HttpBaseProtocolFilter() especially for auto-handling 401 responses.
- filter.AllowUI = false;
-
- // The .NET Desktop System.Net Http APIs (based on HttpWebRequest/HttpClient) uses no caching by default.
- // To preserve app-compat, we turn off caching in the WinRT HttpClient APIs.
- filter.CacheControl.ReadBehavior = RTNoCacheSupported ?
- RTHttpCacheReadBehavior.NoCache : RTHttpCacheReadBehavior.MostRecent;
- filter.CacheControl.WriteBehavior = RTHttpCacheWriteBehavior.NoCache;
-
- return filter;
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing && !_disposed)
- {
- _disposed = true;
-
- try
- {
- _rtFilter.Dispose();
- }
- catch (InvalidComObjectException)
- {
- // We'll ignore this error since it can happen when Dispose() is called from an object's finalizer
- // and the WinRT object (rtFilter) has already been disposed by the .NET Native runtime.
- }
- }
-
- base.Dispose(disposing);
- }
-
- #endregion De/Constructors
-
- #region Request Setup
-
- private async Task ConfigureRequest(HttpRequestMessage request)
- {
- ApplyDecompressionSettings(request);
-
- await ApplyClientCertificateSettings().ConfigureAwait(false);
- }
-
- private void ApplyDecompressionSettings(HttpRequestMessage request)
- {
- // Decompression: Add the Gzip and Deflate headers if not already present.
- ApplyDecompressionSetting(request, DecompressionMethods.GZip, "gzip");
- ApplyDecompressionSetting(request, DecompressionMethods.Deflate, "deflate");
- }
-
- private void ApplyDecompressionSetting(HttpRequestMessage request, DecompressionMethods method, string methodName)
- {
- if ((AutomaticDecompression & method) == method)
- {
- bool found = false;
- foreach (StringWithQualityHeaderValue encoding in request.Headers.AcceptEncoding)
- {
- if (methodName.Equals(encoding.Value, StringComparison.OrdinalIgnoreCase))
- {
- found = true;
- break;
- }
- }
-
- if (!found)
- {
- request.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue(methodName));
- }
- }
- }
-
- private async Task ApplyClientCertificateSettings()
- {
- if (ClientCertificateOptions == ClientCertificateOption.Manual)
- {
- if (_clientCertificates != null && _clientCertificates.Count > 0)
- {
- X509Certificate2 clientCert = CertificateHelper.GetEligibleClientCertificate(_clientCertificates);
- if (clientCert == null)
- {
- return;
- }
-
- RTCertificate rtClientCert = await CertificateHelper.ConvertDotNetClientCertToWinRtClientCertAsync(clientCert).ConfigureAwait(false);
- if (rtClientCert == null)
- {
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_http_feature_UWPClientCertSupportRequiresCertInPersonalCertificateStore));
- }
-
- _rtFilter.ClientCertificate = rtClientCert;
- }
-
- return;
- }
- else
- {
- X509Certificate2 clientCert = CertificateHelper.GetEligibleClientCertificate();
- if (clientCert == null)
- {
- return;
- }
-
- // Unlike in the .Manual case above, the conversion to WinRT Certificate should always work;
- // so we just use an Assert. All the possible client certs were enumerated from that store and
- // filtered down to a single client cert.
- RTCertificate rtClientCert = await CertificateHelper.ConvertDotNetClientCertToWinRtClientCertAsync(clientCert).ConfigureAwait(false);
- Debug.Assert(rtClientCert != null);
- _rtFilter.ClientCertificate = rtClientCert;
- }
- }
-
- private RTPasswordCredential RTPasswordCredentialFromICredentials(ICredentials creds)
- {
- // The WinRT PasswordCredential object does not have a special credentials value for "default credentials".
- // In general, the UWP HTTP platform automatically manages sending default credentials, if no explicit
- // credential was specified, based on if the app has EnterpriseAuthentication capability and if the endpoint
- // is listed in an intranet zone.
- //
- // A WinRT PasswordCredential object that is either null or created with the default constructor (i.e. with
- // empty values for username and password) indicates that there is no explicit credential. And that means
- // that the default logged-on credentials might be sent to the endpoint.
- //
- // There is currently no WinRT API to turn off sending default credentials other than the capability
- // and intranet zone checks described above. In general, the UWP HTTP model for specifying default
- // credentials is orthogonal to how the .NET System.Net APIs have been designed.
- if (creds == null || creds == CredentialCache.DefaultCredentials)
- {
- return null;
- }
- else
- {
- Debug.Assert(creds is NetworkCredential);
-
- NetworkCredential networkCred = (NetworkCredential)creds;
-
- // Creating a new WinRT PasswordCredential object with the default constructor ends up
- // with empty strings for username and password inside the object. However, one can't assign
- // empty strings to those properties; otherwise, it will throw an error.
- RTPasswordCredential rtCreds = new RTPasswordCredential();
- if (!string.IsNullOrEmpty(networkCred.UserName))
- {
- if (!string.IsNullOrEmpty(networkCred.Domain))
- {
- rtCreds.UserName = networkCred.Domain + "\\" + networkCred.UserName;
- }
- else
- {
- rtCreds.UserName = networkCred.UserName;
- }
- }
-
- if (!string.IsNullOrEmpty(networkCred.Password))
- {
- rtCreds.Password = networkCred.Password;
- }
-
- return rtCreds;
- }
- }
-
- private void SetFilterProxyCredential()
- {
- // We don't support changing the proxy settings in the UAP version of HttpClient since it's layered on
- // WinRT HttpClient. But we do support passing in explicit proxy credentials, if specified, which we can
- // get from the specified or default proxy.
- ICredentials proxyCredentials = null;
- if (UseProxy)
- {
- if (_proxy != null)
- {
- proxyCredentials = _proxy.Credentials;
- }
- else
- {
- proxyCredentials = _defaultProxyCredentials;
- }
- }
-
- _rtFilter.ProxyCredential = RTPasswordCredentialFromICredentials(proxyCredentials);
- }
-
- private void SetFilterServerCredential()
- {
- _rtFilter.ServerCredential = RTPasswordCredentialFromICredentials(_credentials);
- }
-
- #endregion Request Setup
-
- #region Request Execution
-
- protected internal override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
- CancellationToken cancellationToken)
- {
- CheckDisposed();
- SetOperationStarted();
-
- HttpResponseMessage response;
- try
- {
- if (string.Equals(request.Method.Method, HttpMethod.Trace.Method, StringComparison.OrdinalIgnoreCase))
- {
- // https://github.com/dotnet/corefx/issues/22161
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_http_httpmethod_notsupported_error, request.Method.Method));
- }
-
- await ConfigureRequest(request).ConfigureAwait(false);
-
- Task<HttpResponseMessage> responseTask = DiagnosticsHandler.IsEnabled() ?
- _diagnosticsPipeline.SendAsync(request, cancellationToken) :
- _handlerToFilter.SendAsync(request, cancellationToken);
-
- response = await responseTask.ConfigureAwait(false);
- }
- catch (OperationCanceledException)
- {
- throw;
- }
- catch (Exception ex)
- {
- // Convert back to the expected exception type.
- throw new HttpRequestException(SR.net_http_client_execution_error, ex);
- }
-
- return response;
- }
-
- #endregion Request Execution
-
- #region Helpers
-
- private void SetOperationStarted()
- {
- if (!_operationStarted)
- {
- // Since this is the first operation, we set all the necessary WinRT filter properties.
- SetFilterProxyCredential();
- SetFilterServerCredential();
- if (_serverCertificateCustomValidationCallback != null)
- {
- Debug.Assert(RTServerCustomValidationRequestedSupported);
-
- // The WinRT layer uses a different model for the certificate callback. The callback is
- // considered "extra" validation. We need to explicitly ignore errors so that the callback
- // will get called.
- //
- // In addition, the WinRT layer restricts some errors so that they cannot be ignored, such
- // as "Revoked". This will result in behavior differences between UWP and other platforms.
- // The following errors cannot be ignored right now in the WinRT layer:
- //
- // ChainValidationResult.BasicConstraintsError
- // ChainValidationResult.InvalidCertificateAuthorityPolicy
- // ChainValidationResult.InvalidSignature
- // ChainValidationResult.OtherErrors
- // ChainValidationResult.Revoked
- // ChainValidationResult.UnknownCriticalExtension
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.Expired);
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.IncompleteChain);
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.InvalidName);
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.RevocationFailure);
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.RevocationInformationMissing);
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.Untrusted);
- _rtFilter.IgnorableServerCertificateErrors.Add(RTChainValidationResult.WrongUsage);
- _rtFilter.ServerCustomValidationRequested += RTServerCertificateCallback;
- }
-
- _operationStarted = true;
- }
- }
-
- private static bool InitRTCookieUsageBehaviorSupported()
- {
- return RTApiInformation.IsPropertyPresent(
- "Windows.Web.Http.Filters.HttpBaseProtocolFilter",
- "CookieUsageBehavior");
- }
-
- private static bool InitRTNoCacheSupported()
- {
- return RTApiInformation.IsEnumNamedValuePresent(
- "Windows.Web.Http.Filters.HttpCacheReadBehavior",
- "NoCache");
- }
-
- private static bool InitRTServerCustomValidationRequestedSupported()
- {
- return RTApiInformation.IsEventPresent(
- "Windows.Web.Http.Filters.HttpBaseProtocolFilter",
- "ServerCustomValidationRequested");
- }
-
- internal void RTServerCertificateCallback(RTHttpBaseProtocolFilter sender, RTHttpServerCustomValidationRequestedEventArgs args)
- {
- bool success = RTServerCertificateCallbackHelper(
- args.RequestMessage,
- args.ServerCertificate,
- args.ServerIntermediateCertificates,
- args.ServerCertificateErrors);
-
- if (!success)
- {
- args.Reject();
- }
- }
-
- private bool RTServerCertificateCallbackHelper(
- RTHttpRequestMessage requestMessage,
- RTCertificate cert,
- IReadOnlyList<RTCertificate> intermediateCerts,
- IReadOnlyList<RTChainValidationResult> certErrors)
- {
- // Convert WinRT certificate to .NET certificate.
- X509Certificate2 serverCert = CertificateHelper.ConvertPublicKeyCertificate(cert);
-
- // Create .NET X509Chain from the WinRT information. We need to rebuild the chain since WinRT only
- // gives us an array of intermediate certificates and not a X509Chain object.
- var serverChain = new X509Chain();
- SslPolicyErrors sslPolicyErrors = SslPolicyErrors.None;
- foreach (RTCertificate intermediateCert in intermediateCerts)
- {
- serverChain.ChainPolicy.ExtraStore.Add(CertificateHelper.ConvertPublicKeyCertificate(cert));
- }
- serverChain.ChainPolicy.RevocationMode = X509RevocationMode.Online; // WinRT always checks revocation.
- serverChain.ChainPolicy.RevocationFlag = X509RevocationFlag.ExcludeRoot;
- // Authenticate the remote party: (e.g. when operating in client mode, authenticate the server).
- serverChain.ChainPolicy.ApplicationPolicy.Add(s_serverAuthOid);
- if (!serverChain.Build(serverCert))
- {
- sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors;
- }
-
- // Determine name-mismatch error from the existing WinRT information since .NET X509Chain.Build does not
- // return that in the X509Chain.ChainStatus fields.
- foreach (RTChainValidationResult result in certErrors)
- {
- if (result == RTChainValidationResult.InvalidName)
- {
- sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNameMismatch;
- break;
- }
- }
-
- // Get the .NET HttpRequestMessage we saved in the property bag of the WinRT HttpRequestMessage.
- HttpRequestMessage request = (HttpRequestMessage)requestMessage.Properties[RequestMessageLookupKey];
-
- // Call the .NET callback.
- bool success = false;
- try
- {
- success = _serverCertificateCustomValidationCallback(request, serverCert, serverChain, sslPolicyErrors);
- }
- catch (Exception ex)
- {
- // Save the exception info. We will return it later via the SendAsync response processing.
- requestMessage.Properties.Add(
- SavedExceptionDispatchInfoLookupKey,
- ExceptionDispatchInfo.Capture(ex));
- }
- finally
- {
- serverChain.Dispose();
- serverCert.Dispose();
- }
-
- return success;
- }
-
- #endregion Helpers
- }
-}
+++ /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.Diagnostics;
-using System.IO;
-using System.Runtime.ExceptionServices;
-using System.Runtime.InteropServices.WindowsRuntime;
-using System.Threading;
-using System.Threading.Tasks;
-
-using Windows.Web.Http.Headers;
-
-using RTHttpMethod = Windows.Web.Http.HttpMethod;
-using RTHttpRequestMessage = Windows.Web.Http.HttpRequestMessage;
-using RTHttpResponseMessage = Windows.Web.Http.HttpResponseMessage;
-using RTHttpBufferContent = Windows.Web.Http.HttpBufferContent;
-using RTHttpStreamContent = Windows.Web.Http.HttpStreamContent;
-using RTHttpVersion = Windows.Web.Http.HttpVersion;
-using RTIHttpContent = Windows.Web.Http.IHttpContent;
-using RTIInputStream = Windows.Storage.Streams.IInputStream;
-using RTHttpBaseProtocolFilter = Windows.Web.Http.Filters.HttpBaseProtocolFilter;
-using RTChainValidationResult = Windows.Security.Cryptography.Certificates.ChainValidationResult;
-
-namespace System.Net.Http
-{
- internal class HttpHandlerToFilter : HttpMessageHandler
- {
- // We need two different WinRT filters because we need to remove credentials during redirection requests
- // and WinRT doesn't allow changing the filter properties after the first request.
- private readonly RTHttpBaseProtocolFilter _filter;
- private Lazy<RTHttpBaseProtocolFilter> _filterWithNoCredentials;
- private RTHttpBaseProtocolFilter FilterWithNoCredentials => _filterWithNoCredentials.Value;
-
- private int _filterMaxVersionSet;
- private HttpClientHandler _handler;
-
- internal HttpHandlerToFilter(
- RTHttpBaseProtocolFilter filter,
- HttpClientHandler handler)
- {
- if (filter == null)
- {
- throw new ArgumentNullException(nameof(filter));
- }
-
- _filter = filter;
- _filterMaxVersionSet = 0;
- _handler = handler;
-
- _filterWithNoCredentials = new Lazy<RTHttpBaseProtocolFilter>(InitFilterWithNoCredentials);
- }
-
- internal string RequestMessageLookupKey { get; set; }
- internal string SavedExceptionDispatchInfoLookupKey { get; set; }
-
- protected internal override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancel)
- {
- int redirects = 0;
- HttpMethod requestHttpMethod;
- bool skipRequestContentIfPresent = false;
- HttpResponseMessage response = null;
-
- if (request == null)
- {
- throw new ArgumentNullException(nameof(request));
- }
-
- requestHttpMethod = request.Method;
-
- while (true)
- {
- cancel.ThrowIfCancellationRequested();
-
- if (response != null)
- {
- response.Dispose();
- response = null;
- }
-
- RTHttpRequestMessage rtRequest = await ConvertRequestAsync(
- request,
- requestHttpMethod,
- skipRequestContentIfPresent).ConfigureAwait(false);
-
- RTHttpResponseMessage rtResponse;
- try
- {
- rtResponse = await (redirects > 0 ? FilterWithNoCredentials : _filter).SendRequestAsync(rtRequest).AsTask(cancel).ConfigureAwait(false);
- }
- catch (TaskCanceledException)
- {
- throw;
- }
- catch
- {
- if (rtRequest.Properties.TryGetValue(SavedExceptionDispatchInfoLookupKey, out object info))
- {
- ((ExceptionDispatchInfo)info).Throw();
- }
-
- throw;
- }
-
- response = ConvertResponse(rtResponse);
-
- ProcessResponseCookies(response, request.RequestUri);
-
- if (!_handler.AllowAutoRedirect)
- {
- break;
- }
-
- if (response.StatusCode != HttpStatusCode.MultipleChoices &&
- response.StatusCode != HttpStatusCode.MovedPermanently &&
- response.StatusCode != HttpStatusCode.Redirect &&
- response.StatusCode != HttpStatusCode.RedirectMethod &&
- response.StatusCode != HttpStatusCode.RedirectKeepVerb &&
- response.StatusCode != HttpStatusCode.PermanentRedirect)
- {
- break;
- }
-
- redirects++;
- if (redirects > _handler.MaxAutomaticRedirections)
- {
- break;
- }
-
- Uri redirectUri = response.Headers.Location;
- if (redirectUri == null)
- {
- break;
- }
-
- if (!redirectUri.IsAbsoluteUri)
- {
- redirectUri = new Uri(request.RequestUri, redirectUri.OriginalString);
- }
-
- if (redirectUri.Scheme != Uri.UriSchemeHttp &&
- redirectUri.Scheme != Uri.UriSchemeHttps)
- {
- break;
- }
-
- if (request.RequestUri.Scheme == Uri.UriSchemeHttps &&
- redirectUri.Scheme == Uri.UriSchemeHttp)
- {
- break;
- }
-
- // Follow HTTP RFC 7231 rules. In general, 3xx responses
- // except for 307 and 308 will keep verb except POST becomes GET.
- // 307 and 308 responses have all verbs stay the same.
- // https://tools.ietf.org/html/rfc7231#section-6.4
- if (response.StatusCode != HttpStatusCode.RedirectKeepVerb &&
- response.StatusCode != HttpStatusCode.PermanentRedirect &&
- requestHttpMethod == HttpMethod.Post)
- {
- requestHttpMethod = HttpMethod.Get;
- skipRequestContentIfPresent = true;
- }
-
- request.RequestUri = redirectUri;
- }
-
- response.RequestMessage = request;
-
- return response;
- }
-
- private RTHttpBaseProtocolFilter InitFilterWithNoCredentials()
- {
- RTHttpBaseProtocolFilter filter = new RTHttpBaseProtocolFilter();
-
- filter.AllowAutoRedirect = _filter.AllowAutoRedirect;
- filter.AllowUI = _filter.AllowUI;
- filter.AutomaticDecompression = _filter.AutomaticDecompression;
- filter.CacheControl.ReadBehavior = _filter.CacheControl.ReadBehavior;
- filter.CacheControl.WriteBehavior = _filter.CacheControl.WriteBehavior;
-
- if (HttpClientHandler.RTCookieUsageBehaviorSupported)
- {
- filter.CookieUsageBehavior = _filter.CookieUsageBehavior;
- }
-
- filter.MaxConnectionsPerServer = _filter.MaxConnectionsPerServer;
- filter.MaxVersion = _filter.MaxVersion;
- filter.UseProxy = _filter.UseProxy;
-
- if (_handler.ServerCertificateCustomValidationCallback != null)
- {
- foreach (RTChainValidationResult error in _filter.IgnorableServerCertificateErrors)
- {
- filter.IgnorableServerCertificateErrors.Add(error);
- }
-
- filter.ServerCustomValidationRequested += _handler.RTServerCertificateCallback;
- }
-
- return filter;
- }
-
- // Taken from System.Net.CookieModule.OnReceivedHeaders
- private void ProcessResponseCookies(HttpResponseMessage response, Uri uri)
- {
- if (_handler.UseCookies)
- {
- IEnumerable<string> values;
- if (response.Headers.TryGetValues(HttpKnownHeaderNames.SetCookie, out values))
- {
- foreach (string cookieString in values)
- {
- if (!string.IsNullOrWhiteSpace(cookieString))
- {
- try
- {
- // Parse the cookies so that we can filter some of them out
- CookieContainer helper = new CookieContainer();
- helper.SetCookies(uri, cookieString);
- CookieCollection cookies = helper.GetCookies(uri);
- foreach (Cookie cookie in cookies)
- {
- // We don't want to put HttpOnly cookies in the CookieContainer if the system
- // doesn't support the RTHttpBaseProtocolFilter CookieUsageBehavior property.
- // Prior to supporting that, the WinRT HttpClient could not turn off cookie
- // processing. So, it would always be storing all cookies in its internal container.
- // Putting HttpOnly cookies in the .NET CookieContainer would cause problems later
- // when the .NET layer tried to add them on outgoing requests and conflicted with
- // the WinRT internal cookie processing.
- //
- // With support for WinRT CookieUsageBehavior, cookie processing is turned off
- // within the WinRT layer. This allows us to process cookies using only the .NET
- // layer. So, we need to add all applicable cookies that are received to the
- // CookieContainer.
- if (HttpClientHandler.RTCookieUsageBehaviorSupported || !cookie.HttpOnly)
- {
- _handler.CookieContainer.Add(uri, cookie);
- }
- }
- }
- catch (Exception)
- {
- }
- }
- }
- }
- }
- }
-
- private async Task<RTHttpRequestMessage> ConvertRequestAsync(
- HttpRequestMessage request,
- HttpMethod httpMethod,
- bool skipRequestContentIfPresent)
- {
- RTHttpRequestMessage rtRequest = new RTHttpRequestMessage(
- new RTHttpMethod(httpMethod.Method),
- request.RequestUri);
-
- // Add a reference from the WinRT object back to the .NET object.
- rtRequest.Properties.Add(RequestMessageLookupKey, request);
-
- // We can only control the Version on the first request message since the WinRT API
- // has this property designed as a filter/handler property. In addition the overall design
- // of HTTP/2.0 is such that once the first request is using it, all the other requests
- // to the same endpoint will use it as well.
- if (Interlocked.Exchange(ref _filterMaxVersionSet, 1) == 0)
- {
- RTHttpVersion maxVersion;
- if (request.Version == HttpVersion.Version20)
- {
- maxVersion = RTHttpVersion.Http20;
- }
- else if (request.Version == HttpVersion.Version11)
- {
- maxVersion = RTHttpVersion.Http11;
- }
- else if (request.Version == HttpVersion.Version10)
- {
- maxVersion = RTHttpVersion.Http10;
- }
- else
- {
- maxVersion = RTHttpVersion.Http11;
- }
-
- // The default for WinRT HttpBaseProtocolFilter.MaxVersion is HttpVersion.Http20.
- // So, we only have to change it if we don't want HTTP/2.0.
- if (maxVersion != RTHttpVersion.Http20)
- {
- _filter.MaxVersion = maxVersion;
- }
- }
-
- // Headers
- foreach (KeyValuePair<string, IEnumerable<string>> headerPair in request.Headers)
- {
- foreach (string value in headerPair.Value)
- {
- bool success = rtRequest.Headers.TryAppendWithoutValidation(headerPair.Key, value);
- Debug.Assert(success);
- }
- }
-
- // Cookies
- if (_handler.UseCookies)
- {
- string cookieHeader = _handler.CookieContainer.GetCookieHeader(request.RequestUri);
- if (!string.IsNullOrWhiteSpace(cookieHeader))
- {
- bool success = rtRequest.Headers.TryAppendWithoutValidation(HttpKnownHeaderNames.Cookie, cookieHeader);
- Debug.Assert(success);
- }
- }
-
- // Properties
- foreach (KeyValuePair<string, object> propertyPair in request.Properties)
- {
- rtRequest.Properties.Add(propertyPair.Key, propertyPair.Value);
- }
-
- // Content
- if (!skipRequestContentIfPresent && request.Content != null)
- {
- rtRequest.Content = await CreateRequestContentAsync(request, rtRequest.Headers).ConfigureAwait(false);
- }
-
- return rtRequest;
- }
-
- private static async Task<RTIHttpContent> CreateRequestContentAsync(HttpRequestMessage request, HttpRequestHeaderCollection rtHeaderCollection)
- {
- HttpContent content = request.Content;
-
- RTIHttpContent rtContent;
- ArraySegment<byte> buffer;
-
- // If we are buffered already, it is more efficient to send the data directly using the buffer with the
- // WinRT HttpBufferContent class than using HttpStreamContent. This also avoids issues caused by
- // a design limitation in the System.Runtime.WindowsRuntime System.IO.NetFxToWinRtStreamAdapter.
- if (content.TryGetBuffer(out buffer))
- {
- rtContent = new RTHttpBufferContent(buffer.Array.AsBuffer(), (uint)buffer.Offset, (uint)buffer.Count);
- }
- else
- {
- Stream contentStream = await content.ReadAsStreamAsync().ConfigureAwait(false);
-
- if (contentStream is RTIInputStream)
- {
- rtContent = new RTHttpStreamContent((RTIInputStream)contentStream);
- }
- else if (contentStream is MemoryStream)
- {
- var memStream = contentStream as MemoryStream;
- if (memStream.TryGetBuffer(out buffer))
- {
- rtContent = new RTHttpBufferContent(buffer.Array.AsBuffer(), (uint)buffer.Offset, (uint)buffer.Count);
- }
- else
- {
- byte[] byteArray = memStream.ToArray();
- rtContent = new RTHttpBufferContent(byteArray.AsBuffer(), 0, (uint) byteArray.Length);
- }
- }
- else
- {
- rtContent = new RTHttpStreamContent(contentStream.AsInputStream());
- }
- }
-
- // RTHttpBufferContent constructor automatically adds a Content-Length header. RTHttpStreamContent does not.
- // Clear any 'Content-Length' header added by the RTHttp*Content objects. We need to clear that now
- // and decide later whether we need 'Content-Length' or 'Transfer-Encoding: chunked' headers based on the
- // .NET HttpRequestMessage and Content header collections.
- rtContent.Headers.ContentLength = null;
-
- // Deal with conflict between 'Content-Length' vs. 'Transfer-Encoding: chunked' semantics.
- // Desktop System.Net allows both headers to be specified but ends up stripping out
- // 'Content-Length' and using chunked semantics. The WinRT APIs throw an exception so
- // we need to manually strip out the conflicting header to maintain app compatibility.
- if (request.Headers.TransferEncodingChunked.HasValue && request.Headers.TransferEncodingChunked.Value)
- {
- content.Headers.ContentLength = null;
- }
- else
- {
- // Trigger delayed header generation via TryComputeLength. This code is needed due to an outstanding
- // bug in HttpContentHeaders.ContentLength. See GitHub Issue #5523.
- content.Headers.ContentLength = content.Headers.ContentLength;
- }
-
- foreach (KeyValuePair<string, IEnumerable<string>> headerPair in content.Headers)
- {
- foreach (string value in headerPair.Value)
- {
- if (!rtContent.Headers.TryAppendWithoutValidation(headerPair.Key, value))
- {
- // rtContent headers are restricted to a white-list of allowed headers, while System.Net.HttpClient's content headers
- // will allow custom headers. If something is not successfully added to the content headers, try adding them to the standard headers.
- bool success = rtHeaderCollection.TryAppendWithoutValidation(headerPair.Key, value);
- Debug.Assert(success);
- }
- }
- }
- return rtContent;
- }
-
- private static HttpResponseMessage ConvertResponse(RTHttpResponseMessage rtResponse)
- {
- HttpResponseMessage response = new HttpResponseMessage((HttpStatusCode)rtResponse.StatusCode);
- response.ReasonPhrase = rtResponse.ReasonPhrase;
-
- // Version
- if (rtResponse.Version == RTHttpVersion.Http11)
- {
- response.Version = HttpVersion.Version11;
- }
- else if (rtResponse.Version == RTHttpVersion.Http10)
- {
- response.Version = HttpVersion.Version10;
- }
- else if (rtResponse.Version == RTHttpVersion.Http20)
- {
- response.Version = HttpVersion.Version20;
- }
- else
- {
- response.Version = new Version(0, 0);
- }
-
- bool success;
-
- // Headers
- foreach (KeyValuePair<string, string> headerPair in rtResponse.Headers)
- {
- if (headerPair.Key.Equals(HttpKnownHeaderNames.SetCookie, StringComparison.OrdinalIgnoreCase))
- {
- // The Set-Cookie header always comes back with all of the cookies concatenated together.
- // For example if the response contains the following:
- // Set-Cookie A=1
- // Set-Cookie B=2
- // Then we will have a single header KeyValuePair of Key=Set-Cookie, Value=A=1, B=2.
- // However clients expect these headers to be separated(i.e.
- // httpResponseMessage.Headers.GetValues("Set-Cookie") should return two cookies not one
- // concatenated together).
- success = response.Headers.TryAddWithoutValidation(headerPair.Key, CookieHelper.GetCookiesFromHeader(headerPair.Value));
- }
- else
- {
- success = response.Headers.TryAddWithoutValidation(headerPair.Key, headerPair.Value);
- }
-
- Debug.Assert(success);
- }
-
- // Content
- if (rtResponse.Content != null)
- {
- var rtResponseStream = rtResponse.Content.ReadAsInputStreamAsync().AsTask().Result;
- response.Content = new StreamContent(rtResponseStream.AsStreamForRead());
-
- foreach (KeyValuePair<string, string> headerPair in rtResponse.Content.Headers)
- {
- success = response.Content.Headers.TryAddWithoutValidation(headerPair.Key, headerPair.Value);
- Debug.Assert(success);
- }
- }
-
- return response;
- }
- }
-}
+++ /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;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Text;
-using System.Threading;
-
-// The uap #define is used in some source files to indicate we are compiling classes
-// directly into the UWP System.Net.Http.dll implementation assembly in order to use internal class
-// methods. Internal methods are needed in order to map cookie response headers from the WinRT Windows.Web.Http APIs.
-// Windows.Web.Http is used underneath the System.Net.Http classes on .NET Native. Having other similarly
-// named classes would normally conflict with the public System.Net namespace classes.
-// So, we need to move the classes to a different namespace. Those classes are never
-// exposed up to user code so there isn't a problem. In the future, we might expose some of the internal methods
-// as new public APIs and then we can remove this duplicate source code inclusion in the binaries.
-#if uap
-namespace System.Net.Internal
-#else
-namespace System.Net
-#endif
-{
- internal enum CookieVariant
- {
- Unknown,
- Plain,
- Rfc2109,
- Rfc2965,
- Default = Rfc2109
- }
-
- //
- // Cookie class
- //
- // Adheres to RFC 2965
- //
- // Currently, only client-side cookies. The cookie classes know how to
- // parse a set-cookie format string, but not a cookie format string
- // (e.g. "Cookie: $Version=1; name=value; $Path=/foo; $Secure")
- //
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public sealed class Cookie
- {
- internal const int MaxSupportedVersion = 1;
- internal const string CommentAttributeName = "Comment";
- internal const string CommentUrlAttributeName = "CommentURL";
- internal const string DiscardAttributeName = "Discard";
- internal const string DomainAttributeName = "Domain";
- internal const string ExpiresAttributeName = "Expires";
- internal const string MaxAgeAttributeName = "Max-Age";
- internal const string PathAttributeName = "Path";
- internal const string PortAttributeName = "Port";
- internal const string SecureAttributeName = "Secure";
- internal const string VersionAttributeName = "Version";
- internal const string HttpOnlyAttributeName = "HttpOnly";
-
- internal const string SeparatorLiteral = "; ";
- internal const string EqualsLiteral = "=";
- internal const string QuotesLiteral = "\"";
- internal const string SpecialAttributeLiteral = "$";
-
- internal static readonly char[] PortSplitDelimiters = new char[] { ' ', ',', '\"' };
- // Space (' ') should be reserved as well per RFCs, but major web browsers support it and some web sites use it - so we support it too
- internal static readonly char[] Reserved2Name = new char[] { '\t', '\r', '\n', '=', ';', ',' };
- internal static readonly char[] Reserved2Value = new char[] { ';', ',' };
-
- // fields
-
- private string m_comment = string.Empty;
- private Uri m_commentUri = null;
- private CookieVariant m_cookieVariant = CookieVariant.Plain;
- private bool m_discard = false;
- private string m_domain = string.Empty;
- private bool m_domain_implicit = true;
- private DateTime m_expires = DateTime.MinValue;
- private string m_name = string.Empty;
- private string m_path = string.Empty;
- private bool m_path_implicit = true;
- private string m_port = string.Empty;
- private bool m_port_implicit = true;
- private int[] m_port_list = null;
- private bool m_secure = false;
- private bool m_httpOnly = false;
- private DateTime m_timeStamp = DateTime.Now;
- private string m_value = string.Empty;
- private int m_version = 0;
-
- private string m_domainKey = string.Empty;
- internal bool IsQuotedVersion = false;
- internal bool IsQuotedDomain = false;
-
-
- // constructors
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public Cookie()
- {
- }
-
-
- //public Cookie(string cookie) {
- // if ((cookie == null) || (cookie == String.Empty)) {
- // throw new ArgumentException("cookie");
- // }
- // Parse(cookie.Trim());
- // Validate();
- //}
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public Cookie(string name, string value)
- {
- Name = name;
- Value = value;
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public Cookie(string name, string value, string path)
- : this(name, value)
- {
- Path = path;
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public Cookie(string name, string value, string path, string domain)
- : this(name, value, path)
- {
- Domain = domain;
- }
-
- // properties
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public string Comment
- {
- get
- {
- return m_comment;
- }
- set
- {
- if (value == null)
- {
- value = string.Empty;
- }
- m_comment = value;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public Uri CommentUri
- {
- get
- {
- return m_commentUri;
- }
- set
- {
- m_commentUri = value;
- }
- }
-
-
- public bool HttpOnly
- {
- get
- {
- return m_httpOnly;
- }
- set
- {
- m_httpOnly = value;
- }
- }
-
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public bool Discard
- {
- get
- {
- return m_discard;
- }
- set
- {
- m_discard = value;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public string Domain
- {
- get
- {
- return m_domain;
- }
- set
- {
- m_domain = (value == null ? string.Empty : value);
- m_domain_implicit = false;
- m_domainKey = string.Empty; //this will get it value when adding into the Container.
- }
- }
-
- internal bool DomainImplicit
- {
- get
- {
- return m_domain_implicit;
- }
- set
- {
- m_domain_implicit = value;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public bool Expired
- {
- get
- {
- return (m_expires != DateTime.MinValue) && (m_expires.ToLocalTime() <= DateTime.Now);
- }
- set
- {
- if (value == true)
- {
- m_expires = DateTime.Now;
- }
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public DateTime Expires
- {
- get
- {
- return m_expires;
- }
- set
- {
- m_expires = value;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public string Name
- {
- get
- {
- return m_name;
- }
- set
- {
- if (string.IsNullOrEmpty(value) || !InternalSetName(value))
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, "Name", value == null ? "<null>" : value));
- }
- }
- }
-
- internal bool InternalSetName(string value)
- {
- if (string.IsNullOrEmpty(value) || value[0] == '$' || value.IndexOfAny(Reserved2Name) != -1 || value[0] == ' ' || value[value.Length - 1] == ' ')
- {
- m_name = string.Empty;
- return false;
- }
- m_name = value;
- return true;
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public string Path
- {
- get
- {
- return m_path;
- }
- set
- {
- m_path = (value == null ? string.Empty : value);
- m_path_implicit = false;
- }
- }
-
- internal bool Plain
- {
- get
- {
- return Variant == CookieVariant.Plain;
- }
- }
-
- internal Cookie Clone()
- {
- Cookie clonedCookie = new Cookie(m_name, m_value);
-
- //
- // Copy over all the properties from the original cookie
- //
- if (!m_port_implicit)
- {
- clonedCookie.Port = m_port;
- }
- if (!m_path_implicit)
- {
- clonedCookie.Path = m_path;
- }
- clonedCookie.Domain = m_domain;
- //
- // If the domain in the original cookie was implicit, we should preserve that property
- clonedCookie.DomainImplicit = m_domain_implicit;
- clonedCookie.m_timeStamp = m_timeStamp;
- clonedCookie.Comment = m_comment;
- clonedCookie.CommentUri = m_commentUri;
- clonedCookie.HttpOnly = m_httpOnly;
- clonedCookie.Discard = m_discard;
- clonedCookie.Expires = m_expires;
- clonedCookie.Version = m_version;
- clonedCookie.Secure = m_secure;
-
- //
- // The variant is set when we set properties like port/version. So,
- // we should copy over the variant from the original cookie after
- // we set all other properties
- clonedCookie.m_cookieVariant = m_cookieVariant;
-
- return clonedCookie;
- }
-
- private static bool IsDomainEqualToHost(string domain, string host)
- {
- //
- // +1 in the host length is to account for the leading dot in domain
- return (host.Length + 1 == domain.Length) &&
- (string.Compare(host, 0, domain, 1, host.Length, StringComparison.OrdinalIgnoreCase) == 0);
- }
-
- //
- // According to spec we must assume default values for attributes but still
- // keep in mind that we must not include them into the requests.
- // We also check the validity of all attributes based on the version and variant (read RFC)
- //
- // To work properly this function must be called after cookie construction with
- // default (response) URI AND set_default == true
- //
- // Afterwards, the function can be called many times with other URIs and
- // set_default == false to check whether this cookie matches given uri
- //
-
- internal bool VerifySetDefaults(CookieVariant variant, Uri uri, bool isLocalDomain, string localDomain, bool set_default, bool isThrow)
- {
- string host = uri.Host;
- int port = uri.Port;
- string path = uri.AbsolutePath;
- bool valid = true;
-
- if (set_default)
- {
- // Set Variant. If version is zero => reset cookie to Version0 style
- if (Version == 0)
- {
- variant = CookieVariant.Plain;
- }
- else if (Version == 1 && variant == CookieVariant.Unknown)
- {
- //since we don't expose Variant to an app, set it to Default
- variant = CookieVariant.Default;
- }
- m_cookieVariant = variant;
- }
-
- //Check the name
- if (string.IsNullOrEmpty(m_name) || m_name[0] == '$' || m_name.IndexOfAny(Reserved2Name) != -1 || m_name[0] == ' ' || m_name[m_name.Length - 1] == ' ')
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, "Name", m_name == null ? "<null>" : m_name));
- }
- return false;
- }
-
- //Check the value
- if (m_value == null ||
- (!(m_value.Length > 2 && m_value[0] == '\"' && m_value[m_value.Length - 1] == '\"') && m_value.IndexOfAny(Reserved2Value) != -1))
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, "Value", m_value == null ? "<null>" : m_value));
- }
- return false;
- }
-
- //Check Comment syntax
- if (Comment != null && !(Comment.Length > 2 && Comment[0] == '\"' && Comment[Comment.Length - 1] == '\"')
- && (Comment.IndexOfAny(Reserved2Value) != -1))
- {
- if (isThrow)
- throw new CookieException(SR.Format(SR.net_cookie_attribute, CommentAttributeName, Comment));
- return false;
- }
-
- //Check Path syntax
- if (Path != null && !(Path.Length > 2 && Path[0] == '\"' && Path[Path.Length - 1] == '\"')
- && (Path.IndexOfAny(Reserved2Value) != -1))
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, PathAttributeName, Path));
- }
- return false;
- }
-
- //Check/set domain
- // if domain is implicit => assume a) uri is valid, b) just set domain to uri hostname
- if (set_default && m_domain_implicit == true)
- {
- m_domain = host;
- }
- else
- {
- if (!m_domain_implicit)
- {
- // Forwarding note: If Uri.Host is of IP address form then the only supported case
- // is for IMPLICIT domain property of a cookie.
- // The below code (explicit cookie.Domain value) will try to parse Uri.Host IP string
- // as a fqdn and reject the cookie
-
- //aliasing since we might need the KeyValue (but not the original one)
- string domain = m_domain;
-
- //Syntax check for Domain charset plus empty string
- if (!DomainCharsTest(domain))
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, DomainAttributeName, domain == null ? "<null>" : domain));
- }
- return false;
- }
-
- //domain must start with '.' if set explicitly
- if (domain[0] != '.')
- {
- if (!(variant == CookieVariant.Rfc2965 || variant == CookieVariant.Plain))
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, DomainAttributeName, m_domain));
- }
- return false;
- }
- domain = '.' + domain;
- }
-
- int host_dot = host.IndexOf('.');
-
- // First quick check is for pushing a cookie into the local domain
- if (isLocalDomain && string.Equals(localDomain, domain, StringComparison.OrdinalIgnoreCase))
- {
- valid = true;
- }
- else if (domain.IndexOf('.', 1, domain.Length - 2) == -1)
- {
- // A single label domain is valid only if the domain is exactly the same as the host specified in the URI
- if (!IsDomainEqualToHost(domain, host))
- {
- valid = false;
- }
- }
- else if (variant == CookieVariant.Plain)
- {
- // We distinguish between Version0 cookie and other versions on domain issue
- // According to Version0 spec a domain must be just a substring of the hostname
-
- if (!IsDomainEqualToHost(domain, host))
- {
- if (host.Length <= domain.Length ||
- string.Compare(host, host.Length - domain.Length, domain, 0, domain.Length, StringComparison.OrdinalIgnoreCase) != 0)
- {
- valid = false;
- }
- }
- }
- else if (host_dot == -1 ||
- domain.Length != host.Length - host_dot ||
- string.Compare(host, host_dot, domain, 0, domain.Length, StringComparison.OrdinalIgnoreCase) != 0)
- {
- //starting the first dot, the host must match the domain
-
- // for null hosts, the host must match the domain exactly
- if (!IsDomainEqualToHost(domain, host))
- {
- valid = false;
- }
- }
-
- if (valid)
- {
- m_domainKey = domain.ToLowerInvariant();
- }
- }
- else
- {
- // for implicitly set domain AND at the set_default==false time
- // we simply got to match uri.Host against m_domain
- if (!string.Equals(host, m_domain, StringComparison.OrdinalIgnoreCase))
- {
- valid = false;
- }
- }
- if (!valid)
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, DomainAttributeName, m_domain));
- }
- return false;
- }
- }
-
-
- //Check/Set Path
-
- if (set_default && m_path_implicit == true)
- {
- //assuming that uri path is always valid and contains at least one '/'
- switch (m_cookieVariant)
- {
- case CookieVariant.Plain:
- m_path = path;
- break;
- case CookieVariant.Rfc2109:
- m_path = path.Substring(0, path.LastIndexOf('/')); //may be empty
- break;
-
- case CookieVariant.Rfc2965:
- default: //hope future versions will have same 'Path' semantic?
- m_path = path.Substring(0, path.LastIndexOf('/') + 1);
- break;
- }
- }
- else
- {
- //check current path (implicit/explicit) against given uri
- if (!path.StartsWith(CookieParser.CheckQuoted(m_path)))
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, PathAttributeName, m_path));
- }
- return false;
- }
- }
-
- // set the default port if Port attribute was present but had no value
- if (set_default && (m_port_implicit == false && m_port.Length == 0))
- {
- m_port_list = new int[1] { port };
- }
-
- if (m_port_implicit == false)
- {
- // Port must match against the one from the uri
- valid = false;
- foreach (int p in m_port_list)
- {
- if (p == port)
- {
- valid = true;
- break;
- }
- }
- if (!valid)
- {
- if (isThrow)
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, PortAttributeName, m_port));
- }
- return false;
- }
- }
- return true;
- }
-
- //Very primitive test to make sure that the name does not have illegal characters
- // As per RFC 952 (relaxed on first char could be a digit and string can have '_')
- private static bool DomainCharsTest(string name)
- {
- if (name == null || name.Length == 0)
- {
- return false;
- }
- for (int i = 0; i < name.Length; ++i)
- {
- char ch = name[i];
- if (!(
- (ch >= '0' && ch <= '9') ||
- (ch == '.' || ch == '-') ||
- (ch >= 'a' && ch <= 'z') ||
- (ch >= 'A' && ch <= 'Z') ||
- (ch == '_')
- ))
- return false;
- }
- return true;
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public string Port
- {
- get
- {
- return m_port;
- }
- set
- {
- m_port_implicit = false;
- if ((value == null || value.Length == 0))
- {
- //"Port" is present but has no value.
- m_port = string.Empty;
- }
- else
- {
- // Parse port list
- if (value[0] != '\"' || value[value.Length - 1] != '\"')
- {
- throw new CookieException(SR.Format(SR.net_cookie_attribute, PortAttributeName, value));
- }
- string[] ports = value.Split(PortSplitDelimiters);
-
- List<int> portList = new List<int>();
- int port;
-
- for (int i = 0; i < ports.Length; ++i)
- {
- // Skip spaces
- if (ports[i] != string.Empty)
- {
- if (!int.TryParse(ports[i], out port))
- throw new CookieException(SR.Format(SR.net_cookie_attribute, PortAttributeName, value));
- // valid values for port 0 - 0xFFFF
- if ((port < 0) || (port > 0xFFFF))
- throw new CookieException(SR.Format(SR.net_cookie_attribute, PortAttributeName, value));
- portList.Add(port);
- }
- }
- m_port_list = portList.ToArray();
- m_port = value;
- m_version = MaxSupportedVersion;
- m_cookieVariant = CookieVariant.Rfc2965;
- }
- }
- }
-
-
- internal int[] PortList
- {
- get
- {
- //It must be null if Port Attribute was omitted in the response
- return m_port_list;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public bool Secure
- {
- get
- {
- return m_secure;
- }
- set
- {
- m_secure = value;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public DateTime TimeStamp
- {
- get
- {
- return m_timeStamp;
- }
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public string Value
- {
- get
- {
- return m_value;
- }
- set
- {
- m_value = (value == null ? string.Empty : value);
- }
- }
-
- internal CookieVariant Variant
- {
- get
- {
- return m_cookieVariant;
- }
- set
- {
- // only set by HttpListenerRequest::Cookies_get()
-#if !uap
- if (NetEventSource.IsEnabled) NetEventSource.Info(this, $"value:{value}");
-#endif
- m_cookieVariant = value;
- }
- }
-
- // m_domainKey member is set internally in VerifySetDefaults()
- // If it is not set then verification function was not called
- // and this should never happen
- internal string DomainKey
- {
- get
- {
- return m_domain_implicit ? Domain : m_domainKey;
- }
- }
-
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public int Version
- {
- get
- {
- return m_version;
- }
- set
- {
- if (value < 0)
- {
- throw new ArgumentOutOfRangeException(nameof(value));
- }
- m_version = value;
- if (value > 0 && m_cookieVariant < CookieVariant.Rfc2109)
- {
- m_cookieVariant = CookieVariant.Rfc2109;
- }
- }
- }
-
- // methods
-
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public override bool Equals(object comparand)
- {
- if (!(comparand is Cookie))
- {
- return false;
- }
-
- Cookie other = (Cookie)comparand;
-
- return (string.Equals(Name, other.Name, StringComparison.OrdinalIgnoreCase))
- && (string.Equals(Value, other.Value, StringComparison.Ordinal))
- && (string.Equals(Path, other.Path, StringComparison.Ordinal))
- && (string.Equals(Domain, other.Domain, StringComparison.OrdinalIgnoreCase))
- && (Version == other.Version)
- ;
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public override int GetHashCode()
- {
- //
- //string hashString = Name + "=" + Value + ";" + Path + "; " + Domain + "; " + Version;
- //int hash = 0;
- //
- //foreach (char ch in hashString) {
- // hash = unchecked(hash << 1 ^ (int)ch);
- //}
- //return hash;
- return (Name + "=" + Value + ";" + Path + "; " + Domain + "; " + Version).GetHashCode();
- }
-
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public override string ToString()
- {
- var sb = new StringBuilder();
- ToString(sb);
- return sb.ToString();
- }
-
- internal void ToString(StringBuilder sb)
- {
- int beforeLength = sb.Length;
-
- // Add the Cookie version if necessary.
- if (Version != 0)
- {
- sb.Append(SpecialAttributeLiteral + VersionAttributeName + EqualsLiteral); // const strings
- if (IsQuotedVersion) sb.Append('"');
- sb.Append(m_version.ToString(NumberFormatInfo.InvariantInfo));
- if (IsQuotedVersion) sb.Append('"');
- sb.Append(SeparatorLiteral);
- }
-
- // Add the Cookie Name=Value pair.
- sb.Append(Name).Append(EqualsLiteral).Append(Value);
-
- if (!Plain)
- {
- // Add the Path if necessary.
- if (!m_path_implicit && m_path.Length > 0)
- {
- sb.Append(SeparatorLiteral + SpecialAttributeLiteral + PathAttributeName + EqualsLiteral); // const strings
- sb.Append(m_path);
- }
-
- // Add the Domain if necessary.
- if (!m_domain_implicit && m_domain.Length > 0)
- {
- sb.Append(SeparatorLiteral + SpecialAttributeLiteral + DomainAttributeName + EqualsLiteral); // const strings
- if (IsQuotedDomain) sb.Append('"');
- sb.Append(m_domain);
- if (IsQuotedDomain) sb.Append('"');
- }
- }
-
- // Add the Port if necessary.
- if (!m_port_implicit)
- {
- sb.Append(SeparatorLiteral + SpecialAttributeLiteral + PortAttributeName); // const strings
- if (m_port.Length > 0)
- {
- sb.Append(EqualsLiteral);
- sb.Append(m_port);
- }
- }
-
- // Check to see whether the only thing we added was "=", and if so,
- // remove it so that we leave the StringBuilder unchanged in contents.
- int afterLength = sb.Length;
- if (afterLength == (1 + beforeLength) && sb[beforeLength] == '=')
- {
- sb.Length = beforeLength;
- }
- }
-
- internal string ToServerString()
- {
- string result = Name + EqualsLiteral + Value;
- if (m_comment != null && m_comment.Length > 0)
- {
- result += SeparatorLiteral + CommentAttributeName + EqualsLiteral + m_comment;
- }
- if (m_commentUri != null)
- {
- result += SeparatorLiteral + CommentUrlAttributeName + EqualsLiteral + QuotesLiteral + m_commentUri.ToString() + QuotesLiteral;
- }
- if (m_discard)
- {
- result += SeparatorLiteral + DiscardAttributeName;
- }
- if (!m_domain_implicit && m_domain != null && m_domain.Length > 0)
- {
- result += SeparatorLiteral + DomainAttributeName + EqualsLiteral + m_domain;
- }
- if (Expires != DateTime.MinValue)
- {
- int seconds = (int)(Expires.ToLocalTime() - DateTime.Now).TotalSeconds;
- if (seconds < 0)
- {
- // This means that the cookie has already expired. Set Max-Age to 0
- // so that the client will discard the cookie immediately
- seconds = 0;
- }
- result += SeparatorLiteral + MaxAgeAttributeName + EqualsLiteral + seconds.ToString(NumberFormatInfo.InvariantInfo);
- }
- if (!m_path_implicit && m_path != null && m_path.Length > 0)
- {
- result += SeparatorLiteral + PathAttributeName + EqualsLiteral + m_path;
- }
- if (!Plain && !m_port_implicit && m_port != null && m_port.Length > 0)
- {
- // QuotesLiteral are included in m_port
- result += SeparatorLiteral + PortAttributeName + EqualsLiteral + m_port;
- }
- if (m_version > 0)
- {
- result += SeparatorLiteral + VersionAttributeName + EqualsLiteral + m_version.ToString(NumberFormatInfo.InvariantInfo);
- }
- return result == EqualsLiteral ? null : result;
- }
-
- //private void Validate() {
- // if ((m_name == String.Empty) && (m_value == String.Empty)) {
- // throw new CookieException();
- // }
- // if ((m_name != String.Empty) && (m_name[0] == '$')) {
- // throw new CookieException();
- // }
- //}
-
-#if DEBUG
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- internal void Dump()
- {
-#if !uap
- if (NetEventSource.IsEnabled)
- NetEventSource.Info(this,
- "Cookie: " + ToString() + "->\n"
- + "\tComment = " + Comment + "\n"
- + "\tCommentUri = " + CommentUri + "\n"
- + "\tDiscard = " + Discard + "\n"
- + "\tDomain = " + Domain + "\n"
- + "\tExpired = " + Expired + "\n"
- + "\tExpires = " + Expires + "\n"
- + "\tName = " + Name + "\n"
- + "\tPath = " + Path + "\n"
- + "\tPort = " + Port + "\n"
- + "\tSecure = " + Secure + "\n"
- + "\tTimeStamp = " + TimeStamp + "\n"
- + "\tValue = " + Value + "\n"
- + "\tVariant = " + Variant + "\n"
- + "\tVersion = " + Version + "\n"
- + "\tHttpOnly = " + HttpOnly + "\n"
- );
-#endif
- }
-#endif
- }
-
- internal enum CookieToken
- {
- // state types
-
- Nothing,
- NameValuePair, // X=Y
- Attribute, // X
- EndToken, // ';'
- EndCookie, // ','
- End, // EOLN
- Equals,
-
- // value types
-
- Comment,
- CommentUrl,
- CookieName,
- Discard,
- Domain,
- Expires,
- MaxAge,
- Path,
- Port,
- Secure,
- HttpOnly,
- Unknown,
- Version
- }
-
- //
- // CookieTokenizer
- //
- // Used to split a single or multi-cookie (header) string into individual
- // tokens
- //
-
- internal class CookieTokenizer
- {
- // fields
-
- private bool m_eofCookie;
- private int m_index;
- private int m_length;
- private string m_name;
- private bool m_quoted;
- private int m_start;
- private CookieToken m_token;
- private int m_tokenLength;
- private string m_tokenStream;
- private string m_value;
- private int m_cookieStartIndex;
- private int m_cookieLength;
-
- // constructors
-
- internal CookieTokenizer(string tokenStream)
- {
- m_length = tokenStream.Length;
- m_tokenStream = tokenStream;
- }
-
- // properties
-
- internal bool EndOfCookie
- {
- get
- {
- return m_eofCookie;
- }
- set
- {
- m_eofCookie = value;
- }
- }
-
- internal bool Eof
- {
- get
- {
- return m_index >= m_length;
- }
- }
-
- internal string Name
- {
- get
- {
- return m_name;
- }
- set
- {
- m_name = value;
- }
- }
-
- internal bool Quoted
- {
- get
- {
- return m_quoted;
- }
- set
- {
- m_quoted = value;
- }
- }
-
- internal CookieToken Token
- {
- get
- {
- return m_token;
- }
- set
- {
- m_token = value;
- }
- }
-
- internal string Value
- {
- get
- {
- return m_value;
- }
- set
- {
- m_value = value;
- }
- }
-
- // methods
-
- //
- // GetCookieString
- //
- // Gets the full string of the cookie
- //
-
- internal string GetCookieString()
- {
- return m_tokenStream.Substring(m_cookieStartIndex, m_cookieLength).Trim();
- }
-
- //
- // Extract
- //
- // extract the current token
- //
-
- internal string Extract()
- {
- string tokenString = string.Empty;
-
- if (m_tokenLength != 0)
- {
- tokenString = m_tokenStream.Substring(m_start, m_tokenLength);
- if (!Quoted)
- {
- tokenString = tokenString.Trim();
- }
- }
- return tokenString;
- }
-
- //
- // FindNext
- //
- // Find the start and length of the next token. The token is terminated
- // by one of:
- //
- // - end-of-line
- // - end-of-cookie: unquoted comma separates multiple cookies
- // - end-of-token: unquoted semi-colon
- // - end-of-name: unquoted equals
- //
- // Inputs:
- // <argument> ignoreComma
- // true if parsing doesn't stop at a comma. This is only true when
- // we know we're parsing an original cookie that has an expires=
- // attribute, because the format of the time/date used in expires
- // is:
- // Wdy, dd-mmm-yyyy HH:MM:SS GMT
- //
- // <argument> ignoreEquals
- // true if parsing doesn't stop at an equals sign. The LHS of the
- // first equals sign is an attribute name. The next token may
- // include one or more equals signs. E.g.,
- //
- // SESSIONID=ID=MSNx45&q=33
- //
- // Outputs:
- // <member> m_index
- // incremented to the last position in m_tokenStream contained by
- // the current token
- //
- // <member> m_start
- // incremented to the start of the current token
- //
- // <member> m_tokenLength
- // set to the length of the current token
- //
- // Assumes:
- // Nothing
- //
- // Returns:
- // type of CookieToken found:
- //
- // End - end of the cookie string
- // EndCookie - end of current cookie in (potentially) a
- // multi-cookie string
- // EndToken - end of name=value pair, or end of an attribute
- // Equals - end of name=
- //
- // Throws:
- // Nothing
- //
-
- internal CookieToken FindNext(bool ignoreComma, bool ignoreEquals)
- {
- m_tokenLength = 0;
- m_start = m_index;
- while ((m_index < m_length) && char.IsWhiteSpace(m_tokenStream[m_index]))
- {
- ++m_index;
- ++m_start;
- }
-
- CookieToken token = CookieToken.End;
- int increment = 1;
-
- if (!Eof)
- {
- if (m_tokenStream[m_index] == '"')
- {
- Quoted = true;
- ++m_index;
- bool quoteOn = false;
- while (m_index < m_length)
- {
- char currChar = m_tokenStream[m_index];
- if (!quoteOn && currChar == '"')
- break;
- if (quoteOn)
- quoteOn = false;
- else if (currChar == '\\')
- quoteOn = true;
- ++m_index;
- }
- if (m_index < m_length)
- {
- ++m_index;
- }
- m_tokenLength = m_index - m_start;
- increment = 0;
- // if we are here, reset ignoreComma
- // In effect, we ignore everything after quoted string till next delimiter
- ignoreComma = false;
- }
- while ((m_index < m_length)
- && (m_tokenStream[m_index] != ';')
- && (ignoreEquals || (m_tokenStream[m_index] != '='))
- && (ignoreComma || (m_tokenStream[m_index] != ',')))
- {
- // Fixing 2 things:
- // 1) ignore day of week in cookie string
- // 2) revert ignoreComma once meet it, so won't miss the next cookie)
- if (m_tokenStream[m_index] == ',')
- {
- m_start = m_index + 1;
- m_tokenLength = -1;
- ignoreComma = false;
- }
- ++m_index;
- m_tokenLength += increment;
- }
- if (!Eof)
- {
- switch (m_tokenStream[m_index])
- {
- case ';':
- token = CookieToken.EndToken;
- break;
-
- case '=':
- token = CookieToken.Equals;
- break;
-
- default:
- m_cookieLength = m_index - m_cookieStartIndex;
- token = CookieToken.EndCookie;
- break;
- }
- ++m_index;
- }
-
- if (Eof)
- {
- m_cookieLength = m_index - m_cookieStartIndex;
- }
- }
- return token;
- }
-
- //
- // Next
- //
- // Get the next cookie name/value or attribute
- //
- // Cookies come in the following formats:
- //
- // 1. Version0
- // Set-Cookie: [<name>][=][<value>]
- // [; expires=<date>]
- // [; path=<path>]
- // [; domain=<domain>]
- // [; secure]
- // Cookie: <name>=<value>
- //
- // Notes: <name> and/or <value> may be blank
- // <date> is the RFC 822/1123 date format that
- // incorporates commas, e.g.
- // "Wednesday, 09-Nov-99 23:12:40 GMT"
- //
- // 2. RFC 2109
- // Set-Cookie: 1#{
- // <name>=<value>
- // [; comment=<comment>]
- // [; domain=<domain>]
- // [; max-age=<seconds>]
- // [; path=<path>]
- // [; secure]
- // ; Version=<version>
- // }
- // Cookie: $Version=<version>
- // 1#{
- // ; <name>=<value>
- // [; path=<path>]
- // [; domain=<domain>]
- // }
- //
- // 3. RFC 2965
- // Set-Cookie2: 1#{
- // <name>=<value>
- // [; comment=<comment>]
- // [; commentURL=<comment>]
- // [; discard]
- // [; domain=<domain>]
- // [; max-age=<seconds>]
- // [; path=<path>]
- // [; ports=<portlist>]
- // [; secure]
- // ; Version=<version>
- // }
- // Cookie: $Version=<version>
- // 1#{
- // ; <name>=<value>
- // [; path=<path>]
- // [; domain=<domain>]
- // [; port="<port>"]
- // }
- // [Cookie2: $Version=<version>]
- //
- // Inputs:
- // <argument> first
- // true if this is the first name/attribute that we have looked for
- // in the cookie stream
- //
- // Outputs:
- //
- // Assumes:
- // Nothing
- //
- // Returns:
- // type of CookieToken found:
- //
- // - Attribute
- // - token was single-value. May be empty. Caller should check
- // Eof or EndCookie to determine if any more action needs to
- // be taken
- //
- // - NameValuePair
- // - Name and Value are meaningful. Either may be empty
- //
- // Throws:
- // Nothing
- //
-
- internal CookieToken Next(bool first, bool parseResponseCookies)
- {
- Reset();
-
- if (first)
- {
- m_cookieStartIndex = m_index;
- m_cookieLength = 0;
- }
-
- CookieToken terminator = FindNext(false, false);
- if (terminator == CookieToken.EndCookie)
- {
- EndOfCookie = true;
- }
-
- if ((terminator == CookieToken.End) || (terminator == CookieToken.EndCookie))
- {
- if ((Name = Extract()).Length != 0)
- {
- Token = TokenFromName(parseResponseCookies);
- return CookieToken.Attribute;
- }
- return terminator;
- }
- Name = Extract();
- if (first)
- {
- Token = CookieToken.CookieName;
- }
- else
- {
- Token = TokenFromName(parseResponseCookies);
- }
- if (terminator == CookieToken.Equals)
- {
- terminator = FindNext(!first && (Token == CookieToken.Expires), true);
- if (terminator == CookieToken.EndCookie)
- {
- EndOfCookie = true;
- }
- Value = Extract();
- return CookieToken.NameValuePair;
- }
- else
- {
- return CookieToken.Attribute;
- }
- }
-
- //
- // Reset
- //
- // set up this tokenizer for finding the next name/value pair or
- // attribute, or end-of-[token, cookie, or line]
- //
-
- internal void Reset()
- {
- m_eofCookie = false;
- m_name = string.Empty;
- m_quoted = false;
- m_start = m_index;
- m_token = CookieToken.Nothing;
- m_tokenLength = 0;
- m_value = string.Empty;
- }
-
- private struct RecognizedAttribute
- {
- private string m_name;
- private CookieToken m_token;
-
- internal RecognizedAttribute(string name, CookieToken token)
- {
- m_name = name;
- m_token = token;
- }
-
- internal CookieToken Token
- {
- get
- {
- return m_token;
- }
- }
-
- internal bool IsEqualTo(string value)
- {
- return string.Equals(m_name, value, StringComparison.OrdinalIgnoreCase);
- }
- }
-
- //
- // recognized attributes in order of expected commonality
- //
-
- private static RecognizedAttribute[] RecognizedAttributes = {
- new RecognizedAttribute(Cookie.PathAttributeName, CookieToken.Path),
- new RecognizedAttribute(Cookie.MaxAgeAttributeName, CookieToken.MaxAge),
- new RecognizedAttribute(Cookie.ExpiresAttributeName, CookieToken.Expires),
- new RecognizedAttribute(Cookie.VersionAttributeName, CookieToken.Version),
- new RecognizedAttribute(Cookie.DomainAttributeName, CookieToken.Domain),
- new RecognizedAttribute(Cookie.SecureAttributeName, CookieToken.Secure),
- new RecognizedAttribute(Cookie.DiscardAttributeName, CookieToken.Discard),
- new RecognizedAttribute(Cookie.PortAttributeName, CookieToken.Port),
- new RecognizedAttribute(Cookie.CommentAttributeName, CookieToken.Comment),
- new RecognizedAttribute(Cookie.CommentUrlAttributeName, CookieToken.CommentUrl),
- new RecognizedAttribute(Cookie.HttpOnlyAttributeName, CookieToken.HttpOnly),
- };
-
- private static RecognizedAttribute[] RecognizedServerAttributes = {
- new RecognizedAttribute('$' + Cookie.PathAttributeName, CookieToken.Path),
- new RecognizedAttribute('$' + Cookie.VersionAttributeName, CookieToken.Version),
- new RecognizedAttribute('$' + Cookie.DomainAttributeName, CookieToken.Domain),
- new RecognizedAttribute('$' + Cookie.PortAttributeName, CookieToken.Port),
- new RecognizedAttribute('$' + Cookie.HttpOnlyAttributeName, CookieToken.HttpOnly),
- };
-
- internal CookieToken TokenFromName(bool parseResponseCookies)
- {
- if (!parseResponseCookies)
- {
- for (int i = 0; i < RecognizedServerAttributes.Length; ++i)
- {
- if (RecognizedServerAttributes[i].IsEqualTo(Name))
- {
- return RecognizedServerAttributes[i].Token;
- }
- }
- }
- else
- {
- for (int i = 0; i < RecognizedAttributes.Length; ++i)
- {
- if (RecognizedAttributes[i].IsEqualTo(Name))
- {
- return RecognizedAttributes[i].Token;
- }
- }
- }
- return CookieToken.Unknown;
- }
- }
-
- //
- // CookieParser
- //
- // Takes a cookie header, makes cookies
- //
-
- internal class CookieParser
- {
- // fields
-
- private CookieTokenizer m_tokenizer;
- private Cookie m_savedCookie;
-
- // constructors
-
- internal CookieParser(string cookieString)
- {
- m_tokenizer = new CookieTokenizer(cookieString);
- }
-
- // properties
-
- // methods
-
- // Gets the next cookie string
- //
- // Inputs:
- // Nothing
- //
- // Outputs:
- // Nothing
- //
- // Assumes:
- // Nothing
- //
- // Returns:
- // The string for the cookie
- //
- // Throws:
- // Nothing
- //
-
- internal string GetString() {
- bool first = true;
-
- if (m_tokenizer.Eof)
- {
- return null;
- }
-
- do {
- m_tokenizer.Next(first, true);
- first = false;
- } while (!m_tokenizer.Eof && !m_tokenizer.EndOfCookie);
-
- return m_tokenizer.GetCookieString();
- }
-
- //
- // Get
- //
- // Gets the next cookie
- //
- // Inputs:
- // Nothing
- //
- // Outputs:
- // Nothing
- //
- // Assumes:
- // Nothing
- //
- // Returns:
- // new cookie object, or null if there's no more
- //
- // Throws:
- // Nothing
- //
-
- internal Cookie Get()
- {
- Cookie cookie = null;
-
- // only first occurrence of an attribute value must be counted
- bool commentSet = false;
- bool commentUriSet = false;
- bool domainSet = false;
- bool expiresSet = false;
- bool pathSet = false;
- bool portSet = false; //special case as it may have no value in header
- bool versionSet = false;
- bool secureSet = false;
- bool discardSet = false;
-
- do
- {
- CookieToken token = m_tokenizer.Next(cookie == null, true);
- if (cookie == null && (token == CookieToken.NameValuePair || token == CookieToken.Attribute))
- {
- cookie = new Cookie();
- if (cookie.InternalSetName(m_tokenizer.Name) == false)
- {
- //will be rejected
- cookie.InternalSetName(string.Empty);
- }
- cookie.Value = m_tokenizer.Value;
- }
- else
- {
- switch (token)
- {
- case CookieToken.NameValuePair:
- switch (m_tokenizer.Token)
- {
- case CookieToken.Comment:
- if (!commentSet)
- {
- commentSet = true;
- cookie.Comment = m_tokenizer.Value;
- }
- break;
-
- case CookieToken.CommentUrl:
- if (!commentUriSet)
- {
- commentUriSet = true;
- Uri parsed;
- if (Uri.TryCreate(CheckQuoted(m_tokenizer.Value), UriKind.Absolute, out parsed))
- {
- cookie.CommentUri = parsed;
- }
- }
- break;
-
- case CookieToken.Domain:
- if (!domainSet)
- {
- domainSet = true;
- cookie.Domain = CheckQuoted(m_tokenizer.Value);
- cookie.IsQuotedDomain = m_tokenizer.Quoted;
- }
- break;
-
- case CookieToken.Expires:
- if (!expiresSet)
- {
- expiresSet = true;
-
- DateTime expires;
- if (DateTime.TryParse(CheckQuoted(m_tokenizer.Value),
- CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out expires))
- {
- cookie.Expires = expires;
- }
- else
- {
- //this cookie will be rejected
- cookie.InternalSetName(string.Empty);
- }
- }
- break;
-
- case CookieToken.MaxAge:
- if (!expiresSet)
- {
- expiresSet = true;
- int parsed;
- if (int.TryParse(CheckQuoted(m_tokenizer.Value), out parsed))
- {
- cookie.Expires = DateTime.Now.AddSeconds((double)parsed);
- }
- else
- {
- //this cookie will be rejected
- cookie.InternalSetName(string.Empty);
- }
- }
- break;
-
- case CookieToken.Path:
- if (!pathSet)
- {
- pathSet = true;
- cookie.Path = m_tokenizer.Value;
- }
- break;
-
- case CookieToken.Port:
- if (!portSet)
- {
- portSet = true;
- try
- {
- cookie.Port = m_tokenizer.Value;
- }
- catch
- {
- //this cookie will be rejected
- cookie.InternalSetName(string.Empty);
- }
- }
- break;
-
- case CookieToken.Version:
- if (!versionSet)
- {
- versionSet = true;
- int parsed;
- if (int.TryParse(CheckQuoted(m_tokenizer.Value), out parsed))
- {
- cookie.Version = parsed;
- cookie.IsQuotedVersion = m_tokenizer.Quoted;
- }
- else
- {
- //this cookie will be rejected
- cookie.InternalSetName(string.Empty);
- }
- }
- break;
- }
- break;
-
- case CookieToken.Attribute:
- switch (m_tokenizer.Token)
- {
- case CookieToken.Discard:
- if (!discardSet)
- {
- discardSet = true;
- cookie.Discard = true;
- }
- break;
-
- case CookieToken.Secure:
- if (!secureSet)
- {
- secureSet = true;
- cookie.Secure = true;
- }
- break;
-
- case CookieToken.HttpOnly:
- cookie.HttpOnly = true;
- break;
-
- case CookieToken.Port:
- if (!portSet)
- {
- portSet = true;
- cookie.Port = string.Empty;
- }
- break;
- }
- break;
- }
- }
- } while (!m_tokenizer.Eof && !m_tokenizer.EndOfCookie);
- return cookie;
- }
-
- // twin parsing method, different enough that it's better to split it into
- // a different method
- internal Cookie GetServer()
- {
- Cookie cookie = m_savedCookie;
- m_savedCookie = null;
-
- // only first occurrence of an attribute value must be counted
- bool domainSet = false;
- bool pathSet = false;
- bool portSet = false; //special case as it may have no value in header
-
- do
- {
- bool first = cookie == null || cookie.Name == null || cookie.Name.Length == 0;
- CookieToken token = m_tokenizer.Next(first, false);
-
- if (first && (token == CookieToken.NameValuePair || token == CookieToken.Attribute))
- {
- if (cookie == null)
- {
- cookie = new Cookie();
- }
- if (cookie.InternalSetName(m_tokenizer.Name) == false)
- {
- //will be rejected
- cookie.InternalSetName(string.Empty);
- }
- cookie.Value = m_tokenizer.Value;
- }
- else
- {
- switch (token)
- {
- case CookieToken.NameValuePair:
- switch (m_tokenizer.Token)
- {
- case CookieToken.Domain:
- if (!domainSet)
- {
- domainSet = true;
- cookie.Domain = CheckQuoted(m_tokenizer.Value);
- cookie.IsQuotedDomain = m_tokenizer.Quoted;
- }
- break;
-
- case CookieToken.Path:
- if (!pathSet)
- {
- pathSet = true;
- cookie.Path = m_tokenizer.Value;
- }
- break;
-
- case CookieToken.Port:
- if (!portSet)
- {
- portSet = true;
- try
- {
- cookie.Port = m_tokenizer.Value;
- }
- catch (CookieException)
- {
- //this cookie will be rejected
- cookie.InternalSetName(string.Empty);
- }
- }
- break;
-
- case CookieToken.Version:
- // this is a new cookie, this token is for the next cookie.
- m_savedCookie = new Cookie();
- int parsed;
- if (int.TryParse(m_tokenizer.Value, out parsed))
- {
- m_savedCookie.Version = parsed;
- }
- return cookie;
-
- case CookieToken.Unknown:
- // this is a new cookie, the token is for the next cookie.
- m_savedCookie = new Cookie();
- if (m_savedCookie.InternalSetName(m_tokenizer.Name) == false)
- {
- //will be rejected
- m_savedCookie.InternalSetName(string.Empty);
- }
- m_savedCookie.Value = m_tokenizer.Value;
- return cookie;
- }
- break;
-
- case CookieToken.Attribute:
- switch (m_tokenizer.Token)
- {
- case CookieToken.Port:
- if (!portSet)
- {
- portSet = true;
- cookie.Port = string.Empty;
- }
- break;
- }
- break;
- }
- }
- } while (!m_tokenizer.Eof && !m_tokenizer.EndOfCookie);
- return cookie;
- }
-
- internal static string CheckQuoted(string value)
- {
- if (value.Length < 2 || value[0] != '\"' || value[value.Length - 1] != '\"')
- return value;
-
- return value.Length == 2 ? string.Empty : value.Substring(1, value.Length - 2);
- }
- }
-}
+++ /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.Diagnostics.CodeAnalysis;
-
-// The uap #define is used in some source files to indicate we are compiling classes
-// directly into the UWP System.Net.Http.dll implementation assembly in order to use internal class
-// methods. Internal methods are needed in order to map cookie response headers from the WinRT Windows.Web.Http APIs.
-// Windows.Web.Http is used underneath the System.Net.Http classes on .NET Native. Having other similarly
-// named classes would normally conflict with the public System.Net namespace classes.
-// So, we need to move the classes to a different namespace. Those classes are never
-// exposed up to user code so there isn't a problem. In the future, we might expose some of the internal methods
-// as new public APIs and then we can remove this duplicate source code inclusion in the binaries.
-#if uap
-namespace System.Net.Internal
-#else
-namespace System.Net
-#endif
-{
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public class CookieException : FormatException
- {
- /// <devdoc>
- /// <para>[To be supplied.]</para>
- /// </devdoc>
- public CookieException() : base()
- {
- }
-
- internal CookieException(string message) : base(message)
- {
- }
-
- internal CookieException(string message, Exception inner) : base(message, inner)
- {
- }
- }
-}
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
{
using Configuration = System.Net.Test.Common.Configuration;
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP will send default credentials based on manifest settings")]
[PlatformSpecific(TestPlatforms.Windows)]
public abstract class DefaultCredentialsTest : HttpClientHandlerTestBase
{
}, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose();
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[OuterLoop("Uses external server")]
[Fact]
public void SendAsync_ExpectedDiagnosticSynchronousExceptionActivityLogging()
// Getting the Task first from the .SendAsync() call also tests
// that the exception comes from the async Task path.
Task t = handler.SendAsync(null);
- if (PlatformDetection.IsUap)
+ if (PlatformDetection.IsInAppContainer)
{
await Assert.ThrowsAsync<HttpRequestException>(() => t);
}
from contentMode in Enum.GetValues(typeof(LoopbackServer.ContentMode)).Cast<LoopbackServer.ContentMode>()
select new object[] { responseHeadersRead, contentMode };
- [ActiveIssue(30052, TargetFrameworkMonikers.Uap)]
[Theory]
[MemberData(nameof(ResponseHeadersRead_SynchronizationContextNotUsedByHandler_MemberData))]
public async Task ResponseHeadersRead_SynchronizationContextNotUsedByHandler(bool responseHeadersRead, LoopbackServer.ContentMode contentMode)
{
using Configuration = System.Net.Test.Common.Configuration;
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Tests would need to be rewritten due to behavior differences with WinRT")]
public abstract class HttpClientHandler_Authentication_Test : HttpClientHandlerTestBase
{
private const string Username = "testusername";
}
}
- [ActiveIssue(30063, TargetFrameworkMonikers.Uap)] // fails due to TE header
[Theory]
[InlineData(300)]
[InlineData(301)]
}
}
- [ActiveIssue(32647, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses external server")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task GetAsync_AllowAutoRedirectTrue_RedirectToUriWithParams_RequestMsgUriSet(Configuration.Http.RemoteServer remoteServer)
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not currently supported on UAP")]
[OuterLoop("Uses external server")]
[Theory]
[InlineData(3, 2)]
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Doesn't handle fragments according to https://tools.ietf.org/html/rfc7231#section-7.1.2")]
[Theory]
[InlineData("#origFragment", "", "#origFragment", false)]
[InlineData("#origFragment", "", "#origFragment", true)]
}
}
- [ActiveIssue(32647, TargetFrameworkMonikers.Uap)]
[Theory, MemberData(nameof(RemoteServersMemberData))]
[OuterLoop("Uses external server")]
public async Task GetAsync_CredentialIsNetworkCredentialUriRedirect_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer)
}
}
- [ActiveIssue(32647, TargetFrameworkMonikers.Uap)]
[Theory, MemberData(nameof(RemoteServersMemberData))]
[OuterLoop("Uses external server")]
public async Task HttpClientHandler_CredentialIsNotCredentialCacheAfterRedirect_StatusCodeOK(Configuration.Http.RemoteServer remoteServer)
credentialCache.Add(uri, "Basic", _credential);
HttpClientHandler handler = CreateHttpClientHandler();
- if (PlatformDetection.IsUap)
+ if (PlatformDetection.IsInAppContainer)
{
- // UAP does not support CredentialCache for Credentials.
+ // UWP does not support CredentialCache for Credentials.
Assert.Throws<PlatformNotSupportedException>(() => handler.Credentials = credentialCache);
}
else
}
}
- [ActiveIssue(29802, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses external server")]
[Theory, MemberData(nameof(RemoteServersAndRedirectStatusCodes))]
public async Task DefaultHeaders_SetCredentials_ClearedOnRedirect(Configuration.Http.RemoteServer remoteServer, int statusCode)
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Test needs to be rewritten to work on UAP due to WinRT differences")]
[Theory]
[MemberData(nameof(TwoBoolsAndCancellationMode))]
public async Task GetAsync_CancelDuringResponseBodyReceived_Buffered_TaskCanceledQuickly(bool chunkedTransfer, bool connectionClose, CancellationMode mode)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // [ActiveIssue(38547)]
[MemberData(nameof(ThreeBools))]
public async Task GetAsync_CancelDuringResponseBodyReceived_Unbuffered_TaskCanceledQuickly(bool chunkedTransfer, bool connectionClose, bool readOrCopyToAsync)
{
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "cancellation timing is different on UAP, sensitive to race conditions")]
[InlineData(CancellationMode.CancelPendingRequests, false)]
[InlineData(CancellationMode.DisposeHttpClient, false)]
[InlineData(CancellationMode.CancelPendingRequests, true)]
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT stack can't set MaxConnectionsPerServer < 2")]
[ConditionalFact]
public async Task MaxConnectionsPerServer_WaitingConnectionsAreCancelable()
{
[MemberData(nameof(PostAsync_Cancel_CancellationTokenPassedToContent_MemberData))]
public async Task PostAsync_Cancel_CancellationTokenPassedToContent(HttpContent content, CancellationTokenSource cancellationTokenSource)
{
- if (IsUapHandler)
- {
- // HttpHandlerToFilter doesn't flow the token into the request body.
- return;
- }
-
await LoopbackServerFactory.CreateClientAndServerAsync(
async uri =>
{
return;
}
- // UAP HTTP stack caches connections per-process. This causes interference when these tests run in
- // the same process as the other tests. Each test needs to be isolated to its own process.
- // See dicussion: https://github.com/dotnet/corefx/issues/21945
- RemoteExecutor.Invoke((certIndexString, expectedStatusCodeString, useSocketsHttpHandlerString, useHttp2String) =>
- {
- X509Certificate2 clientCert = null;
+ string useSocketsHttpHandlerString = UseSocketsHttpHandler.ToString();
+ string useHttp2String = UseHttp2.ToString();
+ X509Certificate2 clientCert = null;
- // Get client certificate. RemoteInvoke doesn't allow easy marshaling of complex types.
- // So we have to select the certificate at this point in the test execution.
- if (certIndexString == "1")
- {
- // This is a valid client cert since it has an EKU with a ClientAuthentication OID.
- clientCert = Configuration.Certificates.GetClientCertificate();
- }
- else if (certIndexString == "2")
- {
- // This is a valid client cert since it has no EKU thus all usages are permitted.
- clientCert = Configuration.Certificates.GetNoEKUCertificate();
- }
- else if (certIndexString == "3")
- {
- // This is an invalid client cert since it has an EKU but is missing ClientAuthentication OID.
- clientCert = Configuration.Certificates.GetServerCertificate();
- }
+ // Get client certificate. RemoteInvoke doesn't allow easy marshaling of complex types.
+ // So we have to select the certificate at this point in the test execution.
+ if (certIndex == 1)
+ {
+ // This is a valid client cert since it has an EKU with a ClientAuthentication OID.
+ clientCert = Configuration.Certificates.GetClientCertificate();
+ }
+ else if (certIndex == 2)
+ {
+ // This is a valid client cert since it has no EKU thus all usages are permitted.
+ clientCert = Configuration.Certificates.GetNoEKUCertificate();
+ }
+ else if (certIndex == 3)
+ {
+ // This is an invalid client cert since it has an EKU but is missing ClientAuthentication OID.
+ clientCert = Configuration.Certificates.GetServerCertificate();
+ }
- Assert.NotNull(clientCert);
+ Assert.NotNull(clientCert);
- var statusCode = (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), expectedStatusCodeString);
- HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String);
- handler.ClientCertificates.Add(clientCert);
- using (HttpClient client = CreateHttpClient(handler, useHttp2String))
- {
- var request = new HttpRequestMessage();
- request.RequestUri = new Uri(Configuration.Http.EchoClientCertificateRemoteServer);
+ HttpClientHandler handler = CreateHttpClientHandler(useSocketsHttpHandlerString, useHttp2String);
+ handler.ClientCertificates.Add(clientCert);
+ using (HttpClient client = CreateHttpClient(handler, useHttp2String))
+ {
+ var request = new HttpRequestMessage();
+ request.RequestUri = new Uri(Configuration.Http.EchoClientCertificateRemoteServer);
- // Issue #35239. Force HTTP/1.1.
- request.Version = new Version(1,1);
- HttpResponseMessage response = client.SendAsync(request).GetAwaiter().GetResult(); // need a 4-arg overload of RemoteInvoke that returns a Task
- Assert.Equal(statusCode, response.StatusCode);
+ // Issue #35239. Force HTTP/1.1.
+ request.Version = new Version(1,1);
+ HttpResponseMessage response = client.SendAsync(request).GetAwaiter().GetResult(); // need a 4-arg overload of RemoteInvoke that returns a Task
+ Assert.Equal(expectedStatusCode, response.StatusCode);
- if (statusCode == HttpStatusCode.OK)
- {
- string body = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); // need a 4-arg overload of RemoteInvoke that returns a Task
- byte[] bytes = Convert.FromBase64String(body);
- var receivedCert = new X509Certificate2(bytes);
- Assert.Equal(clientCert, receivedCert);
- }
+ if (expectedStatusCode == HttpStatusCode.OK)
+ {
+ string body = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); // need a 4-arg overload of RemoteInvoke that returns a Task
+ byte[] bytes = Convert.FromBase64String(body);
+ var receivedCert = new X509Certificate2(bytes);
+ Assert.Equal(clientCert, receivedCert);
}
- }, certIndex.ToString(), expectedStatusCode.ToString(), UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose();
+ }
}
- [ActiveIssue(30056, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses GC and waits for finalizers")]
[Theory]
[InlineData(6, false)]
}
[ActiveIssue(37336)]
- [ActiveIssue(30056, TargetFrameworkMonikers.Uap)]
[Theory]
[InlineData(ClientCertificateOption.Manual)]
[InlineData(ClientCertificateOption.Automatic)]
});
}
- [ActiveIssue(30051, TargetFrameworkMonikers.Uap)]
[Fact]
public async Task GetAsync_AddMultipleCookieHeaders_CookiesSent()
{
});
}
- [ActiveIssue(30051, TargetFrameworkMonikers.Uap)]
[ConditionalFact]
public async Task GetAsync_SetCookieContainerAndMultipleCookieHeaders_BothCookiesSent()
{
});
}
- [ActiveIssue(30051, TargetFrameworkMonikers.Uap)] // fails to remove cookie
[Fact]
public async Task GetAsync_ReceiveSetCookieHeader_CookieRemoved()
{
});
}
- [ActiveIssue(30051, TargetFrameworkMonikers.Uap)] // only adds one cookie
[Fact]
public async Task GetAsync_ReceiveInvalidSetCookieHeader_ValidCookiesAdded()
{
});
}
- [ActiveIssue(30050, TargetFrameworkMonikers.Uap)]
[Fact]
public async Task GetAsyncWithBasicAuth_ReceiveSetCookie_CookieSent()
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Fact]
public async Task ProxyExplicitlyProvided_DefaultCredentials_Ignored()
{
{
using Configuration = System.Net.Test.Common.Configuration;
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP connection management behavior is different due to WinRT")]
public abstract class HttpClientHandler_MaxConnectionsPerServer_Test : HttpClientHandlerTestBase
{
public HttpClientHandler_MaxConnectionsPerServer_Test(ITestOutputHelper output) : base(output) { }
{
public HttpClientHandler_MaxResponseHeadersLength_Test(ITestOutputHelper output) : base(output) { }
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not currently supported on UAP")]
[Theory]
[InlineData(0)]
[InlineData(-1)]
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not currently supported on UAP")]
[Theory]
[InlineData(1)]
[InlineData(65)]
server => server.AcceptConnectionSendResponseAndCloseAsync());
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not currently supported on UAP")]
[OuterLoop] // TODO: Issue #11345
[Fact]
public async Task InfiniteSingleHeader_ThrowsException()
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not currently supported on UAP")]
[OuterLoop] // TODO: Issue #11345
[Theory, MemberData(nameof(ResponseWithManyHeadersData))]
public async Task ThresholdExceeded_ThrowsException(string responseHeaders, int? maxResponseHeadersLength, bool shouldSucceed)
{
using Configuration = System.Net.Test.Common.Configuration;
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
public abstract class HttpClientHandler_Proxy_Test : HttpClientHandlerTestBase
{
public HttpClientHandler_Proxy_Test(ITestOutputHelper output) : base(output) { }
public HttpClientHandler_ServerCertificates_Test(ITestOutputHelper output) : base(output) { }
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)]
- public void Ctor_ExpectedDefaultPropertyValues_UapPlatform()
- {
- using (HttpClientHandler handler = CreateHttpClientHandler())
- {
- Assert.Null(handler.ServerCertificateCustomValidationCallback);
- Assert.True(handler.CheckCertificateRevocationList);
- }
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
- public void Ctor_ExpectedDefaultValues_NotUapPlatform()
+ public void Ctor_ExpectedDefaultValues()
{
using (HttpClientHandler handler = CreateHttpClientHandler())
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP won't send requests through a custom proxy")]
[OuterLoop("Uses external server")]
[Fact]
public async Task UseCallback_HaveCredsAndUseAuthenticatedCustomProxyAndPostToSecureServer_Success()
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP won't send requests through a custom proxy")]
[OuterLoop("Uses external server")]
[Fact]
public async Task UseCallback_HaveNoCredsAndUseAuthenticatedCustomProxyAndPostToSecureServer_ProxyAuthenticationRequiredStatusCode()
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP doesn't allow revocation checking to be turned off")]
[OuterLoop("Uses external server")]
[ConditionalFact(nameof(ClientSupportsDHECipherSuites))]
public async Task NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds()
}
}
- [ActiveIssue(30054, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses external server")]
[Theory]
[MemberData(nameof(CertificateValidationServersAndExpectedPolicies))]
try
{
- if (PlatformDetection.IsUap)
- {
- // UAP HTTP stack caches connections per-process. This causes interference when these tests run in
- // the same process as the other tests. Each test needs to be isolated to its own process.
- // See dicussion: https://github.com/dotnet/corefx/issues/21945
- RemoteExecutor.Invoke((remoteUrl, remoteExpectedErrors, useSocketsHttpHandlerString, useHttp2String) =>
- {
- UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(
- remoteUrl,
- useSocketsHttpHandlerString,
- useHttp2String,
- (SslPolicyErrors)Enum.Parse(typeof(SslPolicyErrors), remoteExpectedErrors)).Wait();
- }, url, expectedErrors.ToString(), UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose();
- }
- else
- {
- await UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(url, UseSocketsHttpHandler.ToString(), UseHttp2.ToString(), expectedErrors);
- }
+ await UseCallback_BadCertificate_ExpectedPolicyErrors_Helper(url, UseSocketsHttpHandler.ToString(), UseHttp2.ToString(), expectedErrors);
}
catch (HttpRequestException e) when (e.InnerException?.GetType().Name == "WinHttpException" &&
e.InnerException.HResult == SEC_E_BUFFER_TOO_SMALL &&
// Validate the ChannelBinding object exists.
ChannelBinding channelBinding = content.ChannelBinding;
- if (PlatformDetection.IsUap)
- {
- // UAP currently doesn't expose channel binding information.
- Assert.Null(channelBinding);
- }
- else
- {
- Assert.NotNull(channelBinding);
+ Assert.NotNull(channelBinding);
- // Validate the ChannelBinding's validity.
- if (BackendSupportsCustomCertificateHandling)
+ // Validate the ChannelBinding's validity.
+ if (BackendSupportsCustomCertificateHandling)
+ {
+ Assert.False(channelBinding.IsInvalid, "Expected valid binding");
+ Assert.NotEqual(IntPtr.Zero, channelBinding.DangerousGetHandle());
+
+ // Validate the ChannelBinding's description.
+ string channelBindingDescription = channelBinding.ToString();
+ Assert.NotNull(channelBindingDescription);
+ Assert.NotEmpty(channelBindingDescription);
+ Assert.True((channelBindingDescription.Length + 1) % 3 == 0, $"Unexpected length {channelBindingDescription.Length}");
+ for (int i = 0; i < channelBindingDescription.Length; i++)
{
- Assert.False(channelBinding.IsInvalid, "Expected valid binding");
- Assert.NotEqual(IntPtr.Zero, channelBinding.DangerousGetHandle());
-
- // Validate the ChannelBinding's description.
- string channelBindingDescription = channelBinding.ToString();
- Assert.NotNull(channelBindingDescription);
- Assert.NotEmpty(channelBindingDescription);
- Assert.True((channelBindingDescription.Length + 1) % 3 == 0, $"Unexpected length {channelBindingDescription.Length}");
- for (int i = 0; i < channelBindingDescription.Length; i++)
+ char c = channelBindingDescription[i];
+ if (i % 3 == 2)
{
- char c = channelBindingDescription[i];
- if (i % 3 == 2)
- {
- Assert.Equal(' ', c);
- }
- else
- {
- Assert.True((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F'), $"Expected hex, got {c}");
- }
+ Assert.Equal(' ', c);
+ }
+ else
+ {
+ Assert.True((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F'), $"Expected hex, got {c}");
}
}
- else
- {
- // Backend doesn't support getting the details to create the CBT.
- Assert.True(channelBinding.IsInvalid, "Expected invalid binding");
- Assert.Equal(IntPtr.Zero, channelBinding.DangerousGetHandle());
- Assert.Null(channelBinding.ToString());
- }
+ }
+ else
+ {
+ // Backend doesn't support getting the details to create the CBT.
+ Assert.True(channelBinding.IsInvalid, "Expected invalid binding");
+ Assert.Equal(IntPtr.Zero, channelBinding.DangerousGetHandle());
+ Assert.Null(channelBinding.ToString());
}
}
}
{
using Configuration = System.Net.Test.Common.Configuration;
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SslProtocols not supported on UAP")]
public abstract partial class HttpClientHandler_SslProtocols_Test : HttpClientHandlerTestBase
{
public HttpClientHandler_SslProtocols_Test(ITestOutputHelper output) : base(output) { }
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[Fact]
- public void Ctor_ExpectedDefaultPropertyValues_NotUapPlatform()
+ public void Ctor_ExpectedDefaultPropertyValues()
{
using (HttpClientHandler handler = CreateHttpClientHandler())
{
}
}
- [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsUap))]
- public void Ctor_ExpectedDefaultPropertyValues_UapPlatform()
- {
- using (HttpClientHandler handler = CreateHttpClientHandler())
- {
- Assert.True(handler.CheckCertificateRevocationList);
- Assert.Equal(0, handler.MaxRequestContentBufferSize);
- Assert.Equal(-1, handler.MaxResponseHeadersLength);
- Assert.True(handler.PreAuthenticate);
- Assert.Equal(SslProtocols.None, handler.SslProtocols);
- Assert.False(handler.SupportsProxy);
- Assert.False(handler.SupportsRedirectConfiguration);
- }
- }
-
[Fact]
public void Credentials_SetGet_Roundtrips()
{
}
[OuterLoop("Uses external servers")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP will send default credentials based on other criteria.")]
[Theory]
[InlineData(false)]
[InlineData(true)]
}
}
- [ActiveIssue(22158, TargetFrameworkMonikers.Uap)]
[ConditionalFact]
public async Task GetAsync_IPv6LinkLocalAddressUri_Success()
{
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Theory]
[InlineData("[::1234]")]
[InlineData("[::1234]:8080")]
Assert.True(connectionAccepted);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Theory]
[InlineData("1.2.3.4")]
[InlineData("1.2.3.4:8080")]
yield return new object[] { "[::1234]" };
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Theory]
[OuterLoop("Uses external server")]
[MemberData(nameof(DestinationHost_MemberData))]
Assert.True(connectionAccepted);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Fact]
[OuterLoop("Uses external server")]
public async Task ProxyTunnelRequest_PortSpecified_NotStrippedOffInUri()
Assert.True(connectionAccepted);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP stack doesn't support .Proxy property")]
[Theory]
[InlineData(true)]
[InlineData(false)]
from useSsl in new[] { true, false }
select new object[] { address, useSsl };
- [ActiveIssue(30056, TargetFrameworkMonikers.Uap)]
[ConditionalTheory]
[MemberData(nameof(SecureAndNonSecure_IPBasedUri_MemberData))]
public async Task GetAsync_SecureAndNonSecureIPBasedUri_CorrectlyFormatted(IPAddress address, bool useSsl)
Assert.True(connectionAccepted);
}
- [ActiveIssue(32647, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses external server")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task GetAsync_ServerNeedsBasicAuthAndSetDefaultCredentials_StatusCodeUnauthorized(Configuration.Http.RemoteServer remoteServer)
[OuterLoop("Uses external server")]
[Fact]
- public void GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized()
+ public async Task GetAsync_ServerNeedsAuthAndNoCredential_StatusCodeUnauthorized()
{
- // UAP HTTP stack caches connections per-process. This causes interference when these tests run in
- // the same process as the other tests. Each test needs to be isolated to its own process.
- // See dicussion: https://github.com/dotnet/corefx/issues/21945
- RemoteExecutor.Invoke(async (useSocketsHttpHandlerString, useHttp2String) =>
+ using (HttpClient client = CreateHttpClient(UseSocketsHttpHandler.ToString(), UseHttp2.ToString()))
{
- using (HttpClient client = CreateHttpClient(useSocketsHttpHandlerString, useHttp2String))
+ Uri uri = Configuration.Http.RemoteHttp11Server.BasicAuthUriForCreds(userName: Username, password: Password);
+ using (HttpResponseMessage response = await client.GetAsync(uri))
{
- Uri uri = Configuration.Http.RemoteHttp11Server.BasicAuthUriForCreds(userName: Username, password: Password);
- using (HttpResponseMessage response = await client.GetAsync(uri))
- {
- Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
- }
+ Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
}
- }, UseSocketsHttpHandler.ToString(), UseHttp2.ToString()).Dispose();
+ }
}
[Theory]
}
[OuterLoop("Uses external server")]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[Theory]
[MemberData(nameof(RemoteServersAndHeaderEchoUrisMemberData))]
public async Task GetAsync_RequestHeadersAddCustomHeaders_HeaderAndEmptyValueSent(Configuration.Http.RemoteServer remoteServer, Uri uri)
public static IEnumerable<object[]> RemoteServersAndHeaderEchoUrisMemberData() => RemoteServersAndHeaderEchoUris().Select(x => new object[] { x.remoteServer, x.uri });
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP HTTP ignores invalid headers")]
[Theory]
[InlineData(":")]
[InlineData("\x1234: \x5678")]
[InlineData(true, true)]
public async Task GetAsync_IncompleteData_ThrowsHttpRequestException(bool failDuringHeaders, bool getString)
{
- if (IsWinHttpHandler || IsUapHandler)
+ if (IsWinHttpHandler)
{
// [ActiveIssue(39136)]
return;
Assert.Equal("en.wikipedia.org:8080", requestData.GetSingleHeaderValue("Host"));
Assert.Equal("trailers, deflate", requestData.GetSingleHeaderValue("TE"));
Assert.Equal("HTTPS/1.3, IRC/6.9, RTA/x11, websocket", requestData.GetSingleHeaderValue("Upgrade"));
- if (!IsNetfxHandler && !PlatformDetection.IsUap)
+ if (!IsNetfxHandler && !PlatformDetection.IsInAppContainer)
{
Assert.Equal("keep-alive", requestData.GetSingleHeaderValue("Proxy-Connection"));
}
from dribble in new[] { false, true }
select new object[] { newline, fold, dribble };
- [ActiveIssue(30060, TargetFrameworkMonikers.Uap)]
[ConditionalTheory]
[MemberData(nameof(GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly_MemberData))]
public async Task GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly(string newline, string fold, bool dribble)
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Test hangs due to bugs in WinRT HTTP stack")]
[Theory]
[InlineData("")] // missing size
[InlineData(" ")] // missing size
[InlineData(1000)]
public async Task GetAsync_StatusCodeOutOfRange_ExpectedException(int statusCode)
{
- if (PlatformDetection.IsUap && statusCode == 99)
+ if (PlatformDetection.IsInAppContainer && statusCode == 99)
{
// UAP platform allows this status code due to historical reasons.
return;
}
}
- [ActiveIssue(29802, TargetFrameworkMonikers.Uap)]
[Fact]
public async Task GetAsync_ExpectContinueTrue_NoContent_StillSendsHeader()
{
});
}
- [ActiveIssue(30061, TargetFrameworkMonikers.Uap)]
[Theory]
[InlineData(false)]
[InlineData(true)]
readFunc: (buffer, offset, count) => throw error,
readAsyncFunc: (buffer, offset, count, cancellationToken) => syncFailure ? throw error : Task.Delay(1).ContinueWith<int>(_ => throw error)));
- if (PlatformDetection.IsUap)
+ if (PlatformDetection.IsInAppContainer)
{
HttpRequestException requestException = await Assert.ThrowsAsync<HttpRequestException>(() => client.PostAsync(uri, content));
Assert.Same(error, requestException.InnerException);
}
}
- [ActiveIssue(22191, TargetFrameworkMonikers.Uap)]
[OuterLoop("Takes several seconds")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task PostAsync_RedirectWith307_LargePayload(Configuration.Http.RemoteServer remoteServer)
new HttpMethod(method),
serverUri) { Version = VersionFromUseHttp2 };
- if (PlatformDetection.IsUap && method == "TRACE")
+ if (PlatformDetection.IsInAppContainer && method == "TRACE")
{
HttpRequestException ex = await Assert.ThrowsAsync<HttpRequestException>(() => client.SendAsync(request));
Assert.IsType<PlatformNotSupportedException>(ex.InnerException);
}
}
- [ActiveIssue(30057, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses external server")]
[Theory]
[InlineData("12345678910", 0)]
string method,
Uri serverUri)
{
- if (PlatformDetection.IsUap && method == "TRACE")
+ if (PlatformDetection.IsInAppContainer && method == "TRACE")
{
// UAP platform doesn't allow a content body with this HTTP verb.
// It will throw an exception HttpRequestException/COMException
#endregion
#region Version tests
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP does not allow HTTP/1.0 requests.")]
[OuterLoop("Uses external server")]
[Fact]
public async Task SendAsync_RequestVersion10_ServerReceivesVersion10Request()
protected virtual bool UseSocketsHttpHandler => true;
protected virtual bool UseHttp2 => false;
- protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows && !PlatformDetection.IsUap;
+ protected bool IsWinHttpHandler => !UseSocketsHttpHandler && PlatformDetection.IsWindows;
protected bool IsCurlHandler => !UseSocketsHttpHandler && !PlatformDetection.IsWindows;
protected bool IsNetfxHandler => false;
- protected bool IsUapHandler => PlatformDetection.IsWindows && PlatformDetection.IsUap;
public HttpClientHandlerTestBase(ITestOutputHelper output)
{
{
HttpClientHandler handler;
- if (PlatformDetection.IsUap || useSocketsHttpHandler)
+ if (PlatformDetection.IsInAppContainer || useSocketsHttpHandler)
{
handler = new HttpClientHandler();
}
{
using (var client = new HttpClient())
{
- Assert.Equal(PlatformDetection.IsUap ? new Version(2, 0) : new Version(1, 1), client.DefaultRequestVersion);
+ Assert.Equal(PlatformDetection.IsInAppContainer ? new Version(2, 0) : new Version(1, 1), client.DefaultRequestVersion);
Assert.Same(client.DefaultRequestVersion, client.DefaultRequestVersion);
}
}
public HttpProtocolTests(ITestOutputHelper output) : base(output) { }
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Uap does not support 1.0")]
[Fact]
public async Task GetAsync_RequestVersion10_Success()
{
}, new LoopbackServer.Options { StreamWrapper = GetStream });
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Uap ignores response version if not 1.0 or 1.1")]
[Theory]
[InlineData(0)]
[InlineData(1)]
}, new LoopbackServer.Options { StreamWrapper = GetStream_ClientDisconnectOk });
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Uap ignores response version if not 1.0 or 1.1")]
[Theory]
[InlineData(2, 0)]
[InlineData(2, 1)]
yield return "HTTP/X.Y.Z 200 OK";
// Only pass on .NET Core Windows & SocketsHttpHandler.
- if (PlatformDetection.IsNetCore && !PlatformDetection.IsUap && PlatformDetection.IsWindows)
+ if (PlatformDetection.IsNetCore && !PlatformDetection.IsInAppContainer && PlatformDetection.IsWindows)
{
yield return "HTTP/0.1 200 OK";
yield return "HTTP/3.5 200 OK";
yield return "HTTP/1.1 ";
}
- // Skip these test cases on UAP since the behavior is different.
- if (!PlatformDetection.IsUap)
- {
- yield return "HTTP/1.1 200OK";
- yield return "HTTP/1.1 20c";
- yield return "HTTP/1.1 23";
- yield return "HTTP/1.1 2bc";
- }
+ yield return "HTTP/1.1 200OK";
+ yield return "HTTP/1.1 20c";
+ yield return "HTTP/1.1 23";
+ yield return "HTTP/1.1 2bc";
- // Skip these test cases on UAP & CurlHandler since the behavior is different.
- if (!PlatformDetection.IsUap && PlatformDetection.IsWindows)
+ // Skip these test cases on CurlHandler since the behavior is different.
+ if (PlatformDetection.IsWindows)
{
yield return "NOTHTTP/1.1";
yield return "HTTP 1.1 200 OK";
});
}
- [ActiveIssue(29802, TargetFrameworkMonikers.Uap)]
[Theory]
[InlineData("get", "GET")]
[InlineData("head", "HEAD")]
{
public class HttpRequestMessageTest : HttpClientHandlerTestBase
{
- private readonly Version _expectedRequestMessageVersion = PlatformDetection.IsUap ? new Version(2,0) : new Version(1, 1);
+ private readonly Version _expectedRequestMessageVersion = PlatformDetection.IsInAppContainer ? new Version(2,0) : new Version(1, 1);
public HttpRequestMessageTest(ITestOutputHelper output) : base(output) { }
[InlineData("HEAD")]
public async Task HttpRequest_BodylessMethod_NoContentLength(string method)
{
- if (IsWinHttpHandler || IsNetfxHandler || IsUapHandler)
+ if (IsWinHttpHandler || IsNetfxHandler)
{
// Some platform handlers differ but we don't take it as failure.
return;
{
private static readonly string s_simpleContent = "Hello World\r\n";
- // Retry logic is supported by SocketsHttpHandler, CurlHandler, uap, and netfx. Only WinHttp does not support.
+ // Retry logic is supported by SocketsHttpHandler, CurlHandler and netfx. Only WinHttp does not support.
private bool IsRetrySupported => !IsWinHttpHandler;
public HttpRetryProtocolTests(ITestOutputHelper output) : base(output) { }
});
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT HTTP stack doesn't support Expect: 100-continue")]
[Fact]
public async Task PostAsyncExpect100Continue_FailsAfterContentSendStarted_Throws()
{
public IdnaProtocolTests(ITestOutputHelper output) : base(output) { }
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP does not support custom proxies.")]
[Theory]
[MemberData(nameof(InternationalHostNames))]
public async Task InternationalUrl_UsesIdnaEncoding_Success(string hostname)
public PostScenarioTest(ITestOutputHelper output) : base(output) { }
- [ActiveIssue(30057, TargetFrameworkMonikers.Uap)]
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task PostRewindableStreamContentMultipleTimes_StreamContentFullySent(Configuration.Http.RemoteServer remoteServer)
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT behaves differently and will use 'Content-Length' semantics")]
public async Task PostUsingNoSpecifiedSemantics_UsesChunkedSemantics(Configuration.Http.RemoteServer remoteServer)
{
await PostHelper(remoteServer, ExpectedContent, new StringContent(ExpectedContent),
useContentLengthUpload: true, useChunkedEncodingUpload: false);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT based handler has PreAuthenticate always true")]
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task PostRewindableContentUsingAuth_NoPreAuthenticate_Success(Configuration.Http.RemoteServer remoteServer)
await PostUsingAuthHelper(remoteServer, ExpectedContent, content, credential, false);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT based handler has PreAuthenticate always true")]
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task PostNonRewindableContentUsingAuth_NoPreAuthenticate_ThrowsHttpRequestException(Configuration.Http.RemoteServer remoteServer)
PostUsingAuthHelper(remoteServer, ExpectedContent, content, credential, preAuthenticate: false));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT based handler has PreAuthenticate always true")]
[OuterLoop("Uses external servers")]
[Theory, MemberData(nameof(RemoteServersMemberData))]
public async Task PostNonRewindableContentUsingAuth_PreAuthenticate_Success(Configuration.Http.RemoteServer remoteServer)
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WinRT based Http stack ignores these errors")]
[Theory]
[InlineData(TransferType.ContentLength, TransferError.ContentLengthTooLarge)]
[InlineData(TransferType.Chunked, TransferError.MissingChunkTerminator)]
namespace System.Net.Http.Functional.Tests
{
[ActiveIssue(26539)] // Flaky test
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "HttpsTestServer not compatible on UAP")]
public abstract class SchSendAuxRecordHttpTest : HttpClientHandlerTestBase
{
public SchSendAuxRecordHttpTest(ITestOutputHelper output) : base(output) { }
public bool IsBypassed(Uri host) => true;
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP does not support custom proxies.")]
[Fact]
public async Task ProxyAuth_SameConnection_Succeeds()
{
<DefineConstants>$(DefineConstants);SYSNETHTTP_NO_OPENSSL</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs" Condition="'$(TargetsUnix)' == 'true'">
<Compile Include="ThrowingContent.cs" />
<Compile Include="Watchdog.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup>
<Compile Include="CustomContent.netcore.cs" />
<Compile Include="HPackTest.cs" />
<Compile Include="HttpClientTest.netcoreapp.cs" />
<Link>Common\System\Net\Http\HuffmanEncoder.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Reference Include="Windows" />
- <Compile Include="MultiInterfaceNonRewindableReadOnlyStream.cs" />
- <Compile Include="MultiInterfaceReadOnlyStream.cs" />
- <Compile Include="MultiInterfaceStreamContent.cs" />
- <Compile Include="PostScenarioUWPTest.cs" />
- <Compile Include="XUnitAssemblyAttributes.cs" />
- </ItemGroup>
<ItemGroup>
<PackageReference Include="System.Net.TestData" Version="$(SystemNetTestDataPackageVersion)" />
</ItemGroup>
FieldInfo socketsHttpHandlerField = typeof(HttpClientHandler).GetField("_socketsHttpHandler", BindingFlags.NonPublic | BindingFlags.Instance);
if (socketsHttpHandlerField == null)
{
- // Not using .NET Core implementation, i.e. could be .NET Framework or UAP.
+ // Not using .NET Core implementation, i.e. could be .NET Framework.
return;
}
+++ /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 Xunit;
-
-// [ActiveIssue(35002)]: Disable parallel execution of System.Net.Http.FunctionalTests on UAP test runs
-[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true)]
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.HttpListener.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ForceManagedImplementation>false</ForceManagedImplementation>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
- <!-- Default configurations to help VS understand the options -->
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
</Compile>
<Compile Include="System\Net\Windows\CookieExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(ForceManagedImplementation)' != 'true' AND '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(ForceManagedImplementation)' != 'true'">
<Compile Include="System\Net\Windows\HttpListener.Windows.cs" />
<Compile Include="System\Net\Windows\HttpListenerContext.Windows.cs" />
<Compile Include="System\Net\Windows\HttpListenerRequest.Windows.cs" />
<Link>Common\Interop\Windows\SspiCli\SSPIWrapper.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsUnix)' == 'true' OR '$(ForceManagedImplementation)' == 'true' OR ('$(TargetsWindows)' == 'true' AND '$(TargetGroup)' == 'uap')">
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true' OR '$(ForceManagedImplementation)' == 'true'">
<Compile Include="System\Net\Managed\HttpEndPointListener.cs" />
<Compile Include="System\Net\Managed\HttpEndPointManager.cs" />
<Compile Include="System\Net\Managed\HttpConnection.cs" />
{
if (s_toServerStringFunc == null)
{
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- s_toServerStringFunc = (Func<Cookie, string>)typeof(Cookie).GetMethod("ToServerString", flags).CreateDelegate(typeof(Func<Cookie, string>));
+ s_toServerStringFunc = (Func<Cookie, string>)typeof(Cookie).GetMethod("ToServerString", BindingFlags.Instance | BindingFlags.NonPublic).CreateDelegate(typeof(Func<Cookie, string>));
}
Debug.Assert(s_toServerStringFunc != null, "Reflection failed for Cookie.ToServerString().");
{
if (s_cloneFunc == null)
{
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- s_cloneFunc = (Func<Cookie, Cookie>)typeof(Cookie).GetMethod("Clone", flags).CreateDelegate(typeof(Func<Cookie, Cookie>));
+ s_cloneFunc = (Func<Cookie, Cookie>)typeof(Cookie).GetMethod("Clone", BindingFlags.Instance | BindingFlags.NonPublic).CreateDelegate(typeof(Func<Cookie, Cookie>));
}
Debug.Assert(s_cloneFunc != null, "Reflection failed for Cookie.Clone().");
{
if (s_getVariantFunc == null)
{
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- s_getVariantFunc = (Func<Cookie, CookieVariant>)typeof(Cookie).GetProperty("Variant", flags).GetGetMethod(true).CreateDelegate(typeof(Func<Cookie, CookieVariant>));
+ s_getVariantFunc = (Func<Cookie, CookieVariant>)typeof(Cookie).GetProperty("Variant", BindingFlags.Instance | BindingFlags.NonPublic).GetGetMethod(true).CreateDelegate(typeof(Func<Cookie, CookieVariant>));
}
Debug.Assert(s_getVariantFunc != null, "Reflection failed for Cookie.Variant.");
{
if (s_internalAddFunc == null)
{
- BindingFlags flags = BindingFlags.Instance;
-#if uap
- flags |= BindingFlags.Public;
-#else
- flags |= BindingFlags.NonPublic;
-#endif
- s_internalAddFunc = (Func<CookieCollection, Cookie, bool, int>)typeof(CookieCollection).GetMethod("InternalAdd", flags).CreateDelegate(typeof(Func<CookieCollection, Cookie, bool, int>));
+ s_internalAddFunc = (Func<CookieCollection, Cookie, bool, int>)typeof(CookieCollection).GetMethod("InternalAdd", BindingFlags.Instance | BindingFlags.NonPublic).CreateDelegate(typeof(Func<CookieCollection, Cookie, bool, int>));
}
Debug.Assert(s_internalAddFunc != null, "Reflection failed for CookieCollection.InternalAdd().");
netcoreapp-Windows_NT;
netcoreapp-OSX;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
namespace System.Net.Tests
{
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano.
- [ActiveIssue(18784, TargetFrameworkMonikers.Uap)]
public class HttpListenerResponseHeadersTests : HttpListenerResponseTestBase
{
private static string s_longString = new string('a', ushort.MaxValue + 1);
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // httpsys component missing in Nano.
public class HttpListenerWebSocketTests : IDisposable
{
- public static bool PartialMessagesSupported => PlatformDetection.ClientWebSocketPartialMessagesSupported;
public static bool IsNotWindows7 { get; } = !PlatformDetection.IsWindows7;
public static bool IsNotWindows7AndIsWindowsImplementation => IsNotWindows7 && Helpers.IsWindowsImplementation;
Client.Dispose();
}
- [ConditionalTheory(nameof(PartialMessagesSupported), nameof(IsNotWindows7))]
+ [ConditionalTheory(nameof(IsNotWindows7))]
[InlineData(WebSocketMessageType.Text, false)]
[InlineData(WebSocketMessageType.Binary, false)]
[InlineData(WebSocketMessageType.Text, true)]
await Assert.ThrowsAsync<ObjectDisposedException>(() => context.WebSocket.SendAsync(new ArraySegment<byte>(new byte[10]), WebSocketMessageType.Text, false, new CancellationToken()));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "WebSocket partial send is not supported on UAP. (#22053)")]
[ConditionalTheory(nameof(IsNotWindows7))]
[InlineData(WebSocketMessageType.Text, false)]
[InlineData(WebSocketMessageType.Binary, false)]
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="GetContextHelper.cs" />
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Mail.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AlternateViewCollectionTest.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Base64EncodingTest.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.NameResolution.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Net.NameResolution</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Net\Dns.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="System\Net\NameResolutionPal.Windows.cs" />
- <Compile Include="System\Net\NameResolutionPal.Win32.cs" Condition="'$(TargetGroup)' != 'uap'" />
- <Compile Include="System\Net\NameResolutionPal.Uap.cs" Condition="'$(TargetGroup)' == 'uap'" />
+ <Compile Include="System\Net\NameResolutionPal.Win32.cs" />
<!-- Debug only -->
<Compile Include="$(CommonPath)\System\Net\DebugSafeHandle.cs">
<Link>Common\System\Net\DebugSafeHandle.cs</Link>
<Compile Include="$(CommonPath)\Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs">
<Link>Interop\Windows\WinSock\Interop.GetAddrInfoExW.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\CoreLib\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs" Condition="'$(TargetGroup)' != 'uap'">
+ <Compile Include="$(CommonPath)\CoreLib\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs">
<Link>Common\CoreLib\Microsoft\Win32\SafeHandles\SafeLibraryHandle.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.GetProcAddress.cs" Condition="'$(TargetGroup)' != 'uap'">
+ <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.GetProcAddress.cs">
<Link>Interop\Windows\Kernel32\Interop.GetProcAddress.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.LoadLibraryEx.cs" Condition="'$(TargetGroup)' != 'uap'">
+ <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.LoadLibraryEx.cs">
<Link>Interop\Windows\Kernel32\Interop.LoadLibraryEx.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.FreeLibrary.cs">
+++ /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.
-
-namespace System.Net
-{
- internal static partial class NameResolutionPal
- {
- private static bool GetAddrInfoExSupportsOverlapped() => false;
- }
-}
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="GetHostByAddressTest.cs" />
<Compile Include="..\..\src\System\Net\NameResolutionPal.Windows.cs">
<Link>ProductionCode\System\Net\NameResolutionPal.Windows.cs</Link>
</Compile>
- <Compile Include="..\..\src\System\Net\NameResolutionPal.Uap.cs" Condition="'$(TargetGroup)' == 'uap'">
- <Link>ProductionCode\System\Net\NameResolutionPal.Uap.cs</Link>
- </Compile>
- <Compile Include="..\..\src\System\Net\NameResolutionPal.Win32.cs" Condition="'$(TargetGroup)' == 'netcoreapp'">
+ <Compile Include="..\..\src\System\Net\NameResolutionPal.Win32.cs">
<Link>ProductionCode\System\Net\NameResolutionPal.Win32.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\InternalException.cs">
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.NetworkInformation.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Linux;
netcoreapp-OSX;
netcoreapp-FreeBSD;
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn Condition=" '$(TargetsFreeBSD)' == 'true'">$(NoWarn);CA1823</NoWarn>
- <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-FreeBSD-Debug;netcoreapp-FreeBSD-Release;netcoreapp-Linux-Debug;netcoreapp-Linux-Release;netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Net\NetworkInformation\DuplicateAddressDetectionState.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StringResourcesPath>../../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<!-- Shared code with src assembly -->
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Ping.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AssemblyName>System.Net.Ping</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</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>
- <PropertyGroup Condition="'$(TargetGroup)' == 'uap'">
- <NoWarn>$(NoWarn);414</NoWarn>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Net\NetworkInformation\IPStatus.cs" />
<Link>Common\Interop\Unix\System.Native\Interop.SocketAddress.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' And '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\Net\NetworkInformation\Ping.Windows.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' And '$(TargetGroup)' == 'uap'">
- <Compile Include="System\Net\NetworkInformation\Ping.Windows.Uap.cs" />
- </ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<!-- System.Net Common -->
<Compile Include="$(CommonPath)\System\Net\SocketAddressPal.Windows.cs">
+++ /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.Globalization;
-using System.Net.Sockets;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.NetworkInformation
-{
- public partial class Ping
- {
- private PingReply SendPingCore(IPAddress address, byte[] buffer, int timeout, PingOptions options)
- {
- // Win32 Icmp* APIs fail with E_ACCESSDENIED when called from UWP due to Windows OS limitations.
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_ping_not_supported_uwp));
- }
-
- // Any exceptions that escape synchronously will be caught by the caller and wrapped in a PingException.
- // We do not need to or want to capture such exceptions into the returned task.
- private Task<PingReply> SendPingAsyncCore(IPAddress address, byte[] buffer, int timeout, PingOptions options)
- {
- // Win32 Icmp* APIs fail with E_ACCESSDENIED when called from UWP due to Windows OS limitations.
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_ping_not_supported_uwp));
- }
- }
-}
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
namespace System.Net.NetworkInformation.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Ping class not supported on UWP. See dotnet/corefx #19583")]
public class PingTest
{
public readonly ITestOutputHelper _output;
}
[Fact]
- [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
public void SendPingWithIPAddressAndTimeout()
{
IPAddress localIpAddress = TestSettings.GetLocalIPAddress();
}
[Fact]
- [ActiveIssue(19583, TargetFrameworkMonikers.Uap)]
public async Task SendPingAsyncWithIPAddressAndTimeout()
{
IPAddress localIpAddress = await TestSettings.GetLocalIPAddressAsync();
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!-- Test APIs introduced after 1.0 -->
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Primitives.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
</BuildConfigurations>
<AssemblyName>System.Net.Primitives</AssemblyName>
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<!-- SYSTEM_NET_PRIMITIVES_DLL is required to allow source-level code sharing for types defined within the
private string m_domainKey = string.Empty; // Do not rename (binary serialization)
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- bool IsQuotedVersion = false;
-
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- bool IsQuotedDomain = false;
+ internal bool IsQuotedVersion = false;
+
+ internal bool IsQuotedDomain = false;
#if DEBUG
static Cookie()
}
}
}
-
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- bool InternalSetName(string value)
+ internal bool InternalSetName(string value)
{
if (string.IsNullOrEmpty(value) || value[0] == '$' || value.IndexOfAny(ReservedToName) != -1 || value[0] == ' ' || value[value.Length - 1] == ' ')
{
}
}
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- Cookie Clone()
+ internal Cookie Clone()
{
Cookie clonedCookie = new Cookie(m_name, m_value);
}
}
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- CookieVariant Variant
+ internal CookieVariant Variant
{
get
{
}
}
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- string ToServerString()
+ internal string ToServerString()
{
string result = Name + EqualsLiteral + Value;
if (m_comment != null && m_comment.Length > 0)
// If isStrict == true, replace the cookie if found same with newest Variant.
// Returns 1 if added, 0 if replaced or rejected.
- /*
- TODO: #13607
- VSO 449560
- Reflecting on internal method won't work on AOT without rd.xml and DisableReflection
- block in toolchain.Networking team will be working on exposing methods from S.Net.Primitive
- public, this is a temporary workaround till that happens.
- */
-#if uap
- public
-#else
- internal
-#endif
- int InternalAdd(Cookie cookie, bool isStrict)
+ internal int InternalAdd(Cookie cookie, bool isStrict)
{
int ret = 1;
if (isStrict)
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CookieTest.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Requests.cs" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<RootNamespace>System.Net.Requests</RootNamespace>
<AssemblyName>System.Net.Requests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FxCopBaseline.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task ContentLength_Get_ExpectSameAsGetResponseStream(bool useSsl)
Assert.Equal(HttpVersion.Version11, request.ProtocolVersion);
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UAP does not allow HTTP/1.0 requests.")]
[OuterLoop]
[Theory]
[InlineData(false)]
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task GetResponseAsync_GetResponseStream_ContainsHost(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task GetResponseAsync_PostRequestStream_ContainsData(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task GetResponseAsync_UseDefaultCredentials_ExpectSuccess(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task HaveResponse_GetResponseAsync_ExpectTrue(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task Headers_GetResponseHeaders_ContainsExpectedValue(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task ResponseUri_GetResponseAsync_ExpectSameUri(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task SimpleScenario_UseGETVerb_Success(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task SimpleScenario_UsePOSTVerb_Success(bool useSsl)
}
[Theory]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Loopback server with TLS has problems on UWP")]
[InlineData(true)]
[InlineData(false)]
public async Task ContentType_AddHeaderWithNoContent_SendRequest_HeaderGetsSent(bool useSsl)
}
[Theory, MemberData(nameof(MixedWebRequestParameters))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void GetResponseAsync_ParametersAreNotCachable_CreateNewClient(HttpWebRequestParameters requestParameters, bool connectionReusedParameter)
{
RemoteExecutor.Invoke(async (serializedParameters, connectionReusedString) =>
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void GetResponseAsync_ParametersAreCachableButDifferent_CreateNewClient()
{
RemoteExecutor.Invoke(async () =>
<PropertyGroup>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Security.cs" />
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Net.Security</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<!-- This is needed so that code for TlsCipherSuite will have no namespace (causes compile errors) when used within T4 template -->
<DefineConstants>$(DefineConstants);PRODUCT</DefineConstants>
</PropertyGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
netcoreapp-OSX;
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<AllowUnsafeBlocks Condition="'$(TargetsUnix)' == 'true'">true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<Choose>
<!-- Disable the whole workitem on Windows arm64 until https://github.com/dotnet/core-eng/issues/5118 is fixed. -->
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<NoWarn>436</NoWarn>
<!-- Disable: CLSCompliant attribute is not needed -->
<NoWarn>$(NoWarn);3021</NoWarn>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="SslApplicationProtocolTests.cs" />
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.ServicePoint.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CA5364</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ServicePointManagerTest.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Sockets.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Net.Sockets</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<!-- SYSTEM_NET_SOCKETS_DLL is required to allow source-level code sharing for types defined within the
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // [ActiveIssue(20893)]
[ConditionalTheory(nameof(LocalhostIsBothIPv4AndIPv6))]
[MemberData(nameof(DualMode_Connect_IPAddress_DualMode_Data))]
public void DualModeConnectAsync_Static_DnsEndPointToHost_Helper(IPAddress listenOn, bool dualModeServer)
Assert.True(
error is ObjectDisposedException ||
error is SocketException ||
- (error is SEHException && PlatformDetection.IsUap),
+ (error is SEHException && PlatformDetection.IsInAppContainer),
error.ToString());
}
}
Assert.True(
error is ObjectDisposedException ||
error is SocketException ||
- (error is SEHException && PlatformDetection.IsUap),
+ (error is SEHException && PlatformDetection.IsInAppContainer),
error.ToString());
}
}
}
}
- [ActiveIssue(31609, TargetFrameworkMonikers.Uap)]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Skip on Nano: dotnet/corefx #29929
public async Task MulticastInterface_Set_AnyInterface_Succeeds()
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Skip on Nano: dotnet/corefx #29929
[PlatformSpecific(TestPlatforms.Windows)] // see comment below
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // UWP Apps are normally blocked to send network traffic on loopback.
public async Task MulticastInterface_Set_Loopback_Succeeds()
{
// On Windows, we can apparently assume interface 1 is "loopback." On other platforms, this is not a
}
}
- [ActiveIssue(31609, TargetFrameworkMonikers.Uap)]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Skip on Nano: dotnet/corefx #29929
[PlatformSpecific(~TestPlatforms.OSX)]
public async Task MulticastInterface_Set_IPv6_AnyInterface_Succeeds()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // Skip on Nano: dotnet/corefx #29929
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // UWP Apps are normally blocked to send network traffic on loopback.
public async Task MulticastInterface_Set_IPv6_Loopback_Succeeds()
{
// On Windows, we can apparently assume interface 1 is "loopback." On other platforms, this is not a
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Accept.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<!-- Manual test, don't run on CI -->
<ArchiveTest>false</ArchiveTest>
</PropertyGroup>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.WebClient.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
<!-- Disable 8610 (Nullability of reference type doesn't match overridden member) warning so it doesn't turn into an error -->
<NoWarn>$(NoWarn);8610</NoWarn>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.Net.WebHeaderCollection</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="WebHeaderCollectionTest.cs" />
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.WebProxy.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="WebProxyTest.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.WebSockets.Client.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
</BuildConfigurations>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Net\WebSockets\ClientWebSocket.cs" />
<Compile Include="$(CommonPath)\System\Net\WebSockets\WebSocketValidate.cs">
<Link>Common\System\Net\WebSockets\WebSocketValidate.cs</Link>
</Compile>
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Compile Include="System\Net\WebSockets\WebSocketHandle.Windows.cs" />
- <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.cs">
- <Link>Common\System\Net\Security\CertificateHelper.cs</Link>
- </Compile>
- <Compile Include="$(CommonPath)\System\Net\Security\CertificateHelper.Uap.cs">
- <Link>Common\System\Net\Security\CertificateHelper.Uap.cs</Link>
- </Compile>
- <Compile Include="System\Net\WebSockets\WebSocketHandle.WinRT.cs" />
- <Compile Include="System\Net\WebSockets\WinRTWebSocket.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap'">
<Compile Include="System\Net\WebSockets\WebSocketHandle.Managed.cs" />
<Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.cs">
<Link>Common\System\Net\HttpKnownHeaderNames.cs</Link>
<Link>Common\System\Net\SecurityProtocol.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Reference Include="Windows" />
- <Reference Include="mscorlib" />
- <Reference Include="System.Runtime.InteropServices.WindowsRuntime" />
- <Reference Include="System.Runtime.WindowsRuntime" />
- </ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Text.Encoding" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Tasks" />
- </ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'uap'">
<Reference Include="System.Buffers" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.NameResolution" />
+++ /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;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-using System.Diagnostics;
-using System.Net;
-using System.Security.Cryptography.X509Certificates;
-using System.Threading;
-using System.Threading.Tasks;
-
-using Microsoft.Win32.SafeHandles;
-
-using Windows.Web;
-using RTWebSocketError = Windows.Networking.Sockets.WebSocketError;
-
-namespace System.Net.WebSockets
-{
- internal readonly partial struct WebSocketHandle
- {
- private readonly WinRTWebSocket _webSocket;
-
- public static WebSocketHandle Create()
- {
- return new WebSocketHandle(new WinRTWebSocket());
- }
-
- public static void CheckPlatformSupport()
- {
- }
-
- private WebSocketHandle(WinRTWebSocket webSocket)
- {
- _webSocket = webSocket;
- }
-
- public async Task ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
- {
- if (options.RemoteCertificateValidationCallback != null)
- {
- throw new PlatformNotSupportedException(SR.net_WebSockets_RemoteValidationCallbackNotSupported);
- }
-
- try
- {
- await _webSocket.ConnectAsync(uri, cancellationToken, options).ConfigureAwait(false);
- }
- catch (Exception ex) when (!(ex is OperationCanceledException && cancellationToken.IsCancellationRequested))
- {
- WebErrorStatus status = RTWebSocketError.GetStatus(ex.HResult);
- var inner = new Exception(status.ToString(), ex);
- WebSocketException wex = new WebSocketException(WebSocketError.Faulted, SR.net_webstatus_ConnectFailure, inner);
- if (NetEventSource.IsEnabled) NetEventSource.Error(_webSocket, wex);
- throw wex;
- }
- }
- }
-}
+++ /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;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.Net.Security;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices.WindowsRuntime;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-
-using Windows.Foundation.Metadata;
-using Windows.Networking.Sockets;
-using Windows.Storage.Streams;
-using Windows.Web;
-
-using RTCertificate = Windows.Security.Cryptography.Certificates.Certificate;
-using RTCertificateQuery = Windows.Security.Cryptography.Certificates.CertificateQuery;
-using RTCertificateStores = Windows.Security.Cryptography.Certificates.CertificateStores;
-using RTWebSocketError = Windows.Networking.Sockets.WebSocketError;
-
-namespace System.Net.WebSockets
-{
- internal class WinRTWebSocket : WebSocket
- {
- #region Constants
- private const string HeaderNameCookie = "Cookie";
- #endregion
-
- private static readonly Lazy<bool> s_MessageWebSocketClientCertificateSupported =
- new Lazy<bool>(InitMessageWebSocketClientCertificateSupported);
- private static bool MessageWebSocketClientCertificateSupported => s_MessageWebSocketClientCertificateSupported.Value;
- private static readonly Lazy<bool> s_MessageWebSocketReceiveModeSupported =
- new Lazy<bool>(InitMessageWebSocketReceiveModeSupported);
- private static bool MessageWebSocketReceiveModeSupported => s_MessageWebSocketReceiveModeSupported.Value;
-
- private WebSocketCloseStatus? _closeStatus = null;
- private string _closeStatusDescription = null;
- private string _subProtocol = null;
- private bool _disposed = false;
-
- private object _stateLock = new object();
- private int _pendingWriteOperation;
- private MessageWebSocket _messageWebSocket;
- private DataWriter _messageWriter;
-
- private WebSocketState _state = WebSocketState.None;
- private TaskCompletionSource<ArraySegment<byte>> _receiveAsyncBufferTcs;
- private TaskCompletionSource<WebSocketReceiveResult> _webSocketReceiveResultTcs;
- private TaskCompletionSource<WebSocketReceiveResult> _closeWebSocketReceiveResultTcs;
-
- public WinRTWebSocket()
- {
- _state = WebSocketState.None;
- }
-
- #region Properties
- public override WebSocketCloseStatus? CloseStatus
- {
- get
- {
- return _closeStatus;
- }
- }
-
- public override string CloseStatusDescription
- {
- get
- {
- return _closeStatusDescription;
- }
- }
-
- public override WebSocketState State
- {
- get
- {
- return _state;
- }
- }
-
- public override string SubProtocol
- {
- get
- {
- return _subProtocol;
- }
- }
- #endregion
-
- private static readonly WebSocketState[] s_validConnectStates = {WebSocketState.None};
- private static readonly WebSocketState[] s_validConnectingStates = {WebSocketState.Connecting};
-
- public async Task ConnectAsync(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
- {
- InterlockedCheckAndUpdateState(WebSocketState.Connecting, s_validConnectStates);
- CheckValidState(s_validConnectingStates);
-
- _messageWebSocket = new MessageWebSocket();
- foreach (var header in options.RequestHeaders)
- {
- _messageWebSocket.SetRequestHeader((string)header, options.RequestHeaders[(string)header]);
- }
-
- string cookies = options.Cookies == null ? null : options.Cookies.GetCookieHeader(uri);
- if (!string.IsNullOrEmpty(cookies))
- {
- _messageWebSocket.SetRequestHeader(HeaderNameCookie, cookies);
- }
-
- var websocketControl = _messageWebSocket.Control;
- foreach (var subProtocol in options.RequestedSubProtocols)
- {
- websocketControl.SupportedProtocols.Add(subProtocol);
- }
-
- if (options.ClientCertificates.Count > 0)
- {
- if (!MessageWebSocketClientCertificateSupported)
- {
- throw new PlatformNotSupportedException(SR.Format(CultureInfo.InvariantCulture,
- SR.net_WebSockets_UWPClientCertSupportRequiresWindows10GreaterThan1703));
- }
-
- X509Certificate2 dotNetClientCert = CertificateHelper.GetEligibleClientCertificate(options.ClientCertificates);
- if (dotNetClientCert != null)
- {
- RTCertificate winRtClientCert = await CertificateHelper.ConvertDotNetClientCertToWinRtClientCertAsync(dotNetClientCert).ConfigureAwait(false);
- if (winRtClientCert == null)
- {
- throw new PlatformNotSupportedException(SR.Format(
- CultureInfo.InvariantCulture,
- SR.net_WebSockets_UWPClientCertSupportRequiresCertInPersonalCertificateStore));
- }
-
- websocketControl.ClientCertificate = winRtClientCert;
- }
- }
-
- // Try to opt into PartialMessage receive mode so that we can hand partial data back to the app as it arrives.
- // If the MessageWebSocketControl.ReceiveMode API surface is not available, the MessageWebSocket.MessageReceived
- // event will only get triggered when an entire WebSocket message has been received. This results in large memory
- // footprint and prevents "streaming" scenarios (e.g., WCF) from working properly.
- if (MessageWebSocketReceiveModeSupported)
- {
- // Always enable partial message receive mode if the WinRT API supports it.
- _messageWebSocket.Control.ReceiveMode = MessageWebSocketReceiveMode.PartialMessage;
- }
-
- try
- {
- _receiveAsyncBufferTcs = new TaskCompletionSource<ArraySegment<byte>>();
- _closeWebSocketReceiveResultTcs = new TaskCompletionSource<WebSocketReceiveResult>();
- _messageWebSocket.MessageReceived += OnMessageReceived;
- _messageWebSocket.Closed += OnCloseReceived;
- await _messageWebSocket.ConnectAsync(uri).AsTask(cancellationToken).ConfigureAwait(false);
- _subProtocol = _messageWebSocket.Information.Protocol;
- _messageWriter = new DataWriter(_messageWebSocket.OutputStream);
- }
- catch (Exception)
- {
- UpdateState(WebSocketState.Closed);
- throw;
- }
-
- UpdateState(WebSocketState.Open);
- }
-
- public override void Abort()
- {
- AbortInternal();
- }
-
- private void AbortInternal(Exception customException = null)
- {
- lock (_stateLock)
- {
- if ((_state != WebSocketState.None) && (_state != WebSocketState.Connecting))
- {
- UpdateState(WebSocketState.Aborted);
- }
- else
- {
- // ClientWebSocket Desktop behavior: a ws that was not connected will not switch state to Aborted.
- UpdateState(WebSocketState.Closed);
- }
- }
-
- CancelAllOperations(customException);
- Dispose();
- }
-
- private void CancelAllOperations(Exception customException)
- {
- if (_receiveAsyncBufferTcs != null)
- {
- // This exception will be received by OnMessageReceived and won't be exposed
- // to user code.
- var exception = new OperationCanceledException("Aborted");
- _receiveAsyncBufferTcs.TrySetException(exception);
- }
-
- if (_webSocketReceiveResultTcs != null)
- {
- if (customException != null)
- {
- _webSocketReceiveResultTcs.TrySetException(customException);
- }
- else
- {
- var exception = new WebSocketException(
- WebSocketError.InvalidState,
- SR.Format(
- SR.net_WebSockets_InvalidState_ClosedOrAborted,
- "System.Net.WebSockets.InternalClientWebSocket",
- "Aborted"));
-
- _webSocketReceiveResultTcs.TrySetException(exception);
- }
- }
-
- if (_closeWebSocketReceiveResultTcs != null)
- {
- if (customException != null)
- {
- _closeWebSocketReceiveResultTcs.TrySetException(customException);
- }
- else
- {
- var exception = new WebSocketException(
- WebSocketError.InvalidState,
- SR.Format(
- SR.net_WebSockets_InvalidState_ClosedOrAborted,
- "System.Net.WebSockets.InternalClientWebSocket",
- "Aborted"));
-
- _closeWebSocketReceiveResultTcs.TrySetException(exception);
- }
- }
- }
-
- private static readonly WebSocketState[] s_validCloseStates = { WebSocketState.Open, WebSocketState.CloseReceived, WebSocketState.CloseSent, WebSocketState.Closed };
- public override async Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription,
- CancellationToken cancellationToken)
- {
- cancellationToken.ThrowIfCancellationRequested();
- bool callClose = false;
- lock (_stateLock)
- {
- callClose = (_state != WebSocketState.CloseSent) && (_state != WebSocketState.Closed);
- }
-
- InterlockedCheckAndUpdateCloseState(WebSocketState.CloseSent, s_validCloseStates);
-
- using (CancellationTokenRegistration ctr = ThrowOrRegisterCancellation(cancellationToken))
- {
- if (callClose)
- {
- _messageWebSocket.Close((ushort) closeStatus, statusDescription ?? string.Empty);
- }
-
- var result = await _closeWebSocketReceiveResultTcs.Task.ConfigureAwait(false);
- _closeStatus = result.CloseStatus;
- _closeStatusDescription = result.CloseStatusDescription;
- InterlockedCheckAndUpdateCloseState(WebSocketState.CloseReceived, s_validCloseStates);
- }
- }
-
- private static readonly WebSocketState[] s_validCloseOutputStates = { WebSocketState.Open, WebSocketState.CloseReceived, WebSocketState.CloseSent };
- public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription,
- CancellationToken cancellationToken)
- {
- CheckValidState(s_validCloseOutputStates);
- _messageWebSocket.Close((ushort)closeStatus, statusDescription ?? string.Empty);
- InterlockedCheckAndUpdateCloseState(WebSocketState.CloseSent, s_validCloseOutputStates);
- return Task.CompletedTask;
- }
-
- private void OnCloseReceived(IWebSocket sender, WebSocketClosedEventArgs args)
- {
- var recvResult = new WebSocketReceiveResult(0, WebSocketMessageType.Close, true, (WebSocketCloseStatus)args.Code,
- args.Reason);
- _closeWebSocketReceiveResultTcs.TrySetResult(recvResult);
- }
-
- public override void Dispose()
- {
- if (!_disposed)
- {
- lock (_stateLock)
- {
- if (!_disposed)
- {
- _disposed = true;
- if (_messageWebSocket != null)
- {
- _messageWebSocket.Dispose();
- }
-
- if (_messageWriter != null)
- {
- _messageWriter.Dispose();
- }
- }
- }
- }
- }
-
- private static readonly WebSocketState[] s_validReceiveStates = { WebSocketState.Open, WebSocketState.CloseSent };
- public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
- CancellationToken cancellationToken)
- {
- InterlockedCheckValidStates(s_validReceiveStates);
-
- using (CancellationTokenRegistration ctr = ThrowOrRegisterCancellation(cancellationToken))
- {
- _webSocketReceiveResultTcs = new TaskCompletionSource<WebSocketReceiveResult>();
- _receiveAsyncBufferTcs.TrySetResult(buffer);
-
- Task<WebSocketReceiveResult> completedTask = await Task.WhenAny(
- _webSocketReceiveResultTcs.Task,
- _closeWebSocketReceiveResultTcs.Task).ConfigureAwait(false);
-
- WebSocketReceiveResult result = completedTask.GetAwaiter().GetResult();
-
- if (result.MessageType == WebSocketMessageType.Close)
- {
- _closeStatus = result.CloseStatus;
- _closeStatusDescription = result.CloseStatusDescription;
- InterlockedCheckAndUpdateCloseState(WebSocketState.CloseReceived, s_validCloseOutputStates);
- }
- else
- {
- _webSocketReceiveResultTcs = new TaskCompletionSource<WebSocketReceiveResult>();
- }
-
- return result;
- }
- }
-
- private void OnMessageReceived(MessageWebSocket sender, MessageWebSocketMessageReceivedEventArgs args)
- {
- // GetDataReader() throws an exception when either:
- // (1) The underlying TCP connection is closed prematurely (e.g., FIN/RST received without sending/receiving a WebSocket Close frame).
- // (2) The server sends invalid data (e.g., corrupt HTTP headers or a message exceeding the MaxMessageSize).
- //
- // In both cases, the appropriate thing to do is to close the socket, as we have reached an unexpected state in
- // the WebSocket protocol.
- try
- {
- using (DataReader reader = args.GetDataReader())
- {
- uint dataAvailable;
- while ((dataAvailable = reader.UnconsumedBufferLength) > 0)
- {
- ArraySegment<byte> buffer;
- try
- {
- buffer = _receiveAsyncBufferTcs.Task.GetAwaiter().GetResult();
- }
- catch (OperationCanceledException) // Caused by Abort call on WebSocket
- {
- return;
- }
-
- _receiveAsyncBufferTcs = new TaskCompletionSource<ArraySegment<byte>>();
- WebSocketMessageType messageType;
- if (args.MessageType == SocketMessageType.Binary)
- {
- messageType = WebSocketMessageType.Binary;
- }
- else
- {
- messageType = WebSocketMessageType.Text;
- }
-
- bool endOfMessage = false;
- uint readCount = Math.Min(dataAvailable, (uint) buffer.Count);
-
- if (readCount > 0)
- {
- IBuffer dataBuffer = reader.ReadBuffer(readCount);
-
- // Safe to cast readCount to int as the maximum value that readCount can be is buffer.Count.
- dataBuffer.CopyTo(0, buffer.Array, buffer.Offset, (int) readCount);
- }
-
- if (dataAvailable == readCount)
- {
- endOfMessage = !IsPartialMessageEvent(args);
- }
-
- WebSocketReceiveResult recvResult = new WebSocketReceiveResult((int) readCount, messageType,
- endOfMessage);
- _webSocketReceiveResultTcs.TrySetResult(recvResult);
- }
- }
- }
- catch (Exception exc)
- {
- // WinRT WebSockets always throw exceptions of type System.Exception. However, we can determine whether
- // or not we're dealing with a known error by using WinRT's WebSocketError.GetStatus method.
- WebErrorStatus status = RTWebSocketError.GetStatus(exc.HResult);
- WebSocketError actualError = WebSocketError.Faulted;
- switch (status)
- {
- case WebErrorStatus.ConnectionAborted:
- case WebErrorStatus.ConnectionReset:
- case WebErrorStatus.Disconnected:
- actualError = WebSocketError.ConnectionClosedPrematurely;
- break;
- }
-
- // Propagate a custom exception to any pending ReceiveAsync/CloseAsync operations and close the socket.
- WebSocketException customException = new WebSocketException(actualError, exc);
- AbortInternal(customException);
- }
- }
-
- private static readonly WebSocketState[] s_validSendStates = { WebSocketState.Open, WebSocketState.CloseReceived };
- public override async Task SendAsync(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage,
- CancellationToken cancellationToken)
- {
- InterlockedCheckValidStates(s_validSendStates);
-
- if (cancellationToken.IsCancellationRequested)
- {
- Abort();
- cancellationToken.ThrowIfCancellationRequested();
- }
-
- var pendingWrite = Interlocked.CompareExchange(ref _pendingWriteOperation, 1, 0);
- if (pendingWrite == 1)
- {
- var exception = new InvalidOperationException(SR.Format(SR.net_Websockets_AlreadyOneOutstandingOperation, "SendAsync"));
- Abort();
- throw exception;
- }
-
- try
- {
- _messageWriter.WriteBuffer(buffer.Array.AsBuffer(buffer.Offset, buffer.Count));
- if (endOfMessage)
- {
- _messageWebSocket.Control.MessageType = messageType == WebSocketMessageType.Binary
- ? SocketMessageType.Binary
- : SocketMessageType.Utf8;
- await _messageWriter.StoreAsync().AsTask(cancellationToken).ConfigureAwait(false);
- }
- }
- catch (Exception)
- {
- cancellationToken.ThrowIfCancellationRequested();
- throw;
- }
- finally
- {
- Interlocked.CompareExchange(ref _pendingWriteOperation, 0, 1);
- }
- }
-
- private CancellationTokenRegistration ThrowOrRegisterCancellation(CancellationToken cancellationToken)
- {
- if (cancellationToken.IsCancellationRequested)
- {
- Abort();
- cancellationToken.ThrowIfCancellationRequested();
- }
-
- CancellationTokenRegistration cancellationRegistration =
- cancellationToken.Register(s =>
- {
- var thisRef = (WinRTWebSocket)s;
-
- // Propagate a custom exception to any pending ReceiveAsync/CloseAsync operations and close the socket.
- var customException = new OperationCanceledException(nameof(WebSocketState.Aborted));
- thisRef.AbortInternal(customException);
- }, this);
-
- return cancellationRegistration;
- }
-
- #region State // Code related to state management
- // TODO (#7896): Refactor state into encapsulated class
- public void InterlockedCheckValidStates(WebSocketState[] validStates)
- {
- lock (_stateLock)
- {
- CheckValidState(validStates);
- }
- }
-
- private void InterlockedCheckAndUpdateState(
- WebSocketState newState,
- params WebSocketState[] validStates)
- {
- lock (_stateLock)
- {
- CheckValidState(validStates);
- UpdateState(newState);
- }
- }
-
- private void InterlockedCheckAndUpdateCloseState(WebSocketState newState, params WebSocketState[] validStates)
- {
- lock (_stateLock)
- {
- CheckValidState(validStates);
- if ((_state == WebSocketState.CloseReceived && newState == WebSocketState.CloseSent) ||
- (_state == WebSocketState.CloseSent && newState == WebSocketState.CloseReceived) ||
- ( _state == WebSocketState.Closed))
- {
- _state = WebSocketState.Closed;
- }
- else
- {
- UpdateState(newState);
- }
- }
- }
-
- // Must be called with Lock taken.
- private void CheckValidState(WebSocketState[] validStates)
- {
- string validStatesText = string.Empty;
-
- if (validStates != null && validStates.Length > 0)
- {
- foreach (WebSocketState currentState in validStates)
- {
- if (_state == currentState)
- {
- // Ordering is important to maintain .NET Framework 4.5 WebSocket implementation exception behavior.
- if (_disposed)
- {
- throw new ObjectDisposedException(GetType().FullName);
- }
-
- return;
- }
- }
-
- validStatesText = string.Join(", ", validStates);
- }
-
- throw new WebSocketException(SR.Format(SR.net_WebSockets_InvalidState, _state, validStatesText));
- }
-
- private void UpdateState(WebSocketState value)
- {
- if ((_state != WebSocketState.Closed) && (_state != WebSocketState.Aborted))
- {
- _state = value;
- }
- }
- #endregion
-
- #region Helpers
- private static bool InitMessageWebSocketClientCertificateSupported()
- {
- return ApiInformation.IsPropertyPresent(
- "Windows.Networking.Sockets.MessageWebSocketControl",
- "ClientCertificate");
- }
-
- private static bool InitMessageWebSocketReceiveModeSupported()
- {
- return ApiInformation.IsPropertyPresent(
- "Windows.Networking.Sockets.MessageWebSocketControl",
- "ReceiveMode");
- }
-
- private bool IsPartialMessageEvent(MessageWebSocketMessageReceivedEventArgs eventArgs)
- {
- if (MessageWebSocketReceiveModeSupported)
- {
- return !eventArgs.IsMessageComplete;
- }
-
- // When MessageWebSocketMessageReceivedEventArgs.IsMessageComplete is not available, WinRT's behavior
- // is always to wait for the entire WebSocket message to arrive before raising a MessageReceived event.
- return false;
- }
- #endregion Helpers
-
- }
-}
{
public partial class ClientWebSocketOptionsTests : ClientWebSocketTestBase
{
- // Windows 10 Version 1709 introduced the necessary APIs for the UAP version of
- // ClientWebSocket.ConnectAsync to carry out mutual TLS authentication.
- public static bool ClientCertificatesSupported => !PlatformDetection.IsUap;
-
public ClientWebSocketOptionsTests(ITestOutputHelper output) : base(output) { }
[ConditionalFact(nameof(WebSocketsSupported))]
{
public partial class ClientWebSocketOptionsTests : ClientWebSocketTestBase
{
- [ConditionalFact(nameof(WebSocketsSupported), nameof(ClientCertificatesSupported))]
+ [ConditionalFact(nameof(WebSocketsSupported))]
public void RemoteCertificateValidationCallback_Roundtrips()
{
using (var cws = new ClientWebSocket())
}
[OuterLoop("Connects to remote service")]
- [ConditionalTheory(nameof(WebSocketsSupported), nameof(ClientCertificatesSupported))]
+ [ConditionalTheory(nameof(WebSocketsSupported))]
[InlineData(false)]
[InlineData(true)]
public async Task RemoteCertificateValidationCallback_PassedRemoteCertificateInfo(bool secure)
}
[OuterLoop("Connects to remote service")]
- [ConditionalFact(nameof(WebSocketsSupported), nameof(ClientCertificatesSupported))]
+ [ConditionalFact(nameof(WebSocketsSupported))]
public async Task ClientCertificates_ValidCertificate_ServerReceivesCertificateAndConnectAsyncSucceeds()
{
if (PlatformDetection.IsWindows7)
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
WebSocketException ex = await Assert.ThrowsAsync<WebSocketException>(() =>
cws.ConnectAsync(server, cts.Token));
- if (PlatformDetection.IsNetCore && !PlatformDetection.IsUap) // bug fix in netcoreapp: https://github.com/dotnet/corefx/pull/35960
+ if (PlatformDetection.IsNetCore && !PlatformDetection.IsInAppContainer) // bug fix in netcoreapp: https://github.com/dotnet/corefx/pull/35960
{
Assert.Equal(errorCode, ex.WebSocketErrorCode);
}
Assert.Equal(WebSocketState.Closed, cws.State);
-
- // .NET Framework and UAP implmentations have different exception message from .NET Core.
- if (!PlatformDetection.IsUap)
- {
- Assert.Equal(exceptionMessage, ex.Message);
- }
+ Assert.Equal(exceptionMessage, ex.Message);
}
}
}
[ConditionalFact(nameof(WebSocketsSupported))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public async Task ConnectAsync_CancellationRequestedBeforeConnect_ThrowsOperationCanceledException()
{
using (var clientSocket = new ClientWebSocket())
}
[ConditionalFact(nameof(WebSocketsSupported))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public async Task ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException()
{
var releaseServer = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
protected abstract Task SendAsync(WebSocket ws, ArraySegment<byte> arraySegment, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken);
protected abstract Task<WebSocketReceiveResult> ReceiveAsync(WebSocket ws, ArraySegment<byte> arraySegment, CancellationToken cancellationToken);
- public static bool PartialMessagesSupported => PlatformDetection.ClientWebSocketPartialMessagesSupported;
-
public SendReceiveTest(ITestOutputHelper output) : base(output) { }
[OuterLoop("Uses external servers")]
}
[OuterLoop("Uses external servers")]
- [ConditionalTheory(nameof(WebSocketsSupported), nameof(PartialMessagesSupported)), MemberData(nameof(EchoServers))]
+ [ConditionalTheory(nameof(WebSocketsSupported)), MemberData(nameof(EchoServers))]
public async Task SendReceive_PartialMessageBeforeCompleteMessageArrives_Success(Uri server)
{
var rand = new Random();
Assert.Equal(WebSocketError.ConnectionClosedPrematurely, pendingReceiveException.WebSocketErrorCode);
- if (PlatformDetection.IsUap)
+ if (PlatformDetection.IsInAppContainer)
{
const uint WININET_E_CONNECTION_ABORTED = 0x80072EFE;
// Now do a receive to get the payload.
var receiveBuffer = new byte[1];
t = ReceiveAsync(cws, new ArraySegment<byte>(receiveBuffer), ctsDefault.Token);
-
- // Skip synchronous completion check on UAP since it uses WinRT APIs underneath.
- if (!PlatformDetection.IsUap)
- {
- Assert.Equal(TaskStatus.RanToCompletion, t.Status);
- }
+ Assert.Equal(TaskStatus.RanToCompletion, t.Status);
r = await t;
Assert.Equal(WebSocketMessageType.Binary, r.MessageType);
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Net\WebSockets\WebSocketCreateTest.cs">
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.WebSockets.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AssemblyName>System.Net.WebSockets</AssemblyName>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Net\WebSockets\ManagedWebSocket.netcoreapp.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="WebSocketTests.cs" />
+++ /dev/null
-<Project>
- <Import Project="..\Directory.Build.props" />
- <PropertyGroup>
- <AssemblyVersion>4.0.4.0</AssemblyVersion>
- <StrongNameKeyId>Microsoft</StrongNameKeyId>
- <IsUAP>true</IsUAP>
- </PropertyGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27213.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Numerics.Vectors.WindowsRuntime", "src\System.Numerics.Vectors.WindowsRuntime.csproj", "{25FD0CB0-D3A8-4258-9408-30E69EEB0FF3}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {25FD0CB0-D3A8-4258-9408-30E69EEB0FF3}.Debug|Any CPU.ActiveCfg = uap-Windows_NT-Debug|Any CPU
- {25FD0CB0-D3A8-4258-9408-30E69EEB0FF3}.Debug|Any CPU.Build.0 = uap-Windows_NT-Debug|Any CPU
- {25FD0CB0-D3A8-4258-9408-30E69EEB0FF3}.Release|Any CPU.ActiveCfg = uap-Windows_NT-Release|Any CPU
- {25FD0CB0-D3A8-4258-9408-30E69EEB0FF3}.Release|Any CPU.Build.0 = uap-Windows_NT-Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {25FD0CB0-D3A8-4258-9408-30E69EEB0FF3} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {69B12AEC-ADA2-42EC-82FB-F6B73F36B8B1}
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<Project>
- <PropertyGroup>
- <BuildConfigurations>
- uap-Windows_NT;
- </BuildConfigurations>
- </PropertyGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <RootNamespace>System.Numerics</RootNamespace>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System\Numerics\VectorExtensions.cs" />
- <Reference Include="System.Runtime" />
- <Reference Include="System.Runtime.WindowsRuntime" />
- <Reference Include="System.Numerics.Vectors" />
- </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 Windows.Foundation;
-
-namespace System.Numerics
-{
- /// <summary>
- /// Contains conversions from Vector2 to Windows.Foundation.Point and Size, which are all structurally identical.
- /// </summary>
- public static class VectorExtensions
- {
- /// <summary>
- /// Returns a Point whose coordinates are the same as the vector's.
- /// </summary>
- /// <param name="vector">The Vector2 to convert.</param>
- /// <returns>The Point.</returns>
- public static Point ToPoint(this Vector2 vector)
- {
- return new Point(vector.X, vector.Y);
- }
-
- /// <summary>
- /// Returns a Size whose width and height are equal to the vector's X and Y coordinates.
- /// </summary>
- /// <param name="vector">The Vector2 to convert.</param>
- /// <returns>The Size.</returns>
- public static Size ToSize(this Vector2 vector)
- {
- return new Size(vector.X, vector.Y);
- }
-
- /// <summary>
- /// Returns a Vector2 whose coordinates are the same as the Point's.
- /// </summary>
- /// <param name="point">The Point to convert.</param>
- /// <returns>The Vector2.</returns>
- public static Vector2 ToVector2(this Point point)
- {
- return new Vector2((float)point.X, (float)point.Y);
- }
-
- /// <summary>
- /// Returns a Vector2 whose coordinates are the height and width of the Size.
- /// </summary>
- /// <param name="size">The Size to convert.</param>
- /// <returns>The Vector2.</returns>
- public static Vector2 ToVector2(this Size size)
- {
- return new Vector2((float)size.Width, (float)size.Height);
- }
- }
-}
<AssemblyVersion>4.1.5.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<HasIntrinsics Condition="'$(TargetsNetCoreApp)'=='true'">true</HasIntrinsics>
<DefineConstants Condition="'$(HasIntrinsics)'=='true'">$(DefineConstants);HAS_INTRINSICS</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- Shared -->
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.ObjectModel.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.ObjectModel</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Collections\Generic\DebugView.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\IEnumerableTest.cs">
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<DebugSymbols>true</DebugSymbols>
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>$(DefineConstants);FEATURE_SERIALIZATION</DefineConstants>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<!-- Too much private reflection. Do not bother with trimming -->
<ILLinkTrimAssembly>false</ILLinkTrimAssembly>
</PropertyGroup>
+++ /dev/null
-<Project>
- <Import Project="..\Directory.Build.props" />
- <PropertyGroup>
- <AssemblyVersion>4.1.4.0</AssemblyVersion>
- <StrongNameKeyId>Open</StrongNameKeyId>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
- </PropertyGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27213.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.Reflection.Metadata.Ecma335", "src\System.Private.Reflection.Metadata.Ecma335.csproj", "{3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- 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 = Debug|Any CPU
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {3A8B2CAD-6FFD-4A37-A53A-0F2D5EF99164} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {C4B0E076-BCEB-409B-9B5F-5585B781CD37}
- EndGlobalSection
-EndGlobal
+++ /dev/null
-<Project>
- <PropertyGroup>
- <BuildConfigurations>
- </BuildConfigurations>
- </PropertyGroup>
-</Project>
+++ /dev/null
-<root>
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <data name="ImageTooSmall" xml:space="preserve">
- <value>Image is too small.</value>
- </data>
- <data name="InvalidCorHeaderSize" xml:space="preserve">
- <value>Invalid COR header size.</value>
- </data>
- <data name="InvalidHandle" xml:space="preserve">
- <value>Invalid handle.</value>
- </data>
- <data name="UnexpectedHandleKind" xml:space="preserve">
- <value>Unexpected handle kind: {0}.</value>
- </data>
- <data name="UnexpectedOpCode" xml:space="preserve">
- <value>Unexpected op-code: {0}.</value>
- </data>
- <data name="InvalidLocalSignatureToken" xml:space="preserve">
- <value>Invalid local signature token: 0x{0:X8}</value>
- </data>
- <data name="InvalidMetadataSectionSpan" xml:space="preserve">
- <value>Invalid metadata section span.</value>
- </data>
- <data name="InvalidMethodHeader1" xml:space="preserve">
- <value>Invalid method header: 0x{0:X2}</value>
- </data>
- <data name="InvalidMethodHeader2" xml:space="preserve">
- <value>Invalid method header: 0x{0:X2} 0x{1:X2}</value>
- </data>
- <data name="InvalidPESignature" xml:space="preserve">
- <value>Invalid PE signature.</value>
- </data>
- <data name="InvalidSehHeader" xml:space="preserve">
- <value>Invalid SEH header: 0x{0:X2}</value>
- </data>
- <data name="InvalidToken" xml:space="preserve">
- <value>Invalid token.</value>
- </data>
- <data name="MetadataImageDoesNotRepresentAnAssembly" xml:space="preserve">
- <value>Metadata image doesn't represent an assembly.</value>
- </data>
- <data name="StandaloneDebugMetadataImageDoesNotContainModuleTable" xml:space="preserve">
- <value>Standalone debug metadata image doesn't contain Module table.</value>
- </data>
- <data name="PEImageNotAvailable" xml:space="preserve">
- <value>PE image not available.</value>
- </data>
- <data name="MissingDataDirectory" xml:space="preserve">
- <value>Missing data directory.</value>
- </data>
- <data name="NotMetadataHeapHandle" xml:space="preserve">
- <value>Specified handle is not a valid metadata heap handle.</value>
- </data>
- <data name="NotMetadataTableOrUserStringHandle" xml:space="preserve">
- <value>Specified handle is not a valid metadata table or UserString heap handle.</value>
- </data>
- <data name="SectionTooSmall" xml:space="preserve">
- <value>Section too small.</value>
- </data>
- <data name="StreamMustSupportReadAndSeek" xml:space="preserve">
- <value>Stream must support read and seek operations.</value>
- </data>
- <data name="UnknownFileFormat" xml:space="preserve">
- <value>Unknown file format.</value>
- </data>
- <data name="UnknownPEMagicValue" xml:space="preserve">
- <value>Unknown PE Magic value.</value>
- </data>
- <data name="MetadataTableNotSorted" xml:space="preserve">
- <value>Metadata table {0} not sorted.</value>
- </data>
- <data name="AssemblyTableInvalidNumberOfRows" xml:space="preserve">
- <value>Invalid number of rows of Assembly table: {0}.</value>
- </data>
- <data name="ModuleTableInvalidNumberOfRows" xml:space="preserve">
- <value>Invalid number of rows of Module table: {0}.</value>
- </data>
- <data name="UnknownTables" xml:space="preserve">
- <value>Unknown tables: 0x{0:x16}.</value>
- </data>
- <data name="IllegalTablesInCompressedMetadataStream" xml:space="preserve">
- <value>Illegal tables in compressed metadata stream.</value>
- </data>
- <data name="TableRowCountSpaceTooSmall" xml:space="preserve">
- <value>Table row count space to small.</value>
- </data>
- <data name="OutOfBoundsRead" xml:space="preserve">
- <value>Read out of bounds.</value>
- </data>
- <data name="OutOfBoundsWrite" xml:space="preserve">
- <value>Write out of bounds.</value>
- </data>
- <data name="MetadataHeaderTooSmall" xml:space="preserve">
- <value>Metadata header too small.</value>
- </data>
- <data name="MetadataSignature" xml:space="preserve">
- <value>Invalid COR20 header signature.</value>
- </data>
- <data name="NotEnoughSpaceForVersionString" xml:space="preserve">
- <value>Not enough space for version string.</value>
- </data>
- <data name="StreamHeaderTooSmall" xml:space="preserve">
- <value>Stream header too small.</value>
- </data>
- <data name="NotEnoughSpaceForStreamHeaderName" xml:space="preserve">
- <value>Not enough space for stream header name.</value>
- </data>
- <data name="NotEnoughSpaceForStringStream" xml:space="preserve">
- <value>Not enough space for String stream.</value>
- </data>
- <data name="NotEnoughSpaceForBlobStream" xml:space="preserve">
- <value>Not enough space for Blob stream.</value>
- </data>
- <data name="NotEnoughSpaceForGUIDStream" xml:space="preserve">
- <value>Not enough space for GUID stream.</value>
- </data>
- <data name="NotEnoughSpaceForMetadataStream" xml:space="preserve">
- <value>Not enough space for Metadata stream.</value>
- </data>
- <data name="InvalidMetadataStreamFormat" xml:space="preserve">
- <value>Invalid Metadata stream format.</value>
- </data>
- <data name="MetadataTablesTooSmall" xml:space="preserve">
- <value>Metadata tables too small.</value>
- </data>
- <data name="MetadataTableHeaderTooSmall" xml:space="preserve">
- <value>Metadata table header too small.</value>
- </data>
- <data name="WinMDMissingMscorlibRef" xml:space="preserve">
- <value>Missing mscorlib reference in AssemblyRef table.</value>
- </data>
- <data name="UnableToReadMetadataFile" xml:space="preserve">
- <value>Unable to read metadata file.</value>
- </data>
- <data name="UnexpectedStreamEnd" xml:space="preserve">
- <value>Unexpected stream end.</value>
- </data>
- <data name="InvalidMethodRva" xml:space="preserve">
- <value>Invalid relative virtual address (RVA): 0x{0:X8}</value>
- </data>
- <data name="CantGetOffsetForVirtualHeapHandle" xml:space="preserve">
- <value>Can't get a heap offset for a virtual heap handle</value>
- </data>
- <data name="InvalidSectionName" xml:space="preserve">
- <value>Invalid section name</value>
- </data>
- <data name="InvalidNumberOfSections" xml:space="preserve">
- <value>Invalid number of sections in declared in PE header.</value>
- </data>
- <data name="InvalidSignature" xml:space="preserve">
- <value>Invalid signature.</value>
- </data>
- <data name="PEImageDoesNotHaveMetadata" xml:space="preserve">
- <value>PE image does not have metadata.</value>
- </data>
- <data name="InvalidCodedIndex" xml:space="preserve">
- <value>Invalid coded index.</value>
- </data>
- <data name="InvalidCompressedInteger" xml:space="preserve">
- <value>Invalid compressed integer.</value>
- </data>
- <data name="InvalidDocumentName" xml:space="preserve">
- <value>Invalid document name.</value>
- </data>
- <data name="RowIdOrHeapOffsetTooLarge" xml:space="preserve">
- <value>Row ID or heap offset is too large.</value>
- </data>
- <data name="EnCMapNotSorted" xml:space="preserve">
- <value>EnCMap table not sorted or has missing records.</value>
- </data>
- <data name="InvalidSerializedString" xml:space="preserve">
- <value>Invalid serialized string.</value>
- </data>
- <data name="StreamTooLarge" xml:space="preserve">
- <value>Stream length minus starting position is too large to hold a PEImage.</value>
- </data>
- <data name="NegativeByteCountOrOffset" xml:space="preserve">
- <value>Negative byte count or offset.</value>
- </data>
- <data name="ImageTooSmallOrContainsInvalidOffsetOrCount" xml:space="preserve">
- <value>Image is either too small or contains an invalid byte offset or count.</value>
- </data>
- <data name="LitteEndianArchitectureRequired" xml:space="preserve">
- <value>Little-endian architecture required.</value>
- </data>
- <data name="MetadataStringDecoderEncodingMustBeUtf8" xml:space="preserve">
- <value>The MetadataStringDecoder instance used to instantiate the Metadata reader must have a UTF8 encoding.</value>
- </data>
- <data name="InvalidConstantValue" xml:space="preserve">
- <value>Invalid constant value.</value>
- </data>
- <data name="InvalidConstantValueOfType" xml:space="preserve">
- <value>Value of type '{0}' is not a constant.</value>
- </data>
- <data name="InvalidImportDefinitionKind" xml:space="preserve">
- <value>Invalid import definition kind: {0}.</value>
- </data>
- <data name="ValueTooLarge" xml:space="preserve">
- <value>Value is too large.</value>
- </data>
- <data name="BlobTooLarge" xml:space="preserve">
- <value>Blob is to large.</value>
- </data>
- <data name="InvalidTypeSize" xml:space="preserve">
- <value>Invalid type size.</value>
- </data>
- <data name="HandleBelongsToFutureGeneration" xml:space="preserve">
- <value>Handle belongs to a future generation</value>
- </data>
- <data name="InvalidRowCount" xml:space="preserve">
- <value>Invalid row count: {0}</value>
- </data>
- <data name="InvalidEntryPointToken" xml:space="preserve">
- <value>Invalid entry point token: 0x{0:8X}</value>
- </data>
- <data name="TooManySubnamespaces" xml:space="preserve">
- <value>There are too many subnamespaces.</value>
- </data>
- <data name="TooManyExceptionRegions" xml:space="preserve">
- <value>There are too many exception regions.</value>
- </data>
- <data name="SequencePointValueOutOfRange" xml:space="preserve">
- <value>Sequence point value is out of range.</value>
- </data>
- <data name="InvalidDirectoryRVA" xml:space="preserve">
- <value>Invalid directory relative virtual address.</value>
- </data>
- <data name="InvalidDirectorySize" xml:space="preserve">
- <value>Invalid directory size.</value>
- </data>
- <data name="InvalidDebugDirectoryEntryCharacteristics" xml:space="preserve">
- <value>The value of field Characteristics in debug directory entry must be zero.</value>
- </data>
- <data name="UnexpectedCodeViewDataSignature" xml:space="preserve">
- <value>Unexpected CodeView data signature value.</value>
- </data>
- <data name="UnexpectedEmbeddedPortablePdbDataSignature" xml:space="preserve">
- <value>Unexpected Embedded Portable PDB data signature value.</value>
- </data>
- <data name="UnexpectedPdbChecksumDataSignature" xml:space="preserve">
- <value>Unexpected PDB Checksum data signature value.</value>
- </data>
- <data name="InvalidPdbChecksumDataFormat" xml:space="preserve">
- <value>Invalid PDB Checksum data format.</value>
- </data>
- <data name="UnexpectedSignatureHeader" xml:space="preserve">
- <value>Expected signature header for '{0}', but found '{1}' (0x{2:x2}).</value>
- </data>
- <data name="UnexpectedSignatureHeader2" xml:space="preserve">
- <value>Expected signature header for '{0}' or '{1}', but found '{2}' (0x{3:x2}).</value>
- </data>
- <data name="NotTypeDefOrRefHandle" xml:space="preserve">
- <value>Specified handle is not a TypeDefinitionHandle or TypeRefererenceHandle.</value>
- </data>
- <data name="UnexpectedSignatureTypeCode" xml:space="preserve">
- <value>Unexpected SignatureTypeCode: (0x{0:x}).</value>
- </data>
- <data name="SignatureTypeSequenceMustHaveAtLeastOneElement" xml:space="preserve">
- <value>Signature type sequence must have at least one element.</value>
- </data>
- <data name="NotTypeDefOrRefOrSpecHandle" xml:space="preserve">
- <value>Specified handle is not a TypeDefinitionHandle, TypeRefererenceHandle, or TypeSpecificationHandle.</value>
- </data>
- <data name="UnexpectedDebugDirectoryType" xml:space="preserve">
- <value>The Debug directory was not of type {0}.</value>
- </data>
- <data name="HeapSizeLimitExceeded" xml:space="preserve">
- <value>The limit on the size of {0} heap has been exceeded.</value>
- </data>
- <data name="BuilderMustAligned" xml:space="preserve">
- <value>Builder must be aligned to 4 byte boundary.</value>
- </data>
- <data name="BuilderAlreadyLinked" xml:space="preserve">
- <value>The operation is not valid on this builder as it has been linked with another one.</value>
- </data>
- <data name="ReturnedBuilderSizeTooSmall" xml:space="preserve">
- <value>The size of the builder returned by {0}.{1} is smaller than requested.</value>
- </data>
- <data name="SignatureNotVarArg" xml:space="preserve">
- <value>Can't add vararg parameters to non-vararg signature.</value>
- </data>
- <data name="LabelDoesntBelongToBuilder" xml:space="preserve">
- <value>Specified label doesn't belong to the current builder.</value>
- </data>
- <data name="ControlFlowBuilderNotAvailable" xml:space="preserve">
- <value>Can't emit a branch or exception region, the current encoder not created with a control flow builder.</value>
- </data>
- <data name="BaseReaderMustBeFullMetadataReader" xml:space="preserve">
- <value>Base reader must be a full metadata reader.</value>
- </data>
- <data name="ModuleAlreadyAdded" xml:space="preserve">
- <value>Module already added.</value>
- </data>
- <data name="AssemblyAlreadyAdded" xml:space="preserve">
- <value>Assembly already added.</value>
- </data>
- <data name="ExpectedListOfSize" xml:space="preserve">
- <value>Expected list of size {0}.</value>
- </data>
- <data name="ExpectedArrayOfSize" xml:space="preserve">
- <value>Expected array of size {0}.</value>
- </data>
- <data name="ExpectedNonEmptyList" xml:space="preserve">
- <value>Expected non-empty list.</value>
- </data>
- <data name="ExpectedNonEmptyArray" xml:space="preserve">
- <value>Expected non-empty array.</value>
- </data>
- <data name="ExpectedNonEmptyString" xml:space="preserve">
- <value>Expected non-empty string.</value>
- </data>
- <data name="ReadersMustBeDeltaReaders" xml:space="preserve">
- <value>Specified readers must be minimal delta metadata readers.</value>
- </data>
- <data name="SignatureProviderReturnedInvalidSignature" xml:space="preserve">
- <value>Signature provider returned invalid signature.</value>
- </data>
- <data name="UnknownSectionName" xml:space="preserve">
- <value>Unknown section name: '{0}'.</value>
- </data>
- <data name="HashTooShort" xml:space="preserve">
- <value>Hash must be at least {0}B long.</value>
- </data>
- <data name="UnexpectedArrayLength" xml:space="preserve">
- <value>Expected array of length {0}.</value>
- </data>
- <data name="ValueMustBeMultiple" xml:space="preserve">
- <value>Value must be multiple of {0}.</value>
- </data>
- <data name="MustNotReturnNull" xml:space="preserve">
- <value>{0} must not return null.</value>
- </data>
- <data name="MetadataVersionTooLong" xml:space="preserve">
- <value>Metadata version too long.</value>
- </data>
- <data name="RowCountMustBeZero" xml:space="preserve">
- <value>Row count must be zero for table #{0}.</value>
- </data>
- <data name="RowCountOutOfRange" xml:space="preserve">
- <value>Row count specified for table index {0} is out of allowed range.</value>
- </data>
- <data name="SizeMismatch" xml:space="preserve">
- <value>Declared size doesn't correspond to the actual size.</value>
- </data>
- <data name="DataTooBig" xml:space="preserve">
- <value>Data too big to fit in memory.</value>
- </data>
- <data name="UnsupportedFormatVersion" xml:space="preserve">
- <value>Unsupported format version: {0}</value>
- </data>
- <data name="DistanceBetweenInstructionAndLabelTooBig" xml:space="preserve">
- <value>The distance between the instruction {0} (offset {1}) and the target label doesn't fit the operand size: {2}</value>
- </data>
- <data name="LabelNotMarked" xml:space="preserve">
- <value>Label {0} has not been marked.</value>
- </data>
- <data name="MethodHasNoExceptionRegions" xml:space="preserve">
- <value>Method body was created with no exception regions.</value>
- </data>
- <data name="InvalidExceptionRegionBounds" xml:space="preserve">
- <value>Invalid exception region bounds: start offset ({0}) is greater than end offset ({1}).</value>
- </data>
- <data name="ArrayInitializedStateNotEqual" xml:space="preserve">
- <value>Object is not an array with the same initialization state as the array to compare it to.</value>
- </data>
- <data name="ArrayLengthsNotEqual" xml:space="preserve">
- <value>Object is not an array with the same number of elements as the array to compare it to.</value>
- </data>
- <data name="CannotFindOldValue" xml:space="preserve">
- <value>Cannot find the old value</value>
- </data>
- <data name="CapacityMustBeGreaterThanOrEqualToCount" xml:space="preserve">
- <value>Capacity was less than the current Count of elements.</value>
- </data>
- <data name="CapacityMustEqualCountOnMove" xml:space="preserve">
- <value>MoveToImmutable can only be performed when Count equals Capacity.</value>
- </data>
- <data name="InvalidOperationOnDefaultArray" xml:space="preserve">
- <value>This operation cannot be performed on a default instance of ImmutableArray<T>. Consider initializing the array, or checking the ImmutableArray<T>.IsDefault property.</value>
- </data>
-</root>
-
+++ /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;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace System.Runtime.InteropServices
-{
- internal static class Marshal
- {
- public static void Copy(IntPtr source, byte[] destination, int startIndex, int length)
- {
- PInvokeMarshal.CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(byte[] array, int startIndex, IntPtr destination, int length)
- {
- PInvokeMarshal.CopyToNative(array, startIndex, destination, length);
- }
-
- public static IntPtr AllocHGlobal(int cb)
- {
- return PInvokeMarshal.AllocHGlobal(cb);
- }
-
- public static void FreeHGlobal(IntPtr hglobal)
- {
- PInvokeMarshal.FreeHGlobal(hglobal);
- }
- }
-}
+++ /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;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace System.Linq
-{
- internal static class MiniLinq
- {
- /// <summary>Converts an enumerable to an array.</summary>
- /// <param name="source">The enumerable to convert.</param>
- /// <returns>The resulting array.</returns>
- internal static List<T> ToList<T>(this IEnumerable<T> source)
- {
- Debug.Assert(source != null);
- return new List<T>(source);
- }
-
- /// <summary>Converts an enumerable to an array.</summary>
- /// <param name="source">The enumerable to convert.</param>
- /// <returns>The resulting array.</returns>
- internal static T[] ToArray<T>(this IEnumerable<T> source)
- {
- Debug.Assert(source != null);
-
- var collection = source as ICollection<T>;
- if (collection != null)
- {
- int count = collection.Count;
- if (count == 0)
- {
- return Array.Empty<T>();
- }
-
- var result = new T[count];
- collection.CopyTo(result, arrayIndex: 0);
- return result;
- }
-
- using (var en = source.GetEnumerator())
- {
- if (en.MoveNext())
- {
- const int DefaultCapacity = 4;
- T[] arr = new T[DefaultCapacity];
- arr[0] = en.Current;
- int count = 1;
-
- while (en.MoveNext())
- {
- if (count == arr.Length)
- {
- // MaxArrayLength is defined in Array.MaxArrayLength and in gchelpers in CoreCLR.
- // It represents the maximum number of elements that can be in an array where
- // the size of the element is greater than one byte; a separate, slightly larger constant,
- // is used when the size of the element is one.
- const int MaxArrayLength = 0x7FEFFFFF;
-
- // This is the same growth logic as in List<T>:
- // If the array is currently empty, we make it a default size. Otherwise, we attempt to
- // double the size of the array. Doubling will overflow once the size of the array reaches
- // 2^30, since doubling to 2^31 is 1 larger than Int32.MaxValue. In that case, we instead
- // constrain the length to be MaxArrayLength (this overflow check works because of the
- // cast to uint). Because a slightly larger constant is used when T is one byte in size, we
- // could then end up in a situation where arr.Length is MaxArrayLength or slightly larger, such
- // that we constrain newLength to be MaxArrayLength but the needed number of elements is actually
- // larger than that. For that case, we then ensure that the newLength is large enough to hold
- // the desired capacity. This does mean that in the very rare case where we've grown to such a
- // large size, each new element added after MaxArrayLength will end up doing a resize.
- int newLength = count << 1;
- if ((uint)newLength > MaxArrayLength)
- {
- newLength = MaxArrayLength <= count ? count + 1 : MaxArrayLength;
- }
-
- Array.Resize(ref arr, newLength);
- }
-
- arr[count++] = en.Current;
- }
-
- if (count != arr.Length)
- Array.Resize(ref arr, count);
-
- return arr;
- }
- else
- {
- return Array.Empty<T>();
- }
- }
- }
- }
-}
\ 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;
-using System.Collections.Generic;
-
-namespace System.Reflection
-{
- internal static partial class RuntimeReflectionExtensions
- {
- public static MethodInfo GetRuntimeMethod(this Type type, string name, Type[] parameters)
- {
- if (type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
- return type.GetMethod(name, parameters);
- }
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <AssemblyName>System.Private.Reflection.Metadata.Ecma335</AssemblyName>
- <RootNamespace>System.Reflection.Metadata</RootNamespace>
- <FileAlignment>512</FileAlignment>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DefaultLanguage>en-US</DefaultLanguage>
- <CLSCompliant>false</CLSCompliant>
- <NoWarn>$(NoWarn);3021</NoWarn>
- <DefineConstants>$(DefineConstants);CORERT</DefineConstants>
- <SystemReflectionMetadataPath>..\..\System.Reflection.Metadata\src\</SystemReflectionMetadataPath>
- </PropertyGroup>
- <ItemGroup>
- <ReferenceFromRuntime Include="System.Private.CoreLib" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\ExceptionUtilities.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\PathUtilities.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\FunctionPointerAttributes.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\MethodBodyAttributes.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\SerializedMetadataHeaps.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\EntityHandle.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\VirtualHeap.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\GuidHeap.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\BlobHeap.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\StringHeap.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PooledBlobBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Blob.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\BlobWriter.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\BlobWriterImpl.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\BlobBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\BlobBuilder.Enumerators.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\ByteSequenceComparer.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\DecimalUtilities.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\EnumerableExtensions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\PortablePdbVersions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\ReservedBlob.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\CustomAttributeNamedArgument.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\CustomAttributeTypedArgument.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\CustomAttributeValue.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Decoding\ICustomAttributeTypeProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\LabelHandle.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\IL\ILOpCode.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\CodedIndex.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataSizes.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\IL\ILOpCodeExtensions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\ImageFormatLimitationException.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\HeapSizeFlag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataStreamOptions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataReaderProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\BlobContentId.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\PrimitiveSerializationTypeCode.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\ManagedPEBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\ManagedTextSection.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEDirectoriesBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEHeaderBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\ResourceSectionBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\SectionLocation.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\BlobUtilities.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="$(SystemReflectionMetadataPath)Properties\InternalsVisibleTo.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\AbstractMemoryBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\ByteArrayMemoryBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\ByteArrayMemoryProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\ExternalMemoryBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\ExternalMemoryBlockProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\MemoryBlockProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\MemoryMappedFileBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\NativeHeapMemoryBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\StreamConstraints.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\CriticalDisposableObject.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\PinnedObject.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\BitArithmetic.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\StringUtils.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\EmptyArray.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\EncodingHelper.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\FileStreamReadLightUp.netstandard1.1.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\Hash.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\ImmutableByteArrayInterop.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\ImmutableMemoryStream.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\LightUpHelper.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\MemoryBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\MemoryMapLightUp.netstandard1.1.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\PooledStringBuilder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\ObjectPool`1.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\ReadOnlyUnmanagedMemoryStream.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Internal\Utilities\StreamExtensions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\AssemblyDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\AssemblyFile.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\AssemblyReference.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\BlobReader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\Constant.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\ConstantTypeCode.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\CustomAttribute.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\CustomAttributeNamedArgumentKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\DeclarativeSecurityAttribute.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\ArrayShape.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Decoding\ISZArrayTypeProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Decoding\ISignatureTypeProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Decoding\ISimpleTypeProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SignatureTypeKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Decoding\IConstructedTypeProvider.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\SignatureDecoder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\MethodSignature.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\PrimitiveTypeCode.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\EditAndContinueLogEntry.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\EditAndContinueOperation.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\ExportedTypeExtensions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\HeapIndex.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataReaderExtensions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataTokens.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\TableIndex.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\EventDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\IL\ExceptionRegion.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\IL\ExceptionRegionKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\ExportedType.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\FieldDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\GenericParameter.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\GenericParameterConstraint.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\HandleCollections.TypeSystem.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\HandleComparer.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\HandleKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Handle.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\InterfaceImplementation.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\COR20Constants.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\CorElementType.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\CustomAttributeTypeTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\HasConstantTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\HasCustomAttributeTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\HasDeclSecurityTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\HasFieldMarshalTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\HasSemanticsTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\UserStringHeap.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\ImplementationTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\MemberForwardedTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\MemberRefParentTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\MetadataFlags.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\MetadataStreamConstants.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\MethodDefOrRefTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\NamespaceCache.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\NamespaceData.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\ResolutionScopeTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\StreamHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\Tables.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\Treatments.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\TypeDefOrRefTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Internal\TypeOrMethodDefTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\ManifestResource.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\MemberReference.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\StandaloneSignatureKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\MemberReferenceKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Ecma335\MetadataAggregator.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataReader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataReader.WinMD.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataReaderOptions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataStringComparer.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\MetadataStringDecoder.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\IL\MethodBodyBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\MethodDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\MethodImplementation.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\MethodImport.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\MethodSpecification.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\ModuleDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\ModuleReference.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\NamespaceDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\Parameter.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\CustomDebugInformation.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\DebugMetadataHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\Document.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\DocumentNameBlobHandle.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\HandleCollections.Debug.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\Handles.Debug.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\HasCustomDebugInformationTag.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\ImportDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\ImportDefinitionKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\ImportDefinitionCollection.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\LocalConstant.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\ImportScope.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\LocalScope.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\LocalVariable.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\LocalVariableAttributes.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\MethodDebugInformation.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\SequencePoint.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\SequencePointCollection.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PortablePdb\Tables.Debug.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\PEReaderExtensions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\PropertyDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SerializationTypeCode.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SignatureAttributes.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SignatureCallingConvention.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SignatureHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SignatureKind.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\Signatures\SignatureTypeCode.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\StandaloneSignature.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\TypeDefinition.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\TypeLayout.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\TypeReference.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Metadata\TypeSystem\TypeSpecification.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\CoffHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\CorFlags.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\CorHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\DebugDirectory\CodeViewDebugDirectoryData.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\DebugDirectory\PdbChecksumDebugDirectoryData.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryEntry.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryEntryType.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\DirectoryEntry.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\Machine.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEBinaryReader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEFileFlags.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEHeaders.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEMemoryBlock.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEReader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\PEStreamOptions.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\PortableExecutable\SectionHeader.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\Throw.cs" />
- <Compile Include="$(SystemReflectionMetadataPath)System\Reflection\System.Reflection.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Shims\Marshal.cs" />
- <Compile Include="Shims\MiniLinq.cs" />
- <Compile Include="Shims\RuntimeReflectionExtensions.cs" />
- <Compile Include="..\..\Common\src\System\Diagnostics\CodeAnalysis\ExcludeFromCodeCoverageAttribute.cs" />
- <Compile Include="..\..\Common\src\CoreLib\System\Runtime\Versioning\NonVersionableAttribute.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\Validation\ValidatedNotNullAttribute.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\Validation\Requires.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableExtensions.Minimal.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableArray.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableArray_1.Minimal.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableArray_1.Builder.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableArray_1.Builder.DebuggerProxy.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\ImmutableArray_1.Enumerator.cs" />
- <Compile Include="..\..\System.Collections.Immutable\src\System\Collections\Immutable\IImmutableArray.cs" />
- </ItemGroup>
-</Project>
\ No newline at end of file
<AssemblyVersion>4.0.5.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<AssemblyName>System.Private.Uri</AssemblyName>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\System\Collections\Generic\ArrayBuilder.cs">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="UriRelativeResolutionTest.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AppxUriValue.cs" />
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Private.Xml.Linq</AssemblyName>
<RootNamespace>System.Xml</RootNamespace>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
AddContentSkipNotify(other.content);
}
-#if uap
- // XmlSerializer needs to reflect on the default constructor of XElement.
- // We need to make the ctor public on UWP to keep the metadata for it.
- public XElement()
-#else
internal XElement()
-#endif
: this("default")
{
}
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DeepEquals.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="StreamExtensions.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>XDocument.Common</AssemblyName>
<RootNamespace>CoreXml.Test.XLinq</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BridgeHelpers.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EventsAdd.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Annotation.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);xUnit1013</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Collections\DictionaryExtensions.cs">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);xUnit1013</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ClassStamp.cs" />
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<RootNamespace>System.Xml</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS1573;649;169;414</NoWarn>
- <FeatureCompiledXsl Condition="'$(TargetGroup)' != 'uap'">true</FeatureCompiledXsl>
- <DefineConstants Condition="'$(FeatureCompiledXsl)' == 'true'">$(DefineConstants);FEATURE_COMPILED_XSL</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>
+ <DefineConstants>$(DefineConstants);FEATURE_COMPILED_XSL</DefineConstants>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\CoreLib\System\Text\StringBuilderCache.cs">
<Reference Include="System.Threading.Tasks" />
<Reference Include="System.Threading.Thread" />
</ItemGroup>
- <ItemGroup Condition="'$(FeatureCompiledXsl)' == 'true'">
+ <ItemGroup>
<Compile Include="System\Xml\Xsl\IlGen\GenerateHelper.cs" />
<Compile Include="System\Xml\Xsl\IlGen\IteratorDescriptor.cs" />
<Compile Include="System\Xml\Xsl\IlGen\OptimizerPatterns.cs" />
<Compile Include="System\Xml\Xsl\IlGen\XmlIlVisitor.cs" />
<Compile Include="System\Xml\Xsl\XmlIlGenerator.cs" />
<Compile Include="System\Xml\Xsl\XmlILCommand.cs" />
- </ItemGroup>
- <ItemGroup>
<Compile Include="System\Xml\Xsl\ISourceLineInfo.cs" />
<Compile Include="System\Xml\Xsl\ListBase.cs" />
<Compile Include="System\Xml\Xsl\Pair.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>XmlMiscTests</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="RandomizedHashing.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CharReaderTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CReaderTestModule.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="FactoryReaderTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CNameTableTestModule.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ConformanceSettings.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="InheritedCases.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="InheritedCases.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CFactoryModule.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EndOfLineHandlingTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<DefineConstants>$(DefineConstants);FEATURE_XML_XPATH_ID</DefineConstants>
<RootNamespace>System.Xml.XPath.Tests</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<CommonPathXPath>$(CommonPath)\System\Xml\XPath</CommonPathXPath>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<DefineConstants>$(DefineConstants);FEATURE_XML_XPATH_ID</DefineConstants>
<RootNamespace>System.Xml.XPath.XmlDocument.Tests</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<CommonPathXPath>$(CommonPath)\System\Xml\XPath</CommonPathXPath>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EncodeDecodeTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\ShouldNotBeInvokedException.cs">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="NodeReaderTestHelper.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ReadAsArrayTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncReaderLateInitTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="XmlSystemPathResolverTests.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>XmlReaderTest.Common</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CDataReader.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<None Include="$(SourceDir)\System.Private.Xml\src\Utils\DTDs\XHTML10\no_comments\xhtml1-frameset.dtd">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CError.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Constructor_AddSchema.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DisposeTests.cs" />
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Writer, DocType.XPathDocument)]
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Stream, DocType.XPathDocument)]
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.TextWriter, DocType.XPathDocument)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Absolute path access is denied in uap")]
[Theory]
public void TC_AbsolutePath_Transform(InputType inputType, ReaderType readerType, TransformType transformType, DocType docType)
{
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Writer, DocType.XPathDocument)]
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.Stream, DocType.XPathDocument)]
[InlineData(InputType.Navigator, ReaderType.XmlValidatingReader, TransformType.TextWriter, DocType.XPathDocument)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Absolute path access is denied in uap")]
[Theory]
public void TC_AbsolutePath_Transform(InputType inputType, ReaderType readerType, TransformType transformType, DocType docType)
{
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="cthread.cs" />
static XsltApiTestCaseBase()
{
- // On uap access is denied to full path and the code below and related tests cannot run
- if (!PlatformDetection.IsUap)
+ // In AppContainer access is denied to full path and the code below and related tests cannot run
+ if (!PlatformDetection.IsInAppContainer)
{
Directory.CreateDirectory(Path.GetDirectoryName(s_temporaryResolverDocumentFullName));
<PropertyGroup>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>ECMA</StrongNameKeyId>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CustomAssemblyAttributes.cs" />
<AssemblyVersion>4.0.5.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations)
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.DispatchProxy.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap' OR '$(TargetGroup)' == 'netcoreapp'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap-Windows_NT;
netfx;
</BuildConfigurations>
</PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- this library depends on Ref.Emit which is not available for netstandard -->
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_ReflectionDispatchProxy</GeneratePlatformNotSupportedAssemblyMessage>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp2.0-Debug;netcoreapp2.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp2.0-Debug;netcoreapp2.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
<Compile Include="System\Reflection\DispatchProxy.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DispatchProxyTests.cs" />
<AssemblyVersion Condition="'$(TargetsNetStandard)' == 'true'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
<!-- Use inbox facade on netfx -->
_netfx;
</BuildConfigurations>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.Emit.ILGeneration.cs" />
- <Compile Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'" Include="System.Reflection.Emit.ILGeneration.netcore.cs" />
+ <Compile Include="System.Reflection.Emit.ILGeneration.netcore.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' != 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj" />
<ProjectReference Include="..\..\System.Reflection\ref\System.Reflection.csproj" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
$(PackageConfigurations);
</BuildConfigurations>
</PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetsNetStandard)' != 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_RefEmitILGeneration</GeneratePlatformNotSupportedAssemblyMessage>
<OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
<AssemblyVersion Condition="'$(TargetsNetStandard)' == 'true'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
<!-- Use inbox facade on netfx -->
_netfx;
</BuildConfigurations>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.Emit.Lightweight.cs" />
- <Compile Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'" Include="System.Reflection.Emit.Lightweight.netcore.cs" />
+ <Compile Include="System.Reflection.Emit.Lightweight.netcore.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" Condition="'$(TargetGroup)' != 'netstandard'" />
+ <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" Condition="'$(TargetsNetStandard)' != 'true'" />
<ProjectReference Include="..\..\System.Reflection.Emit.ILGeneration\ref\System.Reflection.Emit.ILGeneration.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
$(PackageConfigurations);
</BuildConfigurations>
</PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetsNetStandard)' != 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_RefEmitLightweight</GeneratePlatformNotSupportedAssemblyMessage>
<OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
<AssemblyVersion Condition="'$(TargetsNetStandard)' == 'true'">4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
- <IsUAPRef>false</IsUAPRef>
</PropertyGroup>
</Project>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
<!-- Use inbox facade on netfx -->
_netfx;
</BuildConfigurations>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.Emit.cs" />
- <Compile Include="System.Reflection.Emit.netcore.cs" Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'" />
+ <Compile Include="System.Reflection.Emit.netcore.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj" />
<ProjectReference Include="..\..\System.Reflection.Primitives\ref\System.Reflection.Primitives.csproj" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
$(PackageConfigurations);
</BuildConfigurations>
</PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetsNetStandard)' != 'true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_RefEmit</GeneratePlatformNotSupportedAssemblyMessage>
<OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' == 'true'">
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.Extensions.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.Reflection.Extensions</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>1.4.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLSCompliant>false</CLSCompliant>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.Metadata.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' Or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Collections.Immutable\ref\System.Collections.Immutable.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.1'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1'">
<Reference Include="System.IO" />
<Reference Include="System.Reflection.Primitives" />
<Reference Include="System.Runtime" />
<Reference Include="System.Text.Encoding" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard' Or '$(TargetGroup)' == 'netstandard1.1'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' == 'true'">
<ProjectReference Include="..\..\System.Collections.Immutable\ref\System.Collections.Immutable.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <RootNamespace>System.Reflection.Metadata</RootNamespace>
<FileAlignment>512</FileAlignment>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefaultLanguage>en-US</DefaultLanguage>
<CLSCompliant>false</CLSCompliant>
- <TargetsNetCoreAppOrUap Condition="'$(TargetsNetCoreApp)'=='true' OR '$(TargetsUap)' == 'true'">true</TargetsNetCoreAppOrUap>
- <PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8</PackageTargetFramework>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <PackageTargetFramework Condition="'$(TargetFramework)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8</PackageTargetFramework>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Reflection\Internal\Utilities\PinnedObject.cs" />
- <Compile Include="System\Reflection\Internal\Utilities\CriticalDisposableObject.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
- <Compile Include="System\Reflection\Internal\Utilities\CriticalDisposableObject.netstandard1.1.cs" Condition="'$(TargetGroup)' == 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Internal\Utilities\CriticalDisposableObject.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Internal\Utilities\CriticalDisposableObject.netstandard1.1.cs" Condition="'$(TargetFramework)' == 'netstandard1.1'" />
<Compile Include="System\Reflection\Internal\Utilities\ExceptionUtilities.cs" />
<Compile Include="System\Reflection\Internal\Utilities\PathUtilities.cs" />
<Compile Include="System\Reflection\Metadata\Ecma335\Encoding\FunctionPointerAttributes.cs" />
<Compile Include="System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs" />
<Compile Include="System\Reflection\Metadata\IL\ILOpCodeExtensions.cs" />
<Compile Include="System\Reflection\Metadata\ImageFormatLimitationException.cs" />
- <Compile Include="System\Reflection\Metadata\ImageFormatLimitationException.Serialization.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Metadata\ImageFormatLimitationException.Serialization.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
<Compile Include="System\Reflection\Metadata\Internal\HeapSizeFlag.cs" />
<Compile Include="System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs" />
<Compile Include="System\Reflection\Metadata\MetadataStreamOptions.cs" />
<Compile Include="System\Reflection\Metadata\MetadataReaderProvider.cs" />
<Compile Include="System\Reflection\Metadata\BlobContentId.cs" />
<Compile Include="System\Reflection\Metadata\Signatures\PrimitiveSerializationTypeCode.cs" />
- <Compile Include="System\Reflection\Metadata\TypeSystem\AssemblyDefinition.netstandard.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
- <Compile Include="System\Reflection\Metadata\TypeSystem\AssemblyReference.netstandard.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Metadata\TypeSystem\AssemblyDefinition.netstandard.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Metadata\TypeSystem\AssemblyReference.netstandard.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
<Compile Include="System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs" />
<Compile Include="System\Reflection\PortableExecutable\ManagedPEBuilder.cs" />
<Compile Include="System\Reflection\PortableExecutable\ManagedTextSection.cs" />
<Compile Include="System\Reflection\Internal\Utilities\BitArithmetic.cs" />
<Compile Include="System\Reflection\Internal\Utilities\StringUtils.cs" />
<Compile Include="System\Reflection\Internal\Utilities\EmptyArray.cs" />
- <Compile Include="System\Reflection\Internal\Utilities\EncodingHelper.cs" Condition="'$(TargetsNetCoreAppOrUap)' != 'true'" />
- <Compile Include="System\Reflection\Internal\Utilities\EncodingHelper.netcoreapp.cs" Condition="'$(TargetsNetCoreAppOrUap)' == 'true'" />
- <Compile Include="System\Reflection\Internal\Utilities\FileStreamReadLightUp.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
- <Compile Include="System\Reflection\Internal\Utilities\FileStreamReadLightUp.netstandard1.1.cs" Condition="'$(TargetGroup)' == 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Internal\Utilities\EncodingHelper.cs" Condition="'$(TargetsNetCoreApp)' != 'true'" />
+ <Compile Include="System\Reflection\Internal\Utilities\EncodingHelper.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true'" />
+ <Compile Include="System\Reflection\Internal\Utilities\FileStreamReadLightUp.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Internal\Utilities\FileStreamReadLightUp.netstandard1.1.cs" Condition="'$(TargetFramework)' == 'netstandard1.1'" />
<Compile Include="System\Reflection\Internal\Utilities\Hash.cs" />
<Compile Include="System\Reflection\Internal\Utilities\ImmutableByteArrayInterop.cs" />
<Compile Include="System\Reflection\Internal\Utilities\ImmutableMemoryStream.cs" />
- <Compile Include="System\Reflection\Internal\Utilities\LightUpHelper.cs" Condition="'$(TargetsNetCoreAppOrUap)' != 'true'" />
+ <Compile Include="System\Reflection\Internal\Utilities\LightUpHelper.cs" Condition="'$(TargetsNetCoreApp)' != 'true'" />
<Compile Include="System\Reflection\Internal\Utilities\MemoryBlock.cs" />
- <Compile Include="System\Reflection\Internal\Utilities\MemoryMapLightUp.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
- <Compile Include="System\Reflection\Internal\Utilities\MemoryMapLightUp.netstandard1.1.cs" Condition="'$(TargetGroup)' == 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Internal\Utilities\MemoryMapLightUp.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Internal\Utilities\MemoryMapLightUp.netstandard1.1.cs" Condition="'$(TargetFramework)' == 'netstandard1.1'" />
<Compile Include="System\Reflection\Internal\Utilities\PooledStringBuilder.cs" />
<Compile Include="System\Reflection\Internal\Utilities\ObjectPool`1.cs" />
<Compile Include="System\Reflection\Internal\Utilities\ReadOnlyUnmanagedMemoryStream.cs" />
<Compile Include="System\Reflection\Metadata\Signatures\MemberReferenceKind.cs" />
<Compile Include="System\Reflection\Metadata\Ecma335\MetadataAggregator.cs" />
<Compile Include="System\Reflection\Metadata\MetadataKind.cs" />
- <Compile Include="System\Reflection\Metadata\MetadataReader.netstandard.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
+ <Compile Include="System\Reflection\Metadata\MetadataReader.netstandard.cs" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
<Compile Include="System\Reflection\Metadata\MetadataReader.cs" />
<Compile Include="System\Reflection\Metadata\MetadataReader.WinMD.cs" />
<Compile Include="System\Reflection\Metadata\MetadataReaderOptions.cs" />
<Reference Include="System.Text.Encoding" />
<Reference Include="System.Text.Encoding.Extensions" />
<Reference Include="System.Threading" />
- <Reference Include="System.IO.MemoryMappedFiles" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
- <Reference Include="System.Buffers" Condition="'$(TargetsNetCoreAppOrUap)' == 'true'" />
+ <Reference Include="System.IO.MemoryMappedFiles" Condition="'$(TargetFramework)' != 'netstandard1.1'" />
+ <Reference Include="System.Buffers" Condition="'$(TargetsNetCoreApp)' == 'true'" />
</ItemGroup>
</Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<ItemGroup>
<ProjectReference Include="..\ref\System.Reflection.MetadataLoadContext.csproj">
- <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(UAPvNextTFM);$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
<ProjectReference Include="..\src\System.Reflection.MetadataLoadContext.csproj" />
</ItemGroup>
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\TempDirectory.cs">
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Reflection.Primitives</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<AssemblyVersion>4.1.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
netfx;
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Reflection.TypeExtensions</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release;netstandard1.5-Debug;netstandard1.5-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;netstandard1.3-Debug;netstandard1.3-Release;netstandard1.5-Debug;netstandard1.5-Release</Configurations>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)' == 'netstandard1.3' OR '$(TargetGroup)' == 'netstandard1.5'">
+ <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netstandard1.5'">
<GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_ReflectionTypeExtensions</GeneratePlatformNotSupportedAssemblyMessage>
- <AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.3'">4.0.0.0</AssemblyVersion>
- <AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.5'">4.1.0.0</AssemblyVersion>
+ <AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard1.3'">4.0.0.0</AssemblyVersion>
+ <AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard1.5'">4.1.0.0</AssemblyVersion>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' != 'netstandard1.3' AND '$(TargetGroup)' != 'netstandard1.5'">
+ <ItemGroup Condition="'$(TargetFramework)' != 'netstandard1.3' AND '$(TargetFramework)' != 'netstandard1.5'">
<Compile Include="System\Reflection\Requires.cs" />
<Compile Include="System\Reflection\TypeExtensions.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="mscorlib" Condition="'$(TargetsNetFx)' == 'true'" />
- <ReferenceFromRuntime Include="System.Private.CoreLib" Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'" />
+ <ReferenceFromRuntime Include="System.Private.CoreLib" Condition="'$(TargetsNetCoreApp)' == 'true'" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.3' OR '$(TargetGroup)' == 'netstandard1.5'">
+ <ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netstandard1.5'">
<Reference Include="System.Reflection" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Reflection.cs" />
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Reflection</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
}
[Fact]
- [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 UWP")]
public static void GetAssemblyName_LockedFile()
{
using (var tempFile = new TempFile(Path.GetTempFileName(), 100))
string assemblyNamePrefix = "System.Reflection.Tests.Assembly_";
// Requested version 1.0 does not load 0.0.0.0, but loads 1.2.0.0, 3.0.0.0
- if (PlatformDetection.IsUap)
- Assert.Throws<FileLoadException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0")));
- else
- Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0")));
+ Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "0_0_0_0, Version=1.0")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_2_0_0, Version=1.0")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "3_0_0_0, Version=1.0")));
// Requested version 1.1 does not load 1.0.0.0, but loads 1.1.2.0, 1.3.0.0
- if (PlatformDetection.IsUap)
- Assert.Throws<FileLoadException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1")));
- else
- Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1")));
+ Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_0_0_0, Version=1.1")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_2_0, Version=1.1")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_3_0_0, Version=1.1")));
// Requested version 1.1.1 does not load 1.1.0.0, but loads 1.1.1.2, 1.1.3.0
- if (PlatformDetection.IsUap)
- Assert.Throws<FileLoadException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1")));
- else
- Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1")));
+ Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_0_0, Version=1.1.1")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_2, Version=1.1.1")));
Assert.NotNull(Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_3_0, Version=1.1.1")));
// Requested version 1.1.1.1 does not load 1.1.1.0, but loads 1.1.1.3
- if (PlatformDetection.IsUap)
- Assert.Throws<FileLoadException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1")));
- else
- Assert.Throws<FileNotFoundException>(() => Assembly.Load(new AssemblyName(assemblyNamePrefix + "1_1_1_0, Version=1.1.1.1")));
+ 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")));
Assert.NotNull(typeof(AssemblyVersion.Program_0_0_0_0));
{
Assert.NotNull(Assembly.GetEntryAssembly());
string assembly = Assembly.GetEntryAssembly().ToString();
- bool correct = assembly.IndexOf("xunit.console", StringComparison.OrdinalIgnoreCase) != -1 ||
- assembly.IndexOf("Microsoft.DotNet.XUnitRunnerUap", StringComparison.OrdinalIgnoreCase) != -1;
+ bool correct = assembly.IndexOf("xunit.console", StringComparison.OrdinalIgnoreCase) != -1;
Assert.True(correct, $"Unexpected assembly name {assembly}");
}
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile() not supported on UWP")]
public void LoadFile()
{
Assembly currentAssembly = typeof(AssemblyTests).Assembly;
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public void LoadFile_NullPath_Netcore_ThrowsArgumentNullException()
{
AssertExtensions.Throws<ArgumentNullException>("path", () => Assembly.LoadFile(null));
}
[Fact]
- [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 UWP")]
public void AssemblyLoadFromBytes()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
}
[Fact]
- [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 UWP")]
public void AssemblyLoadFromBytesWithSymbols()
{
Assembly assembly = typeof(AssemblyTests).Assembly;
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
<!-- LoadFrom_SameIdentityAsAssemblyWithDifferentPath_ReturnsEqualAssemblies test relies on no deps.json -->
<GenerateDependencyFile>false</GenerateDependencyFile>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
<TestDataPackageVersion>1.0.9</TestDataPackageVersion>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
</PropertyGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Resources.Reader.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AssemblyName>System.Resources.Reader</AssemblyName>
<RootNamespace>System.Resources</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Resources.ResourceManager" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Resources.ResourceManager</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Diagnostics.Tools" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
[Theory]
[MemberData(nameof(CultureResourceData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP build not configured correctly for culture fallback")]
public static void GetString_CultureFallback(string key, string cultureName, string expectedValue)
{
Type resourceType = typeof(Resources.TestResx);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP does not use satellite assemblies in most cases")]
public static void GetString_ExpectEvents()
{
RemoteExecutor.Invoke(() =>
[Theory]
[MemberData(nameof(EnglishResourceData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "When getting resources from PRI file the casing doesn't matter, if it is there it will always find and return the resource")]
public static void IgnoreCase(string key, string expectedValue)
{
var manager = new ResourceManager("System.Resources.Tests.Resources.TestResx", typeof(ResourceManagerTests).GetTypeInfo().Assembly);
yield return new object[] { "Icon", new Icon("icon.ico") };
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(EnglishImageResourceData))]
public static void GetObject_Images(string key, object expectedValue)
Assert.Equal(GetImageData(expectedValue), GetImageData(manager.GetObject(key, new CultureInfo("en-US"))));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(EnglishImageResourceData))]
public static void GetObject_Images_ResourceSet(string key, object expectedValue)
Assert.Equal(expectedValue, set.GetObject(key));
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[ConditionalTheory(Helpers.IsDrawingSupported)]
[MemberData(nameof(EnglishImageResourceData))]
public static void GetResourceSet_Images(string key, object expectedValue)
<BinPlaceSatelliteAssemblies>true</BinPlaceSatelliteAssemblies>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MissingManifestResourceExceptionTests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Resources.Writer.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>System.Resources.Writer</AssemblyName>
<RootNamespace>System.Resources</RootNamespace>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Resources\__FastResourceComparer.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ResourceWriterUnitTest.cs" />
<PropertyGroup>
<AssemblyName>System.Runtime.Caching</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
<Configurations>netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.0.5.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnsafeTests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.CompilerServices.VisualC.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Runtime.CompilerServices.VisualC</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Shared CoreCLR -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\CompilerServices\RequiredAttributeAttributeTests.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Diagnostics.Debug\src\System.Diagnostics.Debug.csproj" />
<ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap'">
- <Reference Include="mscorlib" />
- <Reference Include="Windows" />
- </ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System\AppDomainTests.netcoreapp.cs" />
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21410", TargetFrameworkMonikers.Uap)]
public void ProcessExit_Called()
{
string path = GetTestFilePath();
}
[Fact]
- [ActiveIssue("https://github.com/dotnet/corefx/issues/18718", TargetFrameworkMonikers.Uap)] // Need to copy files out of execution directory
public void ExecuteAssembly()
{
CopyTestAssemblies();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.Load(byte[])")]
public void LoadBytes()
{
Assembly assembly = typeof(AppDomainTests).Assembly;
#pragma warning restore 618
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")]
public void GetAssemblies()
{
RemoteExecutor.Invoke(() => {
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")]
public void AssemblyLoad()
{
RemoteExecutor.Invoke(() => {
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")]
public void AssemblyResolve()
{
CopyTestAssemblies();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Does not support Assembly.LoadFile")]
public void AssemblyResolve_RequestingAssembly()
{
CopyTestAssemblies();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "In UWP the resources always exist in the resources.pri file even if the assembly is not loaded")]
public void ResourceResolve()
{
RemoteExecutor.Invoke(() => {
[InlineData(1)] // setting ExitCode and exiting Main
[InlineData(2)] // setting ExitCode both from Main and from an Unloading event handler.
[InlineData(3)] // using Exit(exitCode)
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21415", TargetFrameworkMonikers.Uap)]
public static void ExitCode_VoidMainAppReturnsSetValue(int mode)
{
int expectedExitCode = 123;
namespace System.Tests
{
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21413", TargetFrameworkMonikers.Uap)]
public class GetCommandLineArgs
{
public static IEnumerable<object[]> GetCommandLineArgs_TestData()
return false;
}
- return target == EnvironmentVariableTarget.Process || (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !PlatformDetection.IsUap);
+ return target == EnvironmentVariableTarget.Process || RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
}
[Fact]
catch (SecurityException)
{
shouldCleanUp = false;
- Assert.True(target == EnvironmentVariableTarget.Machine || (target == EnvironmentVariableTarget.User && PlatformDetection.IsUap),
- "only machine target, or user when in uap, should have access issues");
+ Assert.True(target == EnvironmentVariableTarget.Machine, "only machine target should have access issues");
Assert.True(PlatformDetection.IsWindows, "and it should be Windows");
Assert.False(PlatformDetection.IsWindowsAndElevated, "and we shouldn't be elevated");
}
public class EnvironmentUserDomainName
{
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)]
- public void UserDomainNameIsHardCodedOnUap()
+ public void UserDomainNameIsCorrect()
{
- Assert.Equal("Windows Domain", Environment.UserDomainName);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
- public void UserDomainNameIsCorrectOnNonUap()
- {
- // Highly unlikely anyone is using domain with this name
- Assert.NotEqual("Windows Domain", Environment.UserDomainName);
+ if (PlatformDetection.IsInAppContainer)
+ {
+ Assert.Equal("Windows Domain", Environment.UserDomainName);
+ }
+ else
+ {
+ // Highly unlikely anyone is using domain with this name
+ Assert.NotEqual("Windows Domain", Environment.UserDomainName);
+ }
}
[Fact]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)]
public void UserDomainName_MatchesEnvironment_Windows()
{
public class EnvironmentUserName
{
[Fact]
- [SkipOnTargetFramework(~TargetFrameworkMonikers.Uap)]
- public void UserNameIsHardCodedOnUap()
+ public void UserNameIsCorrect()
{
- Assert.Equal("Windows User", Environment.UserName);
- }
-
- [Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
- public void UserNameIsCorrectOnNonUap()
- {
- // Highly unlikely anyone is using user with this name
- Assert.NotEqual("Windows User", Environment.UserName);
+ if (PlatformDetection.IsInAppContainer)
+ {
+ Assert.Equal("Windows User", Environment.UserName);
+ }
+ else
+ {
+ // Highly unlikely anyone is using user with this name
+ Assert.NotEqual("Windows User", Environment.UserName);
+ }
}
[Fact]
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)]
public void UserName_MatchesEnvironment_Windows()
{
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
[OuterLoop]
[Fact]
- [ActiveIssue("21404", TargetFrameworkMonikers.Uap)]
public void FailFast_ExpectFailureExitCode()
{
using (RemoteInvokeHandle handle = RemoteExecutor.Invoke(() => Environment.FailFast("message")))
}
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
- [ActiveIssue("29869", TargetFrameworkMonikers.Uap)]
[Fact]
public void FailFast_ExceptionStackTrace_ArgumentException()
{
}
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
- [ActiveIssue("29869", TargetFrameworkMonikers.Uap)]
[Fact]
public void FailFast_ExceptionStackTrace_StackOverflowException()
{
}
[Trait(XunitConstants.Category, XunitConstants.IgnoreForCI)] // fail fast crashes the process
- [ActiveIssue("29869", TargetFrameworkMonikers.Uap)]
[Fact]
public void FailFast_ExceptionStackTrace_InnerException()
{
[InlineData(Environment.SpecialFolder.System)]
[InlineData(Environment.SpecialFolder.SystemX86)]
[InlineData(Environment.SpecialFolder.Windows)]
- public void GetFolderPath_UapExistAndAccessible(Environment.SpecialFolder folder)
+ public void GetFolderPath_UWP_ExistAndAccessible(Environment.SpecialFolder folder)
{
string knownFolder = Environment.GetFolderPath(folder);
Assert.NotEmpty(knownFolder);
[InlineData(Environment.SpecialFolder.CommonApplicationData)]
[InlineData(Environment.SpecialFolder.Desktop)]
[InlineData(Environment.SpecialFolder.Favorites)]
- public void GetFolderPath_UapNotEmpty(Environment.SpecialFolder folder)
+ public void GetFolderPath_UWP_NotEmpty(Environment.SpecialFolder folder)
{
// The majority of the paths here cannot be accessed from an appcontainer
string knownFolder = Environment.GetFolderPath(folder);
[InlineData(Environment.SpecialFolder.SystemX86)]
[InlineData(Environment.SpecialFolder.Windows)]
[PlatformSpecific(TestPlatforms.Windows)] // Tests OS-specific environment
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)] // Don't run on UAP
public unsafe void GetFolderPath_Windows(Environment.SpecialFolder folder)
{
string knownFolder = Environment.GetFolderPath(folder);
{
public class UnloadingAndProcessExitTests : FileCleanupTestBase
{
- [ActiveIssue("https://github.com/dotnet/corefx/issues/23307", TargetFrameworkMonikers.Uap)]
[Fact]
public void UnloadingEventMustHappenBeforeProcessExitEvent()
{
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
<TargetExt>.exe</TargetExt>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestApp.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
<TargetExt>.exe</TargetExt>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
<TargetExt>.exe</TargetExt>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="VoidMainWithExitCodeApp.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Handles.Forwards.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.Runtime.Handles</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.InteropServices.RuntimeInformation.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
</BuildConfigurations>
<PropertyGroup>
<RootNamespace>System.Runtime.InteropServices</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\InteropServices\RuntimeInformation\RuntimeInformation.cs" />
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap'">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<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 // all these are subject to WACK
- s_osDescription = "Microsoft Windows";
-#else
s_osDescription = Interop.NtDll.RtlGetVersion();
-#endif
}
return s_osDescription;
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CheckArchitectureTests.cs" />
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>System.Runtime.InteropServices.WindowsRuntime</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
to its own obsolete API. -->
<NoWarn>$(NoWarn);618</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonPath)\CoreLib\System\HResults.cs">
netcoreapp;
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\InteropServices\Marshal\StringMarshalingTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\StructureToPtrTests.cs" />
<Compile Include="System\Runtime\InteropServices\Marshal\UnsafeAddrOfPinnedArrayElementTests.cs" />
- <Compile Condition="'$(TargetsUap)' != 'true'" Include="System\Runtime\InteropServices\PrimaryInteropAssemblyAttributeTests.cs" />
+ <Compile Include="System\Runtime\InteropServices\PrimaryInteropAssemblyAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\ProgIdAttributeTests.cs" />
<Compile Include="System\Runtime\InteropServices\RuntimeEnvironmentTests.cs" />
<Compile Include="System\Runtime\InteropServices\SafeBufferTests.cs" />
namespace System.Runtime.InteropServices.Tests
{
#pragma warning disable 0618 // CompareEventInfo is marked as Obsolete.
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public partial class ComAwareEventInfoTests
{
[ComEventInterface(typeof(DispAttributeClass), typeof(int))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(ChangeWrapperHandleStrength_ComObject_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void ChangeWrapperHandleStrength_ComObject_ReturnsExpected(object o)
{
ChangeWrapperHandleStrength_ValidObject_Success(o);
public partial class CreateWrapperOfTypeTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void CreateWrapperOfType_SameType_ReturnsSameInstance()
{
var comObject = new ComImportObject();
[InlineData(typeof(int))]
[InlineData(typeof(GenericSubComImportObject<string>))]
[InlineData(typeof(GenericSubComImportObject<>))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void CreateWrapperOfType_InvalidComObjectType_ThrowsArgumentException(Type t)
{
AssertExtensions.Throws<ArgumentException>("t", () => Marshal.CreateWrapperOfType(new ComImportObject(), t));
public partial class FinalReleaseComObjectTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void FinalReleaseComObject_ValidComObject_Success()
{
var comObject = new ComImportObject();
public partial class GetComObjectDataTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetComObjectData_ValidObject_ReturnsExpected()
{
var comObject = new ComImportObject();
[MemberData(nameof(GetEndComSlot_TestData))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetEndComSlot_Windows_ReturnsExpected(Type type, int expected)
{
Assert.Equal(expected, Marshal.GetEndComSlot(type));
namespace System.Runtime.InteropServices.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "GetNativeVariantForObject() not supported on UWP")]
public partial class GetNativeVariantForObjectTests
{
public static IEnumerable<object[]> GetNativeVariantForObject_RoundtrippingPrimitives_TestData()
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(GetObjectForIUnknown_ComObject_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetObjectForIUnknown_ComObject_ReturnsExpected(object o)
{
GetObjectForIUnknown_ValidPointer_ReturnsExpected(o);
namespace System.Runtime.InteropServices.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Marshalling between VARIANT and Object is not supported in AppX")]
public class GetObjectForNativeVariantTests
{
[StructLayout(LayoutKind.Sequential)]
namespace System.Runtime.InteropServices.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Marshalling between VARIANT and Object is not supported in AppX")]
public class GetObjectsForNativeVariantsTests
{
[StructLayout(LayoutKind.Sequential)]
[MemberData(nameof(GetStartComSlot_TestData))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetStartComSlot_Windows_ReturnsExpected(Type type, int expected)
{
Assert.Equal(expected, Marshal.GetStartComSlot(type));
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetTypeFromCLSID_CLSIDExists_ReturnsExpected()
{
var guid = new Guid("927971f5-0939-11d1-8be1-00c04fd8d503");
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(GetTypedObjectForIUnknown_ComObject_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetTypedObjectForIUnknown_ComObject_ReturnsExpected(object o, Type type)
{
GetTypedObjectForIUnknown_ValidPointer_ReturnsExpected(o, type);
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(GetTypedObjectForIUnknownTypeUncastableComObject_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetTypedObjectForIUnknown_UncastableComObject_ThrowsInvalidCastException(object o, Type type)
{
GetTypedObjectForIUnknown_UncastableObject_ThrowsInvalidCastException(o, type);
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(GetUniqueObjectForIUnknown_ComObject_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void GetUniqueObjectForIUnknown_ComObject_ReturnsExpected(object o)
{
IntPtr ptr = Marshal.GetIUnknownForObject(o);
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(IsComObject_Windows_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void IsComObject_Windows_ReturnsExpected(object value, bool expected)
{
Assert.Equal(expected, Marshal.IsComObject(value));
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(IsTypeVisibleFromCom_Windows_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void IsTypeVisibleFromCom_Windows_ReturnsExpected(Type value, bool expected)
{
Assert.Equal(expected, Marshal.IsTypeVisibleFromCom(value));
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(QueryInterface_ValidComObjectInterface_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void QueryInterface_ValidComObjectInterface_Success(object o, string iidString)
{
QueryInterface_ValidInterface_Success(o, iidString);
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
[MemberData(nameof(QueryInterface_NoSuchComObjectInterface_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void QueryInterface_NoSuchComObjectInterface_Success(object o, string iidString)
{
QueryInterface_NoSuchInterface_Success(o, iidString);
[Theory]
[MemberData(nameof(QueryInterface_ValidInterface_TestData))]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void QueryInterface_ValidInterface_Success(object o, string guid)
{
IntPtr ptr = Marshal.GetIUnknownForObject(o);
public partial class ReleaseComObjectTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void ReleaseComObject_ValidComObject_Success()
{
var comObject = new ComImportObject();
public partial class SetComObjectDataTests
{
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void SetComObjectData_NonNullValue_Sucesss()
{
var comObject = new ComImportObject();
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Not approved COM object for app")]
public void SetComObjectData_NullValue_Sucesss()
{
var comObject = new ComImportObject();
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- CS0067: unused event, reference assembly does not care -->
<NoWarn>$(NoWarn);0067</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Runtime.Loader</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ContextualReflectionDependency.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
<!-- LoadInDefaultContext test relies on no deps.json -->
<GenerateDependencyFile>false</GenerateDependencyFile>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ReferencedClassLib.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ReferencedClassLibNeutralIsSatellite.cs" />
namespace System.Runtime.Loader.Tests
{
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP does not use satellite assemblies in most cases")]
public class SatelliteAssembliesTestsFixture
{
public Dictionary<string, AssemblyLoadContext> contexts = new Dictionary<string, AssemblyLoadContext>();
}
}
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "UWP does not use satellite assemblies in most cases")]
public class SatelliteAssembliesTests : IClassFixture<SatelliteAssembliesTestsFixture>
{
Dictionary<string, AssemblyLoadContext> contexts;
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<!-- Test expects an un-signed assembly -->
<SignAssembly>false</SignAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestClass.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>System.Runtime.Loader.Tests</RootNamespace>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<!-- Some tests rely on no deps.json file being present. -->
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Numerics.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<RootNamespace>System.Numerics</RootNamespace>
<AssemblyName>System.Runtime.Numerics</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Numerics\BigIntegerCalculator.AddSub.cs" />
[Fact]
public static void RunRegionSpecificStandardFormatToStringTests()
{
- RemoteExecutorForUap.Invoke(() =>
+ CultureInfo[] cultures = new CultureInfo[] { new CultureInfo("en-US"), new CultureInfo("en-GB"), new CultureInfo("fr-CA"),
+ new CultureInfo("ar-SA"), new CultureInfo("de-DE"), new CultureInfo("he-IL"),
+ new CultureInfo("ru-RU"), new CultureInfo("zh-CN") };
+ foreach (CultureInfo culture in cultures)
{
- CultureInfo[] cultures = new CultureInfo[] { new CultureInfo("en-US"), new CultureInfo("en-GB"), new CultureInfo("fr-CA"),
- new CultureInfo("ar-SA"), new CultureInfo("de-DE"), new CultureInfo("he-IL"),
- new CultureInfo("ru-RU"), new CultureInfo("zh-CN") };
- foreach (CultureInfo culture in cultures)
+ // Set CurrentCulture to simulate different locales
+ using (new ThreadCultureChange(culture))
{
- // Set CurrentCulture to simulate different locales
- using (new ThreadCultureChange(culture))
- {
- // Currency
- RunStandardFormatToStringTests(s_random, "C", culture.NumberFormat.NegativeSign, culture.NumberFormat.CurrencyDecimalDigits, CurrencyFormatter);
- RunStandardFormatToStringTests(s_random, "c0", culture.NumberFormat.NegativeSign, 0, CurrencyFormatter);
- RunStandardFormatToStringTests(s_random, "C1", culture.NumberFormat.NegativeSign, 1, CurrencyFormatter);
- RunStandardFormatToStringTests(s_random, "c2", culture.NumberFormat.NegativeSign, 2, CurrencyFormatter);
- RunStandardFormatToStringTests(s_random, "C5", culture.NumberFormat.NegativeSign, 5, CurrencyFormatter);
- RunStandardFormatToStringTests(s_random, "c33", culture.NumberFormat.NegativeSign, 33, CurrencyFormatter);
- RunStandardFormatToStringTests(s_random, "C99", culture.NumberFormat.NegativeSign, 99, CurrencyFormatter);
-
- // Decimal
- RunStandardFormatToStringTests(s_random, "D", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "d0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "D1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "d2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "D5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "d33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "D99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
-
- // Exponential (note: negative precision means lower case e)
- RunStandardFormatToStringTests(s_random, "E", culture.NumberFormat.NegativeSign, 6, ExponentialFormatter);
- RunStandardFormatToStringTests(s_random, "E0", culture.NumberFormat.NegativeSign, 0, ExponentialFormatter);
- RunStandardFormatToStringTests(s_random, "E1", culture.NumberFormat.NegativeSign, 1, ExponentialFormatter);
- RunStandardFormatToStringTests(s_random, "e2", culture.NumberFormat.NegativeSign, -2, ExponentialFormatter);
- RunStandardFormatToStringTests(s_random, "E5", culture.NumberFormat.NegativeSign, 5, ExponentialFormatter);
- RunStandardFormatToStringTests(s_random, "e33", culture.NumberFormat.NegativeSign, -33, ExponentialFormatter);
- RunStandardFormatToStringTests(s_random, "E99", culture.NumberFormat.NegativeSign, 99, ExponentialFormatter);
-
- // Fixed-Point
- RunStandardFormatToStringTests(s_random, "f", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, FixedFormatter);
- RunStandardFormatToStringTests(s_random, "F0", culture.NumberFormat.NegativeSign, 0, FixedFormatter);
- RunStandardFormatToStringTests(s_random, "f1", culture.NumberFormat.NegativeSign, 1, FixedFormatter);
- RunStandardFormatToStringTests(s_random, "F2", culture.NumberFormat.NegativeSign, 2, FixedFormatter);
- RunStandardFormatToStringTests(s_random, "f5", culture.NumberFormat.NegativeSign, 5, FixedFormatter);
- RunStandardFormatToStringTests(s_random, "F33", culture.NumberFormat.NegativeSign, 33, FixedFormatter);
- RunStandardFormatToStringTests(s_random, "f99", culture.NumberFormat.NegativeSign, 99, FixedFormatter);
-
- // General
- RunStandardFormatToStringTests(s_random, "g", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "G0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "G1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "G2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "g5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "G33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "g99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
-
- // Number
- RunStandardFormatToStringTests(s_random, "n", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, NumberFormatter);
- RunStandardFormatToStringTests(s_random, "N0", culture.NumberFormat.NegativeSign, 0, NumberFormatter);
- RunStandardFormatToStringTests(s_random, "N1", culture.NumberFormat.NegativeSign, 1, NumberFormatter);
- RunStandardFormatToStringTests(s_random, "N2", culture.NumberFormat.NegativeSign, 2, NumberFormatter);
- RunStandardFormatToStringTests(s_random, "n5", culture.NumberFormat.NegativeSign, 5, NumberFormatter);
- RunStandardFormatToStringTests(s_random, "N33", culture.NumberFormat.NegativeSign, 33, NumberFormatter);
- RunStandardFormatToStringTests(s_random, "n99", culture.NumberFormat.NegativeSign, 99, NumberFormatter);
-
- // Percent
- RunStandardFormatToStringTests(s_random, "p", culture.NumberFormat.NegativeSign, culture.NumberFormat.PercentDecimalDigits, PercentFormatter);
- RunStandardFormatToStringTests(s_random, "P0", culture.NumberFormat.NegativeSign, 0, PercentFormatter);
- RunStandardFormatToStringTests(s_random, "P1", culture.NumberFormat.NegativeSign, 1, PercentFormatter);
- RunStandardFormatToStringTests(s_random, "P2", culture.NumberFormat.NegativeSign, 2, PercentFormatter);
- RunStandardFormatToStringTests(s_random, "p5", culture.NumberFormat.NegativeSign, 5, PercentFormatter);
- RunStandardFormatToStringTests(s_random, "P33", culture.NumberFormat.NegativeSign, 33, PercentFormatter);
- RunStandardFormatToStringTests(s_random, "p99", culture.NumberFormat.NegativeSign, 99, PercentFormatter);
-
- // Hex
- RunStandardFormatToStringTests(s_random, "X", culture.NumberFormat.NegativeSign, 0, HexFormatter);
- RunStandardFormatToStringTests(s_random, "X0", culture.NumberFormat.NegativeSign, 0, HexFormatter);
- RunStandardFormatToStringTests(s_random, "x1", culture.NumberFormat.NegativeSign, -1, HexFormatter);
- RunStandardFormatToStringTests(s_random, "X2", culture.NumberFormat.NegativeSign, 2, HexFormatter);
- RunStandardFormatToStringTests(s_random, "x5", culture.NumberFormat.NegativeSign, -5, HexFormatter);
- RunStandardFormatToStringTests(s_random, "X33", culture.NumberFormat.NegativeSign, 33, HexFormatter);
- RunStandardFormatToStringTests(s_random, "x99", culture.NumberFormat.NegativeSign, -99, HexFormatter);
-
- // RoundTrip
- RunStandardFormatToStringTests(s_random, "R", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "R0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "r1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "R2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "r5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "R33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
- RunStandardFormatToStringTests(s_random, "r99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
- }
+ // Currency
+ RunStandardFormatToStringTests(s_random, "C", culture.NumberFormat.NegativeSign, culture.NumberFormat.CurrencyDecimalDigits, CurrencyFormatter);
+ RunStandardFormatToStringTests(s_random, "c0", culture.NumberFormat.NegativeSign, 0, CurrencyFormatter);
+ RunStandardFormatToStringTests(s_random, "C1", culture.NumberFormat.NegativeSign, 1, CurrencyFormatter);
+ RunStandardFormatToStringTests(s_random, "c2", culture.NumberFormat.NegativeSign, 2, CurrencyFormatter);
+ RunStandardFormatToStringTests(s_random, "C5", culture.NumberFormat.NegativeSign, 5, CurrencyFormatter);
+ RunStandardFormatToStringTests(s_random, "c33", culture.NumberFormat.NegativeSign, 33, CurrencyFormatter);
+ RunStandardFormatToStringTests(s_random, "C99", culture.NumberFormat.NegativeSign, 99, CurrencyFormatter);
+
+ // Decimal
+ RunStandardFormatToStringTests(s_random, "D", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "d0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "D1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "d2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "D5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "d33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "D99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+
+ // Exponential (note: negative precision means lower case e)
+ RunStandardFormatToStringTests(s_random, "E", culture.NumberFormat.NegativeSign, 6, ExponentialFormatter);
+ RunStandardFormatToStringTests(s_random, "E0", culture.NumberFormat.NegativeSign, 0, ExponentialFormatter);
+ RunStandardFormatToStringTests(s_random, "E1", culture.NumberFormat.NegativeSign, 1, ExponentialFormatter);
+ RunStandardFormatToStringTests(s_random, "e2", culture.NumberFormat.NegativeSign, -2, ExponentialFormatter);
+ RunStandardFormatToStringTests(s_random, "E5", culture.NumberFormat.NegativeSign, 5, ExponentialFormatter);
+ RunStandardFormatToStringTests(s_random, "e33", culture.NumberFormat.NegativeSign, -33, ExponentialFormatter);
+ RunStandardFormatToStringTests(s_random, "E99", culture.NumberFormat.NegativeSign, 99, ExponentialFormatter);
+
+ // Fixed-Point
+ RunStandardFormatToStringTests(s_random, "f", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, FixedFormatter);
+ RunStandardFormatToStringTests(s_random, "F0", culture.NumberFormat.NegativeSign, 0, FixedFormatter);
+ RunStandardFormatToStringTests(s_random, "f1", culture.NumberFormat.NegativeSign, 1, FixedFormatter);
+ RunStandardFormatToStringTests(s_random, "F2", culture.NumberFormat.NegativeSign, 2, FixedFormatter);
+ RunStandardFormatToStringTests(s_random, "f5", culture.NumberFormat.NegativeSign, 5, FixedFormatter);
+ RunStandardFormatToStringTests(s_random, "F33", culture.NumberFormat.NegativeSign, 33, FixedFormatter);
+ RunStandardFormatToStringTests(s_random, "f99", culture.NumberFormat.NegativeSign, 99, FixedFormatter);
+
+ // General
+ RunStandardFormatToStringTests(s_random, "g", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "G0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "G1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "G2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "g5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "G33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "g99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
+
+ // Number
+ RunStandardFormatToStringTests(s_random, "n", culture.NumberFormat.NegativeSign, culture.NumberFormat.NumberDecimalDigits, NumberFormatter);
+ RunStandardFormatToStringTests(s_random, "N0", culture.NumberFormat.NegativeSign, 0, NumberFormatter);
+ RunStandardFormatToStringTests(s_random, "N1", culture.NumberFormat.NegativeSign, 1, NumberFormatter);
+ RunStandardFormatToStringTests(s_random, "N2", culture.NumberFormat.NegativeSign, 2, NumberFormatter);
+ RunStandardFormatToStringTests(s_random, "n5", culture.NumberFormat.NegativeSign, 5, NumberFormatter);
+ RunStandardFormatToStringTests(s_random, "N33", culture.NumberFormat.NegativeSign, 33, NumberFormatter);
+ RunStandardFormatToStringTests(s_random, "n99", culture.NumberFormat.NegativeSign, 99, NumberFormatter);
+
+ // Percent
+ RunStandardFormatToStringTests(s_random, "p", culture.NumberFormat.NegativeSign, culture.NumberFormat.PercentDecimalDigits, PercentFormatter);
+ RunStandardFormatToStringTests(s_random, "P0", culture.NumberFormat.NegativeSign, 0, PercentFormatter);
+ RunStandardFormatToStringTests(s_random, "P1", culture.NumberFormat.NegativeSign, 1, PercentFormatter);
+ RunStandardFormatToStringTests(s_random, "P2", culture.NumberFormat.NegativeSign, 2, PercentFormatter);
+ RunStandardFormatToStringTests(s_random, "p5", culture.NumberFormat.NegativeSign, 5, PercentFormatter);
+ RunStandardFormatToStringTests(s_random, "P33", culture.NumberFormat.NegativeSign, 33, PercentFormatter);
+ RunStandardFormatToStringTests(s_random, "p99", culture.NumberFormat.NegativeSign, 99, PercentFormatter);
+
+ // Hex
+ RunStandardFormatToStringTests(s_random, "X", culture.NumberFormat.NegativeSign, 0, HexFormatter);
+ RunStandardFormatToStringTests(s_random, "X0", culture.NumberFormat.NegativeSign, 0, HexFormatter);
+ RunStandardFormatToStringTests(s_random, "x1", culture.NumberFormat.NegativeSign, -1, HexFormatter);
+ RunStandardFormatToStringTests(s_random, "X2", culture.NumberFormat.NegativeSign, 2, HexFormatter);
+ RunStandardFormatToStringTests(s_random, "x5", culture.NumberFormat.NegativeSign, -5, HexFormatter);
+ RunStandardFormatToStringTests(s_random, "X33", culture.NumberFormat.NegativeSign, 33, HexFormatter);
+ RunStandardFormatToStringTests(s_random, "x99", culture.NumberFormat.NegativeSign, -99, HexFormatter);
+
+ // RoundTrip
+ RunStandardFormatToStringTests(s_random, "R", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "R0", culture.NumberFormat.NegativeSign, 0, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "r1", culture.NumberFormat.NegativeSign, 1, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "R2", culture.NumberFormat.NegativeSign, 2, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "r5", culture.NumberFormat.NegativeSign, 5, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "R33", culture.NumberFormat.NegativeSign, 33, DecimalFormatter);
+ RunStandardFormatToStringTests(s_random, "r99", culture.NumberFormat.NegativeSign, 99, DecimalFormatter);
}
- }).Dispose();
+ }
}
[Fact]
[OuterLoop]
public static void RunParseToStringTests(CultureInfo culture)
{
- RemoteExecutorForUap.Invoke((cultureName) =>
- {
- byte[] tempByteArray1 = new byte[0];
- using (new ThreadCultureChange(cultureName))
+ byte[] tempByteArray1 = new byte[0];
+ using (new ThreadCultureChange(culture))
+ {
+ //default style
+ VerifyDefaultParse(s_random);
+
+ //single NumberStyles
+ VerifyNumberStyles(NumberStyles.None, s_random);
+ VerifyNumberStyles(NumberStyles.AllowLeadingWhite, s_random);
+ VerifyNumberStyles(NumberStyles.AllowTrailingWhite, s_random);
+ VerifyNumberStyles(NumberStyles.AllowLeadingSign, s_random);
+ VerifyNumberStyles(NumberStyles.AllowTrailingSign, s_random);
+ VerifyNumberStyles(NumberStyles.AllowParentheses, s_random);
+ VerifyNumberStyles(NumberStyles.AllowDecimalPoint, s_random);
+ VerifyNumberStyles(NumberStyles.AllowThousands, s_random);
+ VerifyNumberStyles(NumberStyles.AllowExponent, s_random);
+ VerifyNumberStyles(NumberStyles.AllowCurrencySymbol, s_random);
+ VerifyNumberStyles(NumberStyles.AllowHexSpecifier, s_random);
+
+ //composite NumberStyles
+ VerifyNumberStyles(NumberStyles.Integer, s_random);
+ VerifyNumberStyles(NumberStyles.HexNumber, s_random);
+ VerifyNumberStyles(NumberStyles.Number, s_random);
+ VerifyNumberStyles(NumberStyles.Float, s_random);
+ VerifyNumberStyles(NumberStyles.Currency, s_random);
+ VerifyNumberStyles(NumberStyles.Any, s_random);
+
+ //invalid number style
+ // ******InvalidNumberStyles
+ NumberStyles invalid = (NumberStyles)0x7c00;
+ AssertExtensions.Throws<ArgumentException>(null, () =>
{
- //default style
- VerifyDefaultParse(s_random);
-
- //single NumberStyles
- VerifyNumberStyles(NumberStyles.None, s_random);
- VerifyNumberStyles(NumberStyles.AllowLeadingWhite, s_random);
- VerifyNumberStyles(NumberStyles.AllowTrailingWhite, s_random);
- VerifyNumberStyles(NumberStyles.AllowLeadingSign, s_random);
- VerifyNumberStyles(NumberStyles.AllowTrailingSign, s_random);
- VerifyNumberStyles(NumberStyles.AllowParentheses, s_random);
- VerifyNumberStyles(NumberStyles.AllowDecimalPoint, s_random);
- VerifyNumberStyles(NumberStyles.AllowThousands, s_random);
- VerifyNumberStyles(NumberStyles.AllowExponent, s_random);
- VerifyNumberStyles(NumberStyles.AllowCurrencySymbol, s_random);
- VerifyNumberStyles(NumberStyles.AllowHexSpecifier, s_random);
-
- //composite NumberStyles
- VerifyNumberStyles(NumberStyles.Integer, s_random);
- VerifyNumberStyles(NumberStyles.HexNumber, s_random);
- VerifyNumberStyles(NumberStyles.Number, s_random);
- VerifyNumberStyles(NumberStyles.Float, s_random);
- VerifyNumberStyles(NumberStyles.Currency, s_random);
- VerifyNumberStyles(NumberStyles.Any, s_random);
-
- //invalid number style
- // ******InvalidNumberStyles
- NumberStyles invalid = (NumberStyles)0x7c00;
- AssertExtensions.Throws<ArgumentException>(null, () =>
- {
- BigInteger.Parse("1", invalid).ToString("d");
- });
- AssertExtensions.Throws<ArgumentException>(null, () =>
- {
- BigInteger junk;
- BigInteger.TryParse("1", invalid, null, out junk);
- Assert.Equal("1", junk.ToString("d"));
- });
+ BigInteger.Parse("1", invalid).ToString("d");
+ });
+ AssertExtensions.Throws<ArgumentException>(null, () =>
+ {
+ BigInteger junk;
+ BigInteger.TryParse("1", invalid, null, out junk);
+ Assert.Equal("1", junk.ToString("d"));
+ });
- //FormatProvider tests
- RunFormatProviderParseStrings();
- }
- }, culture.ToString()).Dispose();
+ //FormatProvider tests
+ RunFormatProviderParseStrings();
+ }
}
private static void RunFormatProviderParseStrings()
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BigInteger\absolutevalue.cs" />
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Formatters.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
$(PackageConfigurations);
</BuildConfigurations>
</PropertyGroup>
<AssemblyName>System.Runtime.Serialization.Formatters</AssemblyName>
<RootNamespace>System.Runtime.Serialization.Formatters</RootNamespace>
<NoWarn>$(NoWarn);CS1573</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Formatters.TypeForwards.cs" />
yield return new object[] { PopulateException(imageFormatLimitationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAF1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uTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgwAAAAQU3lzdGVtLkV4Y2VwdGlvbgkEAAAACQ4AAAAJDwAAAAkHAAAACQgAAAAJCQAAAAAAAAAK6AMAAAkKAAAACgQLAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } };
// EventLog is not supported in non Windows.
- if (PlatformDetection.IsWindows && PlatformDetection.IsNetCore && !PlatformDetection.IsUap)
+ if (PlatformDetection.IsWindows && PlatformDetection.IsNetCore)
{
var channelClosedException = new ChannelClosedException("message", exception);
yield return new object[] { PopulateException(channelClosedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFxTeXN0ZW0uVGhyZWFkaW5nLkNoYW5uZWxzLCBWZXJzaW9uPTQuMC4xLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Y2M3YjEzZmZjZDJkZGQ1MQUBAAAAMFN5c3RlbS5UaHJlYWRpbmcuQ2hhbm5lbHMuQ2hhbm5lbENsb3NlZEV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJM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ZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netcoreapp20) } };
var xsltException = new XsltException("message", exception);
yield return new object[] { PopulateException(xsltException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE1TeXN0ZW0uWG1sLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUBAAAAHFN5c3RlbS5YbWwuWHNsLlhzbHRFeGNlcHRpb24SAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwNyZXMEYXJncwlzb3VyY2VVcmkKbGluZU51bWJlcgxsaW5lUG9zaXRpb24HdmVyc2lvbgEBAwMBAQEAAQABBwECAgAAASlTeXN0ZW0uQ29sbGVjdGlvb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AAAACQ4AAAAGGgAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFwAAAA0AAAAICAEAAAAGGwAAAANvbmUKARgAAAANAAAACRYAAAAIAQEJHQAAAAEdAAAADQAAAAgIAQAAAAkbAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- // Assembly load error with shims in uap/uapaot configuration. Issue #24916
- if (!PlatformDetection.IsUap)
- {
- var validationException = new ValidationException("message", exception);
- yield return new object[] { PopulateException(validationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAGhTeXN0ZW0uQ29tcG9uZW50TW9kZWwuRGF0YUFubm90YXRpb25zLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MzFiZjM4NTZhZDM2NGUzNQUBAAAAOVN5c3RlbS5Db21wb25lbnRNb2RlbC5EYXRhQW5ub3RhdGlvbnMuVmFsaWRhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAA5U3lzdGVtLkNvbXBvbmVudE1vZGVsLkRhdGFBbm5vdGF0aW9ucy5WYWxpZGF0aW9uRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1v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MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCwAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- }
+ var validationException = new ValidationException("message", exception);
+ yield return new object[] { PopulateException(validationException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAGhTeXN0ZW0uQ29tcG9uZW50TW9kZWwuRGF0YUF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bmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
var constraintException = new ConstraintException("message", exception);
yield return new object[] { PopulateException(constraintException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB9TeXN0ZW0uRGF0YS5Db25zdHJhaW50RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxp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ContextMarshalException("message", exception);
yield return new object[] { PopulateException(contextMarshalException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAB5TeXN0ZW0uQ29udGV4dE1hcnNoYWxFeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgIAAAAeU3lzdGVtLkNvbnRleHRNYXJzaGFsRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACQUAAAAGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBAAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAUAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2V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Gc2VjcmV0CAEBCRQAAAABDQAAAAQAAAAJFQAAAAIAAAACAAAAAQ4AAAAFAAAACQsAAAAGFwAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFAAAAAoAAAAICAEAAAAGGAAAAANvbmUKARUAAAAKAAAACRMAAAAIAQEJGgAAAAEaAAAACgAAAAgIAQAAAAkYAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- if (!PlatformDetection.IsUap)
- {
- Exception contractException = (Exception)Type.GetType("System.Diagnostics.Contracts.ContractException", true)
+ Exception contractException = (Exception)Type.GetType("System.Diagnostics.Contracts.ContractException", true)
.GetConstructor(BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(ContractFailureKind), typeof(string), typeof(string), typeof(string), typeof(Exception) }, null)
.Invoke(new object[] { ContractFailureKind.Invariant, "failure", "userMessage", "condition", exception });
- yield return new object[] { PopulateException(contractException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC5TeXN0ZW0uRGlhZ25vc3RpY3MuQ29udHJhY3RzLkNvbnRyYWN0RXhjZXB0aW9uDwAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMES2luZAtVc2VyTWVzc2FnZQlDb25kaXRpb24BAQMDAQEBAAEAAQcDAQEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAjBTeXN0ZW0uRGlhZ25vc3RpY3MuQ29udHJhY3RzLkNvbnRyYWN0RmFpbHVyZUtpbmQGAgAAAC5TeXN0ZW0uRGlhZ25vc3RpY3MuQ29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NlY3JldAgBAQkXAAAAARAAAAAEAAAACRgAAAACAAAAAgAAAAERAAAABQAAAAkOAAAABhoAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARcAAAANAAAACAgBAAAABhsAAAADb25lCgEYAAAADQAAAAkWAAAACAEBCR0AAAABHQAAAA0AAAAICAEAAAAJGwAAAAoL", TargetFrameworkMoniker.netfx461) } };
- }
+ yield return new object[] { PopulateException(contractException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC5TeXN0ZW0uRGlhZ25vc3RpY3MuQ29udHJhY3RzLkNvbnRyYWN0RXhjZXB0aW9uDwAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMES2luZAtVc2VyTWVzc2FnZQlDb25kaXRpb24BAQMDAQEBAAEAAQcDAQEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAjBTeXN0ZW0uRGlhZ25vc3RpY3MuQ29udHJhY3RzLkNvbnRyYWN0RmFpbHVyZUtpbmQGAgAAAC5TeXN0ZW0uRGlhZ25vc3RpY3MuQ29udHJhY3RzLkNvbnRyYWN0RXhjZXB0aW9uBgMAAAAHZmFpbHVyZQkEAAAACQUAAAAGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoE9v///zB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ieException();
yield return new object[] { PopulateException(cookieException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAaU3lzdGVtLk5ldC5Db29raWVFeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAAYDAAAAGlN5c3RlbS5OZXQuQ29va2llRXhjZXB0aW9uBgQAAAA1T25lIG9mIHRoZSBpZGVudGlmaWVkIGl0ZW1zIHdhcyBpbiBhbiBpbnZhbGlkIGZvcm1hdC4JBQAAAAoGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaW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pY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBgsAAAAGc2VjcmV0CAEBCQwAAAABDAAAAAoAAAAICAEAAAAGDQAAAANvbmUKCw==", TargetFrameworkMoniker.netfx461) } };
var objectDisposedException = new ObjectDisposedException("objectname", "message");
yield return new object[] { PopulateException(objectDisposedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAB5TeXN0ZW0uT2JqZWN0RGlzcG9zZWRFeGNlcHRpb24NAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwpPYmplY3ROYW1lAQEDAwEBAQABAAEHASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgIAAAAeU3lzdGVtLk9iamVjdERpc3Bvc2VkRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACgYFAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBgAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYHAAAAG1JlbW90ZSBTdG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m1pY3Jvc29mdC5jb20GBgAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYHAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYIAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgYJAAAACm9iamVjdG5hbWUEBAAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBgsAAAAGc2VjcmV0CAEBCQwAAAABDAAAAAoAAAAICAEAAAAGDQAAAANvbmUKCw==", TargetFrameworkMoniker.netfx461) } };
- if (!PlatformDetection.IsUap)
- {
- OdbcError odbcError = (OdbcError)typeof(OdbcError)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(string), typeof(string), typeof(int) }, null)
- .Invoke(new object[] { "source", "message", "state", 0 });
- OdbcErrorCollection odbcErrorCollection = (OdbcErrorCollection)typeof(OdbcErrorCollection)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null)
- .Invoke(new object[] { });
- typeof(OdbcErrorCollection)
- .GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance)
- .Invoke(odbcErrorCollection, new object[] { odbcError });
- OdbcException odbcException = (OdbcException)typeof(OdbcException)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(OdbcErrorCollection) }, null)
- .Invoke(new object[] { "message", odbcErrorCollection });
- // OdbcException sets its HResult itself therefore we pass setHResult as false.
- yield return new object[] { PopulateException(odbcException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB5TeXN0ZW0uRGF0YS5PZGJjLk9kYmNFeGNlcHRpb24OAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwtvZGJjUmV0Y29kZQpvZGJjRXJyb3JzAQEDAwEBAQABAAEHBAQpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAh9TeXN0ZW0uRGF0YS5PZGJjLk9EQkMzMitSRVRDT0RFAgAAACRTeXN0ZW0uRGF0YS5PZGJjLk9kYmNFcnJvckNvbGxlY3Rpb24CAAAAAgAAAAYDAAAAHlN5c3RlbS5EYXRhLk9kYmMuT2RiY0V4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAoGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACjcZE4AGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoF9v///x9TeXN0ZW0uRGF0YS5PZGJjLk9EQkMzMitSRVRDT0RFAQA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N5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDQAAAAIAAAACAAAABAwAAAAcU3lzdGVtLkNvbGxlY3Rpb25zLkFycmF5TGlzdAMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBQAACAgJDgAAAAEAAAABAAAABA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBg8AAAAGc2VjcmV0CAEBCRAAAAAQDgAAAAQAAAAJEQAAAA0DARAAAAANAAAACAgBAAAABhIAAAADb25lCgURAAAAGlN5c3RlbS5EYXRhLk9kYmMuT2RiY0Vycm9yBAAAAAhfbWVzc2FnZQZfc3RhdGUMX25hdGl2ZWVycm9yB19zb3VyY2UBAQABCAIAAAAJBgAAAAYUAAAABXN0YXRlAAAAAAYVAAAABnNvdXJjZQs=", TargetFrameworkMoniker.netfx461) } };
- }
-
- if (!PlatformDetection.IsUap)
- {
- OperationAbortedException operationAbortedException = (OperationAbortedException)typeof(OperationAbortedException)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(Exception) }, null)
- .Invoke(new object[] { "message", exception });
- yield return new object[] { PopulateException(operationAbortedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACVTeXN0ZW0uRGF0YS5PcGVyYXRpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQ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VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- }
+ OdbcError odbcError = (OdbcError)typeof(OdbcError)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(string), typeof(string), typeof(int) }, null)
+ .Invoke(new object[] { "source", "message", "state", 0 });
+ OdbcErrorCollection odbcErrorCollection = (OdbcErrorCollection)typeof(OdbcErrorCollection)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null)
+ .Invoke(new object[] { });
+ typeof(OdbcErrorCollection)
+ .GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance)
+ .Invoke(odbcErrorCollection, new object[] { odbcError });
+ OdbcException odbcException = (OdbcException)typeof(OdbcException)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(OdbcErrorCollection) }, null)
+ .Invoke(new object[] { "message", odbcErrorCollection });
+ // OdbcException sets its HResult itself therefore we pass setHResult as false.
+ yield return new object[] { PopulateException(odbcException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAB5TeXN0ZW0uRGF0YS5PZGJjLk9kYmNFeGNlcHRpb24OAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJl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RAAAAAQDgAAAAQAAAAJEQAAAA0DARAAAAANAAAACAgBAAAABhIAAAADb25lCgURAAAAGlN5c3RlbS5EYXRhLk9kYmMuT2RiY0Vycm9yBAAAAAhfbWVzc2FnZQZfc3RhdGUMX25hdGl2ZWVycm9yB19zb3VyY2UBAQABCAIAAAAJBgAAAAYUAAAABXN0YXRlAAAAAAYVAAAABnNvdXJjZQs=", TargetFrameworkMoniker.netfx461) } };
+
+ OperationAbortedException operationAbortedException = (OperationAbortedException)typeof(OperationAbortedException)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(Exception) }, null)
+ .Invoke(new object[] { "message", exception });
+ yield return new object[] { PopulateException(operationAbortedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACVTeXN0ZW0uRGF0YS5PcGVyYXRpb25BYm9ydGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgIAAAAGAwAAACVTeXN0ZW0uRGF0YS5PcGVyYXRpb25BYm9ydGVkRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmF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AAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
var operationCanceledException = new OperationCanceledException("message", exception, new CancellationToken());
yield return new object[] { PopulateException(operationCanceledException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACFTeXN0ZW0uT3BlcmF0aW9uQ2FuY2VsZWRFeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOS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mUKARUAAAAKAAAACRMAAAAIAQEJGgAAAAEaAAAACgAAAAgIAQAAAAkYAAAACgs=", TargetFrameworkMoniker.netfx461) } };
var runtimeBinderInternalCompilerException = new RuntimeBinderInternalCompilerException("message", exception);
yield return new object[] { PopulateException(runtimeBinderInternalCompilerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFNNaWNyb3NvZnQuQ1NoYXJwLCBWZXJzaW9uPTQuMC40LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYQUBAAAARU1pY3Jvc29mdC5DU2hhcnAuUnVudGltZUJpbmRlci5SdW50aW1lQmluZGVySW50ZXJuYWxDb21waWxlckV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAABFTWljcm9zb2Z0LkNTaGFycC5SdW50aW1lQmluZGVyLlJ1bnRpbWVCaW5kZXJJbnRlcm5hbENvbXBpbGVyRXhjZXB0aW9uBgQAAAAHbWVzc2FnZQkFAAAACQYAAAAGBwAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBggAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCQAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCgAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMu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c3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDAAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJDgAAAAkPAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBAsAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- if (!PlatformDetection.IsUap)
- {
- RuntimeWrappedException runtimeWrappedException = (RuntimeWrappedException)typeof(RuntimeWrappedException)
- .GetConstructor((PlatformDetection.IsFullFramework ? BindingFlags.NonPublic : BindingFlags.Public) | BindingFlags.Instance, null, new Type[] { typeof(object) }, null)
- .Invoke(new object[] { exception });
- yield return new object[] { PopulateException(runtimeWrappedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAADdTeXN0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3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgsAAAAQU3lzdGVtLkV4Y2VwdGlvbgYMAAAAB21lc3NhZ2UJDQAAAAkOAAAACQUAAAAJBgAAAAkHAAAAAAAAAAroAwAACQgAAAAKBAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhMAAAAGc2VjcmV0CAEBCRQAAAABDQAAAAQAAAAJFQAAAAIAAAACAAAAAQ4AAAAJAAAACQsAAAAGFwAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFAAAAAoAAAAICAEAAAAGGAAAAANvbmUKARUAAAAKAAAACRMAAAAIAQEJGgAAAAEaAAAACgAAAAgIAQAAAAkYAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- }
+ RuntimeWrappedException runtimeWrappedException = (RuntimeWrappedException)typeof(RuntimeWrappedException)
+ .GetConstructor((PlatformDetection.IsFullFramework ? BindingFlags.NonPublic : BindingFlags.Public) | BindingFlags.Instance, null, new Type[] { typeof(object) }, null)
+ .Invoke(new object[] { exception });
+ yield return new object[] { PopulateException(runtimeWrappedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAADdTeXN0ZW0uUnVudGltZS5Db21waWxlclNlcnZpY2VzLlJ1bnRpbWVXcmFwcGVkRXhjZXB0aW9uDQAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW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AAAB21lc3NhZ2UJDQAAAAkOAAAACQUAAAAJBgAAAAkHAAAAAAAAAAroAwAACQgAAAAKBAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhMAAAAGc2VjcmV0CAEBCRQAAAABDQAAAAQAAAAJFQAAAAIAAAACAAAAAQ4AAAAJAAAACQsAAAAGFwAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFAAAAAoAAAAICAEAAAAGGAAAAANvbmUKARUAAAAKAAAACRMAAAAIAQEJGgAAAAEaAAAACgAAAAgIAQAAAAkYAAAACgs=", TargetFrameworkMoniker.netfx461) } };
var sEHException = new SEHException("message", exception);
yield return new object[] { PopulateException(sEHException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACtTeXN0ZW0uUnVudGltZS5JbnRlcm9wU2VydmljZXMuU0VIRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAK1N5c3RlbS5SdW50aW1lLkludGVyb3BTZXJ2aWNlcy5TRUhFeGNlcHRpb24GAwAAAAdtZXNzYWdlCQQAAAAJBQAAAAYGAAAAGWh0d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05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYLAAAAEFN5c3RlbS5FeGNlcHRpb24JAwAAAAkNAAAACQ4AAAAJBgAAAAkHAAAACQgAAAAAAAAACugDAAAJCQAAAAoECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGEwAAAAZzZWNyZXQIAQEJFAAAAAENAAAABAAAAAkVAAAAAgAAAAIAAAABDgAAAAUAAAAJCwAAAAYXAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEUAAAACgAAAAgIAQAAAAYYAAAAA29uZQoBFQAAAAoAAAAJEwAAAAgBAQkaAAAAARoAAAAKAAAACAgBAAAACRgAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
var sqlAlreadyFilledException = new SqlAlreadyFilledException("message", exception);
yield return new object[] { PopulateException(sqlAlreadyFilledException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAAC5TeXN0ZW0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lvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhQAAAAGc2VjcmV0CAEBCRUAAAABDgAAAAUAAAAJFgAAAAIAAAACAAAAAQ8AAAAGAAAACQwAAAAGGAAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFQAAAAsAAAAICAEAAAAGGQAAAANvbmUKARYAAAALAAAACRQAAAAIAQEJGwAAAAEbAAAACwAAAAgIAQAAAAkZAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- if (!PlatformDetection.IsUap)
+ SqlError sqlError = null;
+ // Full framework has no constructor overload for passing an exception
+ if (PlatformDetection.IsFullFramework)
{
- SqlError sqlError = null;
- // Full framework has no constructor overload for passing an exception
- if (PlatformDetection.IsFullFramework)
- {
- sqlError = (SqlError)typeof(SqlError)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(byte), typeof(byte), typeof(string), typeof(string), typeof(string), typeof(int), typeof(uint) }, null)
- .Invoke(new object[] { 1, (byte)2, (byte)3, "localhost", "error", "procedure", 1, (uint)2 });
- }
- else
- {
- sqlError = (SqlError)typeof(SqlError)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(byte), typeof(byte), typeof(string), typeof(string), typeof(string), typeof(int), typeof(uint), typeof(Exception) }, null)
- .Invoke(new object[] { 1, (byte)2, (byte)3, "localhost", "error", "procedure", 1, (uint)2, null });
- }
-
- SqlErrorCollection sqlErrorCollection = (SqlErrorCollection)typeof(SqlErrorCollection)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null)
- .Invoke(new object[] { });
- typeof(SqlErrorCollection)
- .GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance)
- .Invoke(sqlErrorCollection, new object[] { sqlError });
- SqlException sqlException = (SqlException)typeof(SqlException)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(SqlErrorCollection), typeof(Exception), typeof(Guid) }, null)
- .Invoke(new object[] { "message", sqlErrorCollection, exception, Guid.Parse("082FE40E-F683-402D-89C8-2E7486078620") });
-
- yield return new object[] { PopulateException(sqlException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0ZW0uRGF0YS5TcWxDbGllbnQuU3FsRXhjZXB0aW9uDgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMGRXJyb3JzEkNsaWVudENvbm5lY3Rpb25JZAEBAwMBAQEAAQABBwIDKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAILU3lzdGVtLkd1aWQCAAAABgMAAAAiU3lzdGVtLkRhdGEuU3FsQ2xpZW50LlNxbEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAoEGROABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCgT1////C1N5c3RlbS5Hd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AADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABwAAAAkaAAAAAgAAAAIAAAABEgAAAAgAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKChAXAAAABAAAAAkdAAAADQMBGQAAAA4AAAAICAEAAAAGHgAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJIAAAAAUdAAAAHlN5c3RlbS5EYXRhLlNxbENsaWVudC5TcWxFcnJvcgkAAAAGc291cmNlBm51bWJlcgVzdGF0ZQplcnJvckNsYXNzBnNlcnZlcgdtZXNzYWdlCXByb2NlZHVyZQpsaW5lTnVtYmVyDndpbjMyRXJyb3JDb2RlAQAAAAEBAQAACAICCAgCAAAABiEAAAAcLk5ldCBTcWxDbGllbnQgRGF0YSBQcm92aWRlcgEAAAACAwYiAAAACWxvY2FsaG9zdAYjAAAABWVycm9yBiQAAAAJcHJvY2VkdXJlAQAAAAIAAAABIAAAAA4AAAAICAEAAAAJHgAAAAoL", TargetFrameworkMoniker.netfx461) } };
+ sqlError = (SqlError)typeof(SqlError)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(byte), typeof(byte), typeof(string), typeof(string), typeof(string), typeof(int), typeof(uint) }, null)
+ .Invoke(new object[] { 1, (byte)2, (byte)3, "localhost", "error", "procedure", 1, (uint)2 });
+ }
+ else
+ {
+ sqlError = (SqlError)typeof(SqlError)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(byte), typeof(byte), typeof(string), typeof(string), typeof(string), typeof(int), typeof(uint), typeof(Exception) }, null)
+ .Invoke(new object[] { 1, (byte)2, (byte)3, "localhost", "error", "procedure", 1, (uint)2, null });
}
+ SqlErrorCollection sqlErrorCollection = (SqlErrorCollection)typeof(SqlErrorCollection)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null)
+ .Invoke(new object[] { });
+ typeof(SqlErrorCollection)
+ .GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance)
+ .Invoke(sqlErrorCollection, new object[] { sqlError });
+ SqlException sqlException = (SqlException)typeof(SqlException)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(string), typeof(SqlErrorCollection), typeof(Exception), typeof(Guid) }, null)
+ .Invoke(new object[] { "message", sqlErrorCollection, exception, Guid.Parse("082FE40E-F683-402D-89C8-2E7486078620") });
+
+ yield return new object[] { PopulateException(sqlException, setHResult: false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACJTeXN0ZW0uRGF0YS5TcWxDbGllbnQuU3FsRXhjZXB0aW9uDgAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMGRXJyb3JzEkNsaWVudENvbm5lY3Rpb25JZAEBAwMBAQEAAQABBwIDKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAILU3lzdGVtLkd1aWQCAAAABgMAAAAiU3lzdGVtLkRhdGEuU3FsQ2xpZW50LlNxbEV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZa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N0ZW0uQ29sbGVjdGlvbnMuQXJyYXlMaXN0AwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24FAAAICAkXAAAAAQAAAAEAAAAEDgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGGAAAAAZzZWNyZXQIAQEJGQAAAAERAAAABwAAAAkaAAAAAgAAAAIAAAABEgAAAAgAAAAJDwAAAAYcAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKChAXAAAABAAAAAkdAAAADQMBGQAAAA4AAAAICAEAAAAGHgAAAANvbmUKARoAAAAOAAAACRgAAAAIAQEJIAAAAAUdAAAAHlN5c3RlbS5EYXRhLlNxbENsaWVudC5TcWxFcnJvcgkAAAAGc291cmNlBm51bWJlcgVzdGF0ZQplcnJvckNsYXNzBnNlcnZlcgdtZXNzYWdlCXByb2NlZHVyZQpsaW5lTnVtYmVyDndpbjMyRXJyb3JDb2RlAQAAAAEBAQAACAICCAgCAAAABiEAAAAcLk5ldCBTcWxDbGllbnQgRGF0YSBQcm92aWRlcgEAAAACAwYiAAAACWxvY2FsaG9zdAYjAAAABWVycm9yBiQAAAAJcHJvY2VkdXJlAQAAAAIAAAABIAAAAA4AAAAICAEAAAAJHgAAAAoL", TargetFrameworkMoniker.netfx461) } };
+
var sqlNotFilledException = new SqlNotFilledException("message", exception);
yield return new object[] { PopulateException(sqlNotFilledException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5TeXN0ZW0uRGF0YSwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkz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hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYUAAAABnNlY3JldAgBAQkVAAAAAQ4AAAAFAAAACRYAAAACAAAAAgAAAAEPAAAABgAAAAkMAAAABhgAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARUAAAALAAAACAgBAAAABhkAAAADb25lCgEWAAAACwAAAAkUAAAACAEBCRsAAAABGwAAAAsAAAAICAEAAAAJGQAAAAoL", TargetFrameworkMoniker.netfx461) } };
var taskSchedulerException = new TaskSchedulerException("message", exception);
yield return new object[] { PopulateException(taskSchedulerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAC1TeXN0ZW0uVGhyZWFkaW5nLlRhc2tzLlRhc2tTY2hlZHVsZXJFeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgIAAAAtU3lzdGVtLlRocmVhZGluZy5UYXNrcy5UYXNrU2NoZWR1bGVyRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACQUAAAAGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQ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VTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGCwAAABBTeXN0ZW0uRXhjZXB0aW9uCQMAAAAJDQAAAAkOAAAACQYAAAAJBwAAAAkIAAAAAAAAAAroAwAACQkAAAAKBAoAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhMAAAAGc2VjcmV0CAEBCRQAAAABDQAAAAQAAAAJFQAAAAIAAAACAAAAAQ4AAAAFAAAACQsAAAAGFwAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFAAAAAoAAAAICAEAAAAGGAAAAANvbmUKARUAAAAKAAAACRMAAAAIAQEJGgAAAAEaAAAACgAAAAgIAQAAAAkYAAAACgs=", TargetFrameworkMoniker.netfx461) } };
- if (!PlatformDetection.IsUap)
- {
- ThreadAbortException threadAbortException = (ThreadAbortException)typeof(ThreadAbortException)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null)
- .Invoke(new object[] { });
- yield return new object[] { PopulateException(threadAbortException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACVTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZEFib3J0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3Rya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GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null)
+ .Invoke(new object[] { });
+ yield return new object[] { PopulateException(threadAbortException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACVTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZEFib3J0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAJVN5c3RlbS5UaHJlYWRpbmcuVGhyZWFkQWJvcnRFeGNlcHRpb24GAwAAAA1TeXN0ZW0gZXJyb3IuCQQAAAAKBgUAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYGAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgcAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABggAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAQAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQkAAAACAAAAAgAAAAQJAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbm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Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYKAAAABnNlY3JldAgBAQkLAAAAAQsAAAAJAAAACAgBAAAABgwAAAADb25lCgs=", TargetFrameworkMoniker.netfx461) } };
var threadInterruptedException = new ThreadInterruptedException("message", exception);
yield return new object[] { PopulateException(threadInterruptedException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACtTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZEludGVycnVwdGVkRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAK1N5c3RlbS5UaHJlYWRpbmcuVGhyZWFkSW50ZXJydXB0ZWRFeGNlcHRpb24GAwAAAAdtZXNzYWdlCQQAAAAJBQAAAAYGAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBwAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYIAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYJAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQEAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZ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pb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYLAAAAEFN5c3RlbS5FeGNlcHRpb24JAwAAAAkNAAAACQ4AAAAJBgAAAAkHAAAACQgAAAAAAAAACugDAAAJCQAAAAoECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGEwAAAAZzZWNyZXQIAQEJFAAAAAENAAAABAAAAAkVAAAAAgAAAAIAAAABDgAAAAUAAAAJCwAAAAYXAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEUAAAACgAAAAgIAQAAAAYYAAAAA29uZQoBFQAAAAoAAAAJEwAAAAgBAQkaAAAAARoAAAAKAAAACAgBAAAACRgAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
- if (!PlatformDetection.IsUap)
- {
- ThreadStartException threadStartException = (ThreadStartException)typeof(ThreadStartException)
- .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Exception) }, null)
- .Invoke(new object[] { exception });
- yield return new object[] { PopulateException(threadStartException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACVTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZFN0YXJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDA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ameworkMoniker.netfx461) } };
- }
+ ThreadStartException threadStartException = (ThreadStartException)typeof(ThreadStartException)
+ .GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Exception) }, null)
+ .Invoke(new object[] { exception });
+ yield return new object[] { PopulateException(threadStartException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACVTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZFN0YXJ0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAJVN5c3RlbS5UaHJlYWRpbmcuVGhyZWFkU3RhcnRFeGNlcHRpb24GAwAAABdUaHJlYWQgZmFpbGVkIHRvIHN0YXJ0LgkEAAAACQUAAAAGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoEBAAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJCgAAAAIAAAACAAAABAUAAAAQU3lzdGVtLkV4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4AAAAJBgAAAAkHAAAACQgAAAAAAAAACugDAAAJCQAAAAoECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGEwAAAAZzZWNyZXQIAQEJFAAAAAENAAAABAAAAAkVAAAAAgAAAAIAAAABDgAAAAUAAAAJCwAAAAYXAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEUAAAACgAAAAgIAQAAAAYYAAAAA29uZQoBFQAAAAoAAAAJEwAAAAgBAQkaAAAAARoAAAAKAAAACAgBAAAACRgAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
var threadStateException = new ThreadStateException("message", exception);
yield return new object[] { PopulateException(threadStateException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACVTeXN0ZW0uVGhyZWFkaW5nLlRocmVhZFN0YXRlRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAJVN5c3RlbS5UaHJlYWRpbmcuVGhyZWFkU3RhdGVFeGNlcHRpb24GAwAAAAdtZXNzYWdlCQQAAAAJBQAAAAYGAAAAGWh0dHA6Ly9tc2RuLm1pY3J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ZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYLAAAAEFN5c3RlbS5FeGNlcHRpb24JAwAAAAkNAAAACQ4AAAAJBgAAAAkHAAAACQgAAAAAAAAACugDAAAJCQAAAAoECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGEwAAAAZzZWNyZXQIAQEJFAAAAAENAAAABAAAAAkVAAAAAgAAAAIAAAABDgAAAAUAAAAJCwAAAAYXAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEUAAAACgAAAAgIAQAAAAYYAAAAA29uZQoBFQAAAAoAAAAJEwAAAAgBAQkaAAAAARoAAAAKAAAACAgBAAAACRgAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new Size(10, 45), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5TaXplAgAAAAV3aWR0aAZoZWlnaHQAAAgIAgAAAAoAAAAtAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5TaXplAgAAAAV3aWR0aAZoZWlnaHQAAAgIAgAAAAoAAAAtAAAACw==", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new SizeF(10.2f, 45.8f), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABRTeXN0ZW0uRHJhd2luZy5TaXplRgIAAAAFd2lkdGgGaGVpZ2h0AAALCwIAAAAzMyNBMzM3Qgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABRTeXN0ZW0uRHJhd2luZy5TaXplRgIAAAAFd2lkdGgGaGVpZ2h0AAALCwIAAAAzMyNBMzM3Qgs=", TargetFrameworkMoniker.netfx461) } };
- // System.Drawing.Common is a not supported assembly in UAP. Where it is generated
- // from the reference assembly which doesn't declare the TypeForwardedFromAttributes so blobs will be different.
- if (!PlatformDetection.IsUap)
+ yield return new object[] { GraphicsUnit.Pixel, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { ContentAlignment.BottomCenter, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { LinearGradientMode.BackwardDiagonal, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { FontStyle.Bold, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netfx461) } };
+ // libgdiplus is not supported on some Windows variants.
+ if (PlatformDetection.IsDrawingSupported)
{
- yield return new object[] { GraphicsUnit.Pixel, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABtTeXN0ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAIAAAACAAAACw==", TargetFrameworkMoniker.netfx461) } };
- yield return new object[] { ContentAlignment.BottomCenter, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAB9TeXN0ZW0uRHJhd2luZy5Db250ZW50QWxpZ25tZW50AQAAAAd2YWx1ZV9fAAgCAAAAAAIAAAs=", TargetFrameworkMoniker.netfx461) } };
- yield return new object[] { LinearGradientMode.BackwardDiagonal, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACtTeXN0ZW0uRHJhd2luZy5EcmF3aW5nMkQuTGluZWFyR3JhZGllbnRNb2RlAQAAAAd2YWx1ZV9fAAgCAAAAAwAAAAs=", TargetFrameworkMoniker.netfx461) } };
- yield return new object[] { FontStyle.Bold, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netcoreapp21), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAABAAAACw==", TargetFrameworkMoniker.netfx461) } };
- // libgdiplus is not supported on some Windows variants.
- if (PlatformDetection.IsDrawingSupported)
- {
- yield return new object[] { new Font("coreFxAwesomeFont", 8.5f, FontStyle.Strikeout, GraphicsUnit.Pixel), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5Gb250BAAAAAROYW1lBFNpemUFU3R5bGUEVW5pdAEABAQLGFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQIAAAAbU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AgAAAAIAAAAGAwAAABFjb3JlRnhBd2Vzb21lRm9udAAACEEF/P///xhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAAIAAAABfv///8bU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AQAAAAd2YWx1ZV9fAAgCAAAAAgAAAAs=", TargetFrameworkMoniker.netcoreapp30), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5Gb250BAAAAAROYW1lBFNpemUFU3R5bGUEVW5pdAEABAQLGFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQIAAAAbU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AgAAAAIAAAAGAwAAABFjb3JlRnhBd2Vzb21lRm9udAAACEEF/P///xhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAAIAAAABfv///8bU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AQAAAAd2YWx1ZV9fAAgCAAAAAgAAAAs=", TargetFrameworkMoniker.netfx461) } };
- }
+ yield return new object[] { new Font("coreFxAwesomeFont", 8.5f, FontStyle.Strikeout, GraphicsUnit.Pixel), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5Gb250BAAAAAROYW1lBFNpemUFU3R5bGUEVW5pdAEABAQLGFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQIAAAAbU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AgAAAAIAAAAGAwAAABFjb3JlRnhBd2Vzb21lRm9udAAACEEF/P///xhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAAIAAAABfv///8bU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AQAAAAd2YWx1ZV9fAAgCAAAAAgAAAAs=", TargetFrameworkMoniker.netcoreapp30), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAABNTeXN0ZW0uRHJhd2luZy5Gb250BAAAAAROYW1lBFNpemUFU3R5bGUEVW5pdAEABAQLGFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQIAAAAbU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AgAAAAIAAAAGAwAAABFjb3JlRnhBd2Vzb21lRm9udAAACEEF/P///xhTeXN0ZW0uRHJhd2luZy5Gb250U3R5bGUBAAAAB3ZhbHVlX18ACAIAAAAIAAAABfv///8bU3lzdGVtLkRyYXdpbmcuR3JhcGhpY3NVbml0AQAAAAd2YWx1ZV9fAAgCAAAAAgAAAAs=", TargetFrameworkMoniker.netfx461) } };
}
// Custom object
yield return new object[] { observableCollection, new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5XaW5kb3dzQmFzZSwgVmVyc2lvbj0zLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTMxYmYzODU2YWQzNjRlMzUFAQAAAJIBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLk9ic2VydmFibGVDb2xsZWN0aW9uYDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0CAAAACF9tb25pdG9yEkNvbGxlY3Rpb25gMStpdGVtcwQDoAFTeXN0ZW0uQ29sbGVjdGlvbnMuT2JqZWN0TW9kZWwuT2JzZXJ2YWJsZUNvbGxlY3Rpb25gMStTaW1wbGVNb25pdG9yW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAgAAAH5TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0CAAAACQMAAAAJBAAAAAUDAAAAoAFTeXN0ZW0uQ29sbGVjdGlvbnMuT2JqZWN0TW9kZWwuT2JzZXJ2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JhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAgAAAH5TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0CAAAACQMAAAAJBAAAAAUDAAAAoAFTeXN0ZW0uQ29sbGVjdGlvbnMuT2JqZWN0TW9kZWwuT2JzZXJ2YWJsZUNvbGxlY3Rpb25gMStTaW1wbGVNb25pdG9yW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAApfYnVzeUNvdW50AAgCAAAAAAAAAAQEAAAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQUAAAAFAAAABQAAAA8FAAAACAAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAAAAAAAAAAAAAAAAAs=", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new System.Collections.ObjectModel.ReadOnlyObservableCollection<int>(observableCollection), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAE5XaW5kb3dzQmFzZSwgVmVyc2lvbj0zLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTMxYmYzODU2YWQzNjRlMzUFAQAAAJoBU3lzdGVtLkNvbGxlY3Rpb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Q291bnQACAIAAAAAAAAABAUAAAB+U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24HAAAICAgJBgAAAAUAAAAFAAAADwYAAAAIAAAACAEAAAACAAAAAwAAAAQAAAAFAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } };
- // [ActiveIssue(31912, "Blobs need to be updated for UAP")]
- if (!PlatformDetection.IsUap)
- {
- yield return new object[] { new System.Collections.ObjectModel.ReadOnlyCollection<int>(Enumerable.Range(1, 15).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJABU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5Q29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAARsaXN0A35TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0JAgAAAAQCAAAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQMAAAAPAAAADwAAAA8DAAAADwAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJABU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5Q29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAARsaXN0A35TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0JAgAAAAQCAAAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQMAAAAPAAAADwAAAA8DAAAAEAAAAAgBAAAAAgAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } };
- yield return new object[] { new System.Collections.ObjectModel.Collection<int>(Enumerable.Range(1, 20).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQA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wgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQkCAAAABAIAAAB+U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24HAAAICAgJAwAAABQAAAAUAAAADwMAAAAgAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } };
- }
+ yield return new object[] { new System.Collections.ObjectModel.ReadOnlyCollection<int>(Enumerable.Range(1, 15).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAJABU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5Q29sbGVjdGlvbmAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAQAAAARsaXN0A35TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0JAgAAAAQCAAAAflN5c3RlbS5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AwAAAANAAAADgAAAA8AAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } };
+ yield return new object[] { new System.Collections.ObjectModel.Collection<int>(Enumerable.Range(1, 20).ToList()), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAIgBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQEAAAAFaXRlbXMDflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQkCAAAABAIAAAB+U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24HAAAICAgJAwAAABQAAAAUAAAADwMAAAAUAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAACw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAIgBU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLkNvbGxlY3Rpb25gMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQEAAAAFaXRlbXMDflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQkCAAAABAIAAAB+U3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24HAAAICAgJAwAAABQAAAAUAAAADwMAAAAgAAAACAEAAAACAAAAAwAAAAQAAAAFAAAABgAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACw==", TargetFrameworkMoniker.netfx461) } };
yield return new object[] { new System.Collections.ObjectModel.ReadOnlyDictionary<int, string>(dictionary), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAAO0BU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRPbmx5RGljdGlvbmFyeWAyW1tTeXN0ZW0uSW50MzIsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV0sW1N5c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJh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AuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0E+////+MBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuS2V5VmFsdWVQYWlyYDJbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XSxbU3lzdGVtLlN0cmluZywgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0CAAAAA2tleQV2YWx1ZQABCAEAAAAGBgAAAAR0ZXN0Afn////7////AgAAAAYIAAAADGFub3RoZXIgdGVzdAs=", TargetFrameworkMoniker.netfx461) } };
var simpleKeyedCollection = new SimpleKeyedCollection
yield return new object[] { new TypeWithoutNamespace(), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAHBTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMsIFZlcnNpb249NC4wLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05ZDc3Y2M3YWQzOWI2OGViBQEAAAAUVHlwZVdpdGhvdXROYW1lc3BhY2UAAAAAAgAAAAs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAHBTeXN0ZW0uUnVudGltZS5TZXJpYWxpemF0aW9uLkZvcm1hdHRlcnMuVGVzdHMsIFZlcnNpb249NC4wLjMuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj05ZDc3Y2M3YWQzOWI2OGViBQEAAAAUVHlwZVdpdGhvdXROYW1lc3BhY2UAAAAAAgAAAAs=", TargetFrameworkMoniker.netfx461) } };
// System.Drawing.Common
- // In UAP System.Drawing.Common is a not supported assembly, so this types throw PNSE.
// Since this code paths use GDI+ we need to validate it is available
- if (!PlatformDetection.IsUap && PlatformDetection.IsDrawingSupported)
+ if (PlatformDetection.IsDrawingSupported)
{
const string InlineJpegImage = "iVBORw0KGgoAAAANSUhEUgAAAG4AAABkCAIAAADoopLKAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAIABJREFUeJzcuQdUU+u67825Z++z99qrr2VvCCi9954EQkioCQRCEgiE3nvvvfeOgEhXQBCkiKJiAcSCUqSDNJGO9G7ug9nbs+65e5xx7rjfGHecb47/eMczZxKc+c3/U97IYpLxRD24go0UwE0Ldrn1vHhk/dbUVvWnXcuCO9d7p28NzmW0vLn+6E3ti/6WrtHXo4t3X3d/YjA+bO5UtDzaZDA2GV8Wt9d3GIe7DAZoj8HYP2LsHzAYX0BHoL2d3aODw6+n/6v+mx9f/reDxbWsK+jusHX+Y83QQu2IAmLcDfPcmujWbv/6tpqpjfrpjett/TVvx1/PbkxsMNYYjN6VrUUG49XUXErZrWUGY/XoaP3L4Q6DMbd+uPUVJWA8+jupI8bB/h85Hu4fHOztfzk8+v8nSufCp3Eto6F3u+lp1Wr+aVK2QWivWNfSRp+qx1VjK5VD84kN7XkPXz8Zmx9aOwJ2M1/1aGgqurBsaufw08EhXPzMYPR8mJvdONj5SvPw77Y72t/b+eO/vbOzs7W1tbu7e3h4+P+Mwf9Hxz9B2Tx79HiJUTO6UdrzqWpoJa9zNPVxT3nfJ6vMirLe2ar3n8Ju3g8vrS9qfdX8fuLN3EbfLqN7nfH4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onLgOHAFlr/X90eBrieBvgWvR5A0A0PdPg7SB69T+awBQnv9ikNx5kdRxAQD0vTYI9L0uz1cVWn8BW/PTv6f0uz8aREW+QRafBkDDX/0LcVypQmoPWipH2MEBWdm8MjyQRdIIpE6yyE7mq7NQGAKVmAZDpKLYqkAX3diO5OZmEU0CeQ6BJEdhhCyhG8P2SJ0tRL4TyTRT5EFdqNdcPiMJjwnDk9qaZUXP++LhrwVDF0R1RyXuHr4mQrc0EfPnFH2nVWPfKxevKHfcVex8KNt6XzK7Ihq7DhwBU0AZcPfPAP7RHRAtGL8GjPNGrwD+6Y7ce4XUc5nYfQlA6LoI3L3WR2w/T9hwDt/2E671R8DrrOHrzgNwteeALEz1jwBkxdl/y2t3iKKvAfDCU7CCk6/Fpecc/xfiVBaf1FViq59jhUeZoVFpuB+sODS+Ac8zk3gqIBGOQaxNSUuCM5T+ToqulaWrhFFtdJ4DjuRhcGKJOkiThlS+DrExwlQEBeZKS2TUUr4gyB1h+kfFxZuULQeE3aeEI1fUvaf1ZQsKT7Mgp59Xuds6fdE8f1m9dE22bUW89Y5wcUU0fVM8fgOI+6NHYBC4A+JeA9yBDsAZvsQeughgDV54rQ+4A+A7L+A6zmPbzwGAu9f6sC0/YJq/RzedBaAav3stDl31A6rye2AKUf4dvOwMAFJy+t8C3L3WBwl9mR38Iiv/RGbe54AU3yf/wv8Fe4XaH0Z+k6QAAAAASUVORK5CYII=";
byte[] rawInlineImageBytes = Convert.FromBase64String(InlineJpegImage);
}
// System.DirectoryServices, System.Security.Principal and System.Security.AccessControl are only available on Windows.
- // They are currently not supported on UAP
- if (PlatformDetection.IsWindows && !PlatformDetection.IsUap)
+ if (PlatformDetection.IsWindows)
{
var directoryNotFoundException = new DirectoryNotFoundException("message", exception);
yield return new object[] { PopulateException(directoryNotFoundException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACRTeXN0ZW0uSU8uRGlyZWN0b3J5Tm90Rm91bmRFeGNlc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nZQoKCgoKAAAAAAoAFROACgoBFAAAAAoAAAAICAEAAAAGGAAAAANvbmUKARUAAAAKAAAACRMAAAAIAQEJGgAAAAEaAAAACgAAAAgIAQAAAAkYAAAACgs=", TargetFrameworkMoniker.netfx461) } };
<PropertyGroup>
<!-- Needs netfx configuration per bug (dotnet/corefx #17575) so tests are actively running in desktop -->
<BuildConfigurations>
- uap;
netfx;
netcoreapp;
</BuildConfigurations>
<SkipIncludeNewtonsoftJson>true</SkipIncludeNewtonsoftJson>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BinaryFormatterTestData.cs" />
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Json.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<AssemblyName>System.Runtime.Serialization.Json</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(SourceDir)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(TestSourceFolder)DataContractJsonSerializer.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Primitives.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<FileAlignment>512</FileAlignment>
<PlatformTarget>AnyCPU</PlatformTarget>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\Serialization\CollectionDataContractAttribute.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Runtime\Serialization\CollectionDataContractAttributeTests.cs" />
<AssemblyVersion>4.1.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Xml.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<AssemblyName>System.Runtime.Serialization.Xml</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
- <ProjectReference Include="$(SourceDir)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
+ <ItemGroup>
+ <ProjectReference Include="..\..\System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(TestSourceFolder)CanonicalizationTestHelper.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\Runtime\Serialization\Utils.cs" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(TestSourceFolder)DataContractSerializerStressTests.cs" />
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {69FC7EB5-64FD-4464-88B1-B8ADD3870640}.Debug|Any CPU.ActiveCfg = uap-Windows_NT-Debug|Any CPU
- {69FC7EB5-64FD-4464-88B1-B8ADD3870640}.Debug|Any CPU.Build.0 = uap-Windows_NT-Debug|Any CPU
- {69FC7EB5-64FD-4464-88B1-B8ADD3870640}.Release|Any CPU.ActiveCfg = uap-Windows_NT-Release|Any CPU
- {69FC7EB5-64FD-4464-88B1-B8ADD3870640}.Release|Any CPU.Build.0 = uap-Windows_NT-Release|Any CPU
{263DA4F1-C3BC-4B43-98E7-9F38B419A131}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{263DA4F1-C3BC-4B43-98E7-9F38B419A131}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{263DA4F1-C3BC-4B43-98E7-9F38B419A131}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.WindowsRuntime.UI.Xaml.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp' or '$(TargetGroup)'=='uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.WindowsRuntime\ref\System.Runtime.WindowsRuntime.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' == 'true'">
<ProjectReference Include="..\..\System.Runtime.WindowsRuntime\ref\System.Runtime.WindowsRuntime.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Runtime.WindowsRuntime.UI.Xaml</AssemblyName>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetGroup)' == 'netstandard1.1' or '$(TargetGroup)' == 'netstandard'">
<GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_WindowsRuntime</GeneratePlatformNotSupportedAssemblyMessage>
<GeneratePlatformNotSupportedAssemblyWithGlobalPrefix>true</GeneratePlatformNotSupportedAssemblyWithGlobalPrefix>
<AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.1'">4.0.1.0</AssemblyVersion>
</PropertyGroup>
- <!-- Default configurations to help VS understand the options -->
- <ItemGroup Condition="'$(TargetsNetCoreApp)'=='true' or '$(TargetsUap)'=='true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System\Runtime\InteropServices\HResults.cs" />
<Compile Include="System\Windows\CornerRadius.cs" />
<Compile Include="System\Windows\Duration.cs" />
<Link>Common\System\Runtime\InteropServices\WindowsRuntime\WindowsRuntimeImportAttribute.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)'=='true' or '$(TargetsUap)'=='true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Reference Include="System.Runtime" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Globalization" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
+ netcoreapp-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Windows\UI\Xaml\CornerRadiusTests.cs" />
namespace Windows.UI.Xaml.Automation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class ElementNotAvailableExceptionTests
{
private const int E_ELEMENTNOTAVAILABLE = unchecked((int)0x802B001F);
namespace Windows.UI.Xaml.Automation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class ElementNotEnabledExceptionTests
{
private const int E_ELEMENTNOTENABLED = unchecked((int)0x802B001E);
// 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;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Xunit;
namespace Windows.UI.Xaml.Controls.Primitives.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class GeneratorPositionTests
{
[Fact]
namespace Windows.UI.Xaml.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class CornerRadiusTests
{
[Fact]
namespace Windows.UI.Xaml.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class DurationTests
{
[Fact]
namespace Windows.UI.Xaml.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class GridLengthTests
{
[Fact]
namespace Windows.UI.Xaml.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class LayoutCycleExceptionTests
{
private const int E_LAYOUTCYCLE = unchecked((int)0x802B0014);
namespace Windows.UI.Xaml.Markup.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class XamlParseExceptionTests
{
private const int E_XAMLPARSEFAILED = unchecked((int)0x802B000A);
namespace Windows.UI.Xaml.Media.Animation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class KeyTimeTests
{
[Fact]
namespace Windows.UI.Xaml.Media.Animation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class RepeatBehaviorTests
{
[Fact]
namespace Windows.UI.Xaml.Media.Media3D.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class Matrix3DTests
{
[Fact]
namespace Windows.UI.Xaml.Media.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class MatrixTests
{
[Fact]
// 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;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Xunit;
namespace Windows.UI.Xaml.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class ThicknessTests
{
[Fact]
<StrongNameKeyId>ECMA</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C4854B44-ABFE-4BB5-8F89-F35FE6201338}.Debug|Any CPU.ActiveCfg = uap-Windows_NT-Debug|Any CPU
- {C4854B44-ABFE-4BB5-8F89-F35FE6201338}.Debug|Any CPU.Build.0 = uap-Windows_NT-Debug|Any CPU
- {C4854B44-ABFE-4BB5-8F89-F35FE6201338}.Release|Any CPU.ActiveCfg = uap-Windows_NT-Release|Any CPU
- {C4854B44-ABFE-4BB5-8F89-F35FE6201338}.Release|Any CPU.Build.0 = uap-Windows_NT-Release|Any CPU
{844A2A0B-4169-49C3-B367-AFDC4894E487}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
{844A2A0B-4169-49C3-B367-AFDC4894E487}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
{844A2A0B-4169-49C3-B367-AFDC4894E487}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
match the output assembly name 'System.Runtime.WindowsRuntime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
-->
<NoWarn>$(NoWarn);1698</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Runtime.WindowsRuntime.cs" />
<Compile Include="System.Runtime.WindowsRuntime.Manual.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp' or '$(TargetGroup)'=='uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="$(RepositoryEngineeringDir)restore\winrt\winrt.depproj" />
<ProjectReference Include="..\..\mscorlib.WinRT-Facade\ref\mscorlib.WinRT-Facade.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netstandard'">
+ <ItemGroup Condition="'$(TargetsNetStandard)' == 'true'">
<ProjectReference Include="$(RepositoryEngineeringDir)restore\winrt\winrt.depproj" />
<ProjectReference Include="..\..\mscorlib.WinRT-Facade\ref\mscorlib.WinRT-Facade.csproj" />
</ItemGroup>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- 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>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-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="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
- <DefineConstants>$(DefineConstants);netstandard;FEATURE_APPX</DefineConstants>
+ <AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard1.0'">4.0.0.0</AssemblyVersion>
+ <AssemblyVersion Condition="'$(TargetFramework)' == 'netstandard1.2'">4.0.11.0</AssemblyVersion>
+ <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true'">$(DefineConstants);FEATURE_APPX</DefineConstants>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;netstandard1.2-Debug;netstandard1.2-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetsNetStandard)' == 'true'">
<GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_WindowsRuntime</GeneratePlatformNotSupportedAssemblyMessage>
<GeneratePlatformNotSupportedAssemblyWithGlobalPrefix>true</GeneratePlatformNotSupportedAssemblyWithGlobalPrefix>
- <AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.0'">4.0.0.0</AssemblyVersion>
- <AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.2'">4.0.11.0</AssemblyVersion>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<Reference Include="mscorlib" />
<Reference Include="Windows" />
<ReferenceFromRuntime Include="System.Runtime.InteropServices.WindowsRuntime" />
<ReferenceFromRuntime Include="System.ObjectModel" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetsUap)' == 'true'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<!-- Needed for the compiler to resolve IObservableMap.MapChanged. -->
<ProjectReference Include="..\..\System.Runtime\src\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.Extensions\src\System.Runtime.Extensions.csproj">
<ProjectReference Include="..\..\System.Runtime.InteropServices.WindowsRuntime\src\System.Runtime.InteropServices.WindowsRuntime.csproj" />
<ProjectReference Include="..\..\System.ObjectModel\src\System.ObjectModel.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System\InternalHelpers.cs" />
<Compile Include="System\IO\StreamOperationAsyncResult.cs" />
<Compile Include="System\Runtime\InteropServices\WindowsRuntime\MarshalingHelpers.cs" />
(libpath[packagepath.Length] == '\\' || packagepath.EndsWith("\\"));
}
-#if NETSTANDARD2_0
+#if NETSTANDARD2_0 || NETCOREAPP
/* Returns true if libpath is path to an ni image and if the path contains packagename as a subfolder */
private static bool LibpathContainsPackagename(string libpath, string packagename)
{
}
}
-#if NETSTANDARD2_0
+#if NETSTANDARD2_0 || NETCOREAPP
/* On phone libpath is usually ni path and not IL path as we do not touch the IL on phone.
On Phone NI images are no longer under package root. Due to this above logic fails to
find the package to which the library belongs. We assume that NI paths usually have
{
string packageSimpleName = FindPackageSimpleNameForFilename(libpath);
-#if NETSTANDARD2_0
+#if NETSTANDARD2_0 || NETCOREAPP
// If we have found a simple package name for the assembly, lets make sure it is not *.resource.dll that
// an application may have packaged in its AppX. This is to enforce AppX apps to use PRI resources.
if (packageSimpleName != null)
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
+ netcoreapp-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
namespace System.IO
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class AsWinRTStreamTests
{
[Fact]
namespace System.IO
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class CreateSafeFileHandleTests
{
[Fact]
Assert.Throws<NotSupportedException>(() => folder.CreateSafeFileHandle("Foo", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read, FileOptions.Encrypted));
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFolder_Basic()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
File.Delete(Path.Combine(folder.Path, filename));
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFolder_SurfaceIOException()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
File.Delete(Path.Combine(folder.Path, filename));
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFolder_SurfaceNotFoundException()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
Assert.Throws<FileNotFoundException>(() => folder.CreateSafeFileHandle(filename, FileMode.Open)).Message);
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFolder_FileStream()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
File.Delete(Path.Combine(folder.Path, filename));
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFile_Basic()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
file.DeleteAsync().AsTask().Wait();
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFile_FileStream()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
file.DeleteAsync().AsTask().Wait();
}
- [Fact]
+ [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsInAppContainer))]
public void FromStorageFile_SurfaceIOException()
{
StorageFolder folder = ApplicationData.Current.TemporaryFolder;
namespace System.Runtime.InteropServices.WindowsRuntime.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class WindowsRuntimeBufferExtensionsTests
{
public static IEnumerable<object[]> AsBuffer_TestData()
namespace System.Runtime.InteropServices.WindowsRuntime.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class WindowsRuntimeBufferTests
{
[Theory]
namespace Windows.Foundation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class PointTests
{
[Fact]
}
[Theory]
+ [ActiveIssue(41849)]
[MemberData(nameof(ToString_TestData))]
public void ToString_Invoke_ReturnsExpected(Point point, string format, IFormatProvider formatProvider, string expected)
{
namespace Windows.Foundation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class RectTests
{
[Fact]
}
[Theory]
+ [ActiveIssue(41849)]
[MemberData(nameof(ToString_TestData))]
public void ToString_Invoke_ReturnsExpected(Rect rect, string format, IFormatProvider formatProvider, string expected)
{
namespace Windows.Foundation.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class SizeTests
{
[Fact]
namespace Windows.UI.Tests
{
+ [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
public class ColorTests
{
[Fact]
}
[Theory]
+ [ActiveIssue(41849)]
[MemberData(nameof(ToString_TestData))]
public void ToString_Invoke_ReturnsExpected(Color color, string format, IFormatProvider formatProvider, string expected)
{
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
<!-- disable warnings about obsolete APIs -->
<NoWarn>$(NoWarn);0809;0618</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Runtime</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<NoWarn>1718</NoWarn>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\EnumTypes.cs">
yield return new object[] { "mscorlib", "SyStEm.NULLABLE`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", true, BindingFlags.Public | BindingFlags.Instance, Type.DefaultBinder, new object[0], CultureInfo.InvariantCulture, null, "", true };
}
- [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWinRTSupported), nameof(PlatformDetection.IsNotWindows8x), nameof(PlatformDetection.IsNotWindowsServerCore), nameof(PlatformDetection.IsNotWindowsNanoServer), nameof(PlatformDetection.IsNotWindowsIoTCore))]
+ [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsWinUISupported))]
[PlatformSpecific(TestPlatforms.Windows)]
[MemberData(nameof(TestingCreateInstanceObjectHandleFullSignatureWinRTData))]
public static void TestingCreateInstanceObjectHandleFullSignatureWinRT(string assemblyName, string type, bool ignoreCase, BindingFlags bindingAttr, Binder binder, object[] args, CultureInfo culture, object[] activationAttributes, string returnedFullNameType)
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Assembly.LoadFile is not supported in AppX.")]
public static void CreateInstanceAssemblyResolve()
{
RemoteExecutor.Invoke(() =>
[Fact]
public static void Test_ToString()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (object[] testdata in ToString_TestData())
{
- foreach (object[] testdata in ToString_TestData())
- {
- ToString((decimal)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
- }
+ ToString((decimal)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
}
- }).Dispose();
+ }
}
private static void ToString(decimal f, string format, IFormatProvider provider, string expected)
[Fact]
public static void TryFormat()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (object[] testdata in ToString_TestData())
{
- foreach (object[] testdata in ToString_TestData())
- {
- decimal localI = (decimal)testdata[0];
- string localFormat = (string)testdata[1];
- IFormatProvider localProvider = (IFormatProvider)testdata[2];
- string localExpected = (string)testdata[3];
+ decimal localI = (decimal)testdata[0];
+ string localFormat = (string)testdata[1];
+ IFormatProvider localProvider = (IFormatProvider)testdata[2];
+ string localExpected = (string)testdata[3];
- try
+ try
+ {
+ char[] actual;
+ int charsWritten;
+
+ // Just right
+ actual = new char[localExpected.Length];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(localExpected.Length, charsWritten);
+ Assert.Equal(localExpected, new string(actual));
+
+ // Longer than needed
+ actual = new char[localExpected.Length + 1];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(localExpected.Length, charsWritten);
+ Assert.Equal(localExpected, new string(actual, 0, charsWritten));
+
+ // Too short
+ if (localExpected.Length > 0)
{
- char[] actual;
- int charsWritten;
+ actual = new char[localExpected.Length - 1];
+ Assert.False(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(0, charsWritten);
+ }
- // Just right
+ if (localFormat != null)
+ {
+ // Upper localFormat
actual = new char[localExpected.Length];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat.ToUpperInvariant(), localProvider));
Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected, new string(actual));
+ Assert.Equal(localExpected.ToUpperInvariant(), new string(actual));
- // Longer than needed
- actual = new char[localExpected.Length + 1];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ // Lower format
+ actual = new char[localExpected.Length];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat.ToLowerInvariant(), localProvider));
Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected, new string(actual, 0, charsWritten));
-
- // Too short
- if (localExpected.Length > 0)
- {
- actual = new char[localExpected.Length - 1];
- Assert.False(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(0, charsWritten);
- }
-
- if (localFormat != null)
- {
- // Upper localFormat
- actual = new char[localExpected.Length];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat.ToUpperInvariant(), localProvider));
- Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected.ToUpperInvariant(), new string(actual));
-
- // Lower format
- actual = new char[localExpected.Length];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat.ToLowerInvariant(), localProvider));
- Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected.ToLowerInvariant(), new string(actual));
- }
- }
- catch (Exception exc)
- {
- throw new Exception($"Failed on `{localI}`, `{localFormat}`, `{localProvider}`, `{localExpected}`. {exc}");
+ Assert.Equal(localExpected.ToLowerInvariant(), new string(actual));
}
}
+ catch (Exception exc)
+ {
+ throw new Exception($"Failed on `{localI}`, `{localFormat}`, `{localProvider}`, `{localExpected}`. {exc}");
+ }
}
- }).Dispose();
+ }
}
}
}
[Fact]
public static void Test_ToString_NotNetFramework()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (object[] testdata in ToString_TestData_NotNetFramework())
{
- foreach (object[] testdata in ToString_TestData_NotNetFramework())
- {
- ToString((double)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
- }
+ ToString((double)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
}
- }).Dispose();
+ }
}
private static void ToString(double d, string format, IFormatProvider provider, string expected)
[Fact]
public static void TryFormat()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in ToString_TestData_NotNetFramework())
{
- foreach (var testdata in ToString_TestData_NotNetFramework())
- {
- double localI = (double)testdata[0];
- string localFormat = (string)testdata[1];
- IFormatProvider localProvider = (IFormatProvider)testdata[2];
- string localExpected = (string)testdata[3];
+ double localI = (double)testdata[0];
+ string localFormat = (string)testdata[1];
+ IFormatProvider localProvider = (IFormatProvider)testdata[2];
+ string localExpected = (string)testdata[3];
- try
- {
- char[] actual;
- int charsWritten;
-
- // Just right
- actual = new char[localExpected.Length];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected, new string(actual));
-
- // Longer than needed
- actual = new char[localExpected.Length + 1];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected, new string(actual, 0, charsWritten));
-
- // Too short
- if (localExpected.Length > 0)
- {
- actual = new char[localExpected.Length - 1];
- Assert.False(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(0, charsWritten);
- }
- }
- catch (Exception exc)
+ try
+ {
+ char[] actual;
+ int charsWritten;
+
+ // Just right
+ actual = new char[localExpected.Length];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(localExpected.Length, charsWritten);
+ Assert.Equal(localExpected, new string(actual));
+
+ // Longer than needed
+ actual = new char[localExpected.Length + 1];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(localExpected.Length, charsWritten);
+ Assert.Equal(localExpected, new string(actual, 0, charsWritten));
+
+ // Too short
+ if (localExpected.Length > 0)
{
- throw new Exception($"Failed on `{localI}`, `{localFormat}`, `{localProvider}`, `{localExpected}`. {exc}");
+ actual = new char[localExpected.Length - 1];
+ Assert.False(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(0, charsWritten);
}
}
+ catch (Exception exc)
+ {
+ throw new Exception($"Failed on `{localI}`, `{localFormat}`, `{localProvider}`, `{localExpected}`. {exc}");
+ }
}
- }).Dispose();
+ }
}
public static IEnumerable<object[]> ToStringRoundtrip_TestData()
[Fact]
public static void Invariant_DutchCulture_FormatsDoubleBasedOnInvariantCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("nl"))
{
- using (new ThreadCultureChange("nl"))
- {
- double d = 123.456; // would be 123,456 in Dutch
- string expected = string.Format(CultureInfo.InvariantCulture, "Invariant culture is used {0}", d);
- string actual = FormattableString.Invariant($"Invariant culture is used {d}");
- Assert.Equal(expected, actual);
- }
- }).Dispose();
+ double d = 123.456; // would be 123,456 in Dutch
+ string expected = string.Format(CultureInfo.InvariantCulture, "Invariant culture is used {0}", d);
+ string actual = FormattableString.Invariant($"Invariant culture is used {d}");
+ Assert.Equal(expected, actual);
+ }
}
[Fact]
[Fact]
public static void IFormattableToString_UsesSuppliedFormatProvider()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("nl"))
{
- using (new ThreadCultureChange("nl"))
- {
- double d = 123.456; // would be 123,456 in Dutch
- string expected = string.Format(CultureInfo.InvariantCulture, "Invariant culture is used {0}", d);
- string actual = ((IFormattable)((FormattableString)$"Invariant culture is used {d}")).ToString(null, CultureInfo.InvariantCulture);
- Assert.Equal(expected, actual);
- }
- }).Dispose();
+ double d = 123.456; // would be 123,456 in Dutch
+ string expected = string.Format(CultureInfo.InvariantCulture, "Invariant culture is used {0}", d);
+ string actual = ((IFormattable)((FormattableString)$"Invariant culture is used {d}")).ToString(null, CultureInfo.InvariantCulture);
+ Assert.Equal(expected, actual);
+ }
}
}
[Fact]
public static void CurrentCulture_DutchCulture_FormatsDoubleBasedOnCurrentCulture()
{
- RemoteExecutorForUap.Invoke(() =>
+ var dutchCulture = new CultureInfo("nl");
+ using (new ThreadCultureChange(dutchCulture))
{
- var dutchCulture = new CultureInfo("nl");
- using (new ThreadCultureChange(dutchCulture))
- {
- double d = 123.456;
- string expected = string.Format(dutchCulture, "Dutch decimal separator is comma {0}", d);
- string actual = FormattableString.CurrentCulture($"Dutch decimal separator is comma {d}");
- Assert.Equal(expected, actual);
- }
- }).Dispose();
+ double d = 123.456;
+ string expected = string.Format(dutchCulture, "Dutch decimal separator is comma {0}", d);
+ string actual = FormattableString.CurrentCulture($"Dutch decimal separator is comma {d}");
+ Assert.Equal(expected, actual);
+ }
}
}
}
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Feature Corrupting Exceptions not present for Linux
- [ActiveIssue("https://github.com/dotnet/corefx/issues/21123", TargetFrameworkMonikers.Uap)]
public static void ProcessExit_Called()
{
// We expect the launched process to crash; don't let it write the resulting AV message to the console.
[Fact]
public static void Test_ToString_NotNetFramework()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (object[] testdata in ToString_TestData_NotNetFramework())
{
- foreach (object[] testdata in ToString_TestData_NotNetFramework())
- {
- ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
- }
+ ToString((float)testdata[0], (string)testdata[1], (IFormatProvider)testdata[2], (string)testdata[3]);
}
- }).Dispose();
+ }
}
private static void ToString(float f, string format, IFormatProvider provider, string expected)
[Fact]
public static void TryFormat()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (object[] testdata in ToString_TestData())
{
- foreach (object[] testdata in ToString_TestData())
- {
- float localI = (float)testdata[0];
- string localFormat = (string)testdata[1];
- IFormatProvider localProvider = (IFormatProvider)testdata[2];
- string localExpected = (string)testdata[3];
+ float localI = (float)testdata[0];
+ string localFormat = (string)testdata[1];
+ IFormatProvider localProvider = (IFormatProvider)testdata[2];
+ string localExpected = (string)testdata[3];
- try
- {
- char[] actual;
- int charsWritten;
-
- // Just right
- actual = new char[localExpected.Length];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected, new string(actual));
-
- // Longer than needed
- actual = new char[localExpected.Length + 1];
- Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(localExpected.Length, charsWritten);
- Assert.Equal(localExpected, new string(actual, 0, charsWritten));
-
- // Too short
- if (localExpected.Length > 0)
- {
- actual = new char[localExpected.Length - 1];
- Assert.False(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
- Assert.Equal(0, charsWritten);
- }
- }
- catch (Exception exc)
+ try
+ {
+ char[] actual;
+ int charsWritten;
+
+ // Just right
+ actual = new char[localExpected.Length];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(localExpected.Length, charsWritten);
+ Assert.Equal(localExpected, new string(actual));
+
+ // Longer than needed
+ actual = new char[localExpected.Length + 1];
+ Assert.True(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(localExpected.Length, charsWritten);
+ Assert.Equal(localExpected, new string(actual, 0, charsWritten));
+
+ // Too short
+ if (localExpected.Length > 0)
{
- throw new Exception($"Failed on `{localI}`, `{localFormat}`, `{localProvider}`, `{localExpected}`. {exc}");
+ actual = new char[localExpected.Length - 1];
+ Assert.False(localI.TryFormat(actual.AsSpan(), out charsWritten, localFormat, localProvider));
+ Assert.Equal(0, charsWritten);
}
}
+ catch (Exception exc)
+ {
+ throw new Exception($"Failed on `{localI}`, `{localFormat}`, `{localProvider}`, `{localExpected}`. {exc}");
+ }
}
- }).Dispose();
+ }
}
public static IEnumerable<object[]> ToStringRoundtrip_TestData()
[Fact]
public static void Contains_StringComparison_TurkishI()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- const string Source = "\u0069\u0130";
+ const string Source = "\u0069\u0130";
- using (new ThreadCultureChange("tr-TR"))
- {
- Assert.True(Source.Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
- Assert.True(Source.AsSpan().Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
- }
+ using (new ThreadCultureChange("tr-TR"))
+ {
+ Assert.True(Source.Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
+ Assert.True(Source.AsSpan().Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
+ }
- using (new ThreadCultureChange("en-US"))
- {
- Assert.False(Source.Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
- Assert.False(Source.AsSpan().Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ using (new ThreadCultureChange("en-US"))
+ {
+ Assert.False(Source.Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
+ Assert.False(Source.AsSpan().Contains("\u0069\u0069", StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
[Fact]
public void Replace_StringComparison_TurkishI()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- const string Source = "\u0069\u0130";
+ const string Source = "\u0069\u0130";
- using (new ThreadCultureChange("tr-TR"))
- {
- Assert.True("\u0069".Equals("\u0130", StringComparison.CurrentCultureIgnoreCase));
+ using (new ThreadCultureChange("tr-TR"))
+ {
+ Assert.True("\u0069".Equals("\u0130", StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal("a\u0130", Source.Replace("\u0069", "a", StringComparison.CurrentCulture));
- Assert.Equal("aa", Source.Replace("\u0069", "a", StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal("\u0069a", Source.Replace("\u0130", "a", StringComparison.CurrentCulture));
- Assert.Equal("aa", Source.Replace("\u0130", "a", StringComparison.CurrentCultureIgnoreCase));
- }
+ Assert.Equal("a\u0130", Source.Replace("\u0069", "a", StringComparison.CurrentCulture));
+ Assert.Equal("aa", Source.Replace("\u0069", "a", StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal("\u0069a", Source.Replace("\u0130", "a", StringComparison.CurrentCulture));
+ Assert.Equal("aa", Source.Replace("\u0130", "a", StringComparison.CurrentCultureIgnoreCase));
+ }
- using (new ThreadCultureChange("en-US"))
- {
- Assert.False("\u0069".Equals("\u0130", StringComparison.CurrentCultureIgnoreCase));
+ using (new ThreadCultureChange("en-US"))
+ {
+ Assert.False("\u0069".Equals("\u0130", StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal("a\u0130", Source.Replace("\u0069", "a", StringComparison.CurrentCulture));
- Assert.Equal("a\u0130", Source.Replace("\u0069", "a", StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal("\u0069a", Source.Replace("\u0130", "a", StringComparison.CurrentCulture));
- Assert.Equal("\u0069a", Source.Replace("\u0130", "a", StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ Assert.Equal("a\u0130", Source.Replace("\u0069", "a", StringComparison.CurrentCulture));
+ Assert.Equal("a\u0130", Source.Replace("\u0069", "a", StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal("\u0069a", Source.Replace("\u0130", "a", StringComparison.CurrentCulture));
+ Assert.Equal("\u0069a", Source.Replace("\u0130", "a", StringComparison.CurrentCultureIgnoreCase));
+ }
}
public static IEnumerable<object[]> Replace_StringComparisonCulture_TestData()
[Fact]
public static void IndexOf_TurkishI_TurkishCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("tr-TR"))
{
- using (new ThreadCultureChange("tr-TR"))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- char value = '\u0130';
- Assert.Equal(19, s.IndexOf(value));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(19, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- ReadOnlySpan<char> span = s.AsSpan();
- Assert.Equal(19, span.IndexOf(new char[] { value }, StringComparison.CurrentCulture));
- Assert.Equal(4, span.IndexOf(new char[] { value }, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(19, span.IndexOf(new char[] { value }, StringComparison.Ordinal));
- Assert.Equal(19, span.IndexOf(new char[] { value }, StringComparison.OrdinalIgnoreCase));
-
- value = '\u0131';
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
-
- Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.CurrentCulture));
- Assert.Equal(8, span.IndexOf(new char[] { value }, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.Ordinal));
- Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ char value = '\u0130';
+ Assert.Equal(19, s.IndexOf(value));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(4, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ ReadOnlySpan<char> span = s.AsSpan();
+ Assert.Equal(19, span.IndexOf(new char[] { value }, StringComparison.CurrentCulture));
+ Assert.Equal(4, span.IndexOf(new char[] { value }, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, span.IndexOf(new char[] { value }, StringComparison.Ordinal));
+ Assert.Equal(19, span.IndexOf(new char[] { value }, StringComparison.OrdinalIgnoreCase));
+
+ value = '\u0131';
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+
+ Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.CurrentCulture));
+ Assert.Equal(8, span.IndexOf(new char[] { value }, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.Ordinal));
+ Assert.Equal(10, span.IndexOf(new char[] { value }, StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_TurkishI_InvariantCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- char value = '\u0130';
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ char value = '\u0130';
- Assert.Equal(19, s.IndexOf(value));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, s.IndexOf(value));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- value = '\u0131';
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ value = '\u0131';
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_TurkishI_EnglishUSCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- string s = "Turkish I \u0131s TROUBL\u0130NG!";
- char value = '\u0130';
+ string s = "Turkish I \u0131s TROUBL\u0130NG!";
+ char value = '\u0130';
- Assert.Equal(19, s.IndexOf(value));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(19, s.IndexOf(value));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(19, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- value = '\u0131';
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ value = '\u0131';
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_EquivalentDiacritics_EnglishUSCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s = "Exhibit a\u0300\u00C0";
- char value = '\u00C0';
+ string s = "Exhibit a\u0300\u00C0";
+ char value = '\u00C0';
- using (new ThreadCultureChange("en-US"))
- {
- Assert.Equal(10, s.IndexOf(value));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ using (new ThreadCultureChange("en-US"))
+ {
+ Assert.Equal(10, s.IndexOf(value));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_EquivalentDiacritics_InvariantCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s = "Exhibit a\u0300\u00C0";
- char value = '\u00C0';
+ string s = "Exhibit a\u0300\u00C0";
+ char value = '\u00C0';
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- Assert.Equal(10, s.IndexOf(value));
- Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ {
+ Assert.Equal(10, s.IndexOf(value));
+ Assert.Equal(10, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(8, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_CyrillicE_EnglishUSCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s = "Foo\u0400Bar";
- char value = '\u0400';
+ string s = "Foo\u0400Bar";
+ char value = '\u0400';
- using (new ThreadCultureChange("en-US"))
- {
- Assert.Equal(3, s.IndexOf(value));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- Assert.Equal(3, s.IndexOf(value, StringComparison.Ordinal));
- Assert.Equal(3, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
- }
- }).Dispose();
+ using (new ThreadCultureChange("en-US"))
+ {
+ Assert.Equal(3, s.IndexOf(value));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.Ordinal));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.OrdinalIgnoreCase));
+ }
}
[Fact]
public static void IndexOf_CyrillicE_InvariantCulture_Char()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- string s = "Foo\u0400Bar";
- char value = '\u0400';
+ string s = "Foo\u0400Bar";
+ char value = '\u0400';
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- Assert.Equal(3, s.IndexOf(value));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
- Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
- }
- }).Dispose();
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ {
+ Assert.Equal(3, s.IndexOf(value));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCulture));
+ Assert.Equal(3, s.IndexOf(value, StringComparison.CurrentCultureIgnoreCase));
+ }
}
[Fact]
[Fact]
public static void Test_Append_Decimal()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in Append_Decimal_TestData())
{
- foreach (var testdata in Append_Decimal_TestData())
- {
- Append_Decimal((string)testdata[0], (double)testdata[1], (string)testdata[2]);
- }
+ Append_Decimal((string)testdata[0], (double)testdata[1], (string)testdata[2]);
}
- }).Dispose();
+ }
}
private static void Append_Decimal(string original, double doubleValue, string expected)
[Fact]
public static void Test_Append_Double()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in Append_Double_TestData())
{
- foreach (var testdata in Append_Double_TestData())
- {
- Append_Double((string)testdata[0], (double)testdata[1], (string)testdata[2]);
- }
+ Append_Double((string)testdata[0], (double)testdata[1], (string)testdata[2]);
}
- }).Dispose();
+ }
}
private static void Append_Double(string original, double value, string expected)
[Fact]
public static void Test_Append_Float()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in Append_Float_TestData())
{
- foreach (var testdata in Append_Float_TestData())
- {
- Append_Float((string)testdata[0], (float)testdata[1], (string)testdata[2]);
- }
+ Append_Float((string)testdata[0], (float)testdata[1], (string)testdata[2]);
}
- }).Dispose();
+ }
}
private static void Append_Float(string original, float value, string expected)
[Fact]
public static void Test_Insert_Float()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in Insert_Float_TestData())
{
- foreach (var testdata in Insert_Float_TestData())
- {
- Insert_Float((string)testdata[0], (int)testdata[1], (float)testdata[2], (string)testdata[3]);
- }
+ Insert_Float((string)testdata[0], (int)testdata[1], (float)testdata[2], (string)testdata[3]);
}
- }).Dispose();
+ }
}
private static void Insert_Float(string original, int index, float value, string expected)
[Fact]
public static void Test_Insert_Double()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in Insert_Double_TestData())
{
- foreach (var testdata in Insert_Double_TestData())
- {
- Insert_Double((string)testdata[0], (int)testdata[1], (double)testdata[2], (string)testdata[3]);
- }
+ Insert_Double((string)testdata[0], (int)testdata[1], (double)testdata[2], (string)testdata[3]);
}
- }).Dispose();
+ }
}
private static void Insert_Double(string original, int index, double value, string expected)
[Fact]
public static void Test_Insert_Decimal()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (var testdata in Test_Insert_Decimal_TestData())
{
- foreach (var testdata in Test_Insert_Decimal_TestData())
- {
- Insert_Decimal((string)testdata[0], (int)testdata[1], (double)testdata[2], (string)testdata[3]);
- }
+ Insert_Decimal((string)testdata[0], (int)testdata[1], (double)testdata[2], (string)testdata[3]);
}
- }).Dispose();
+ }
}
private static void Insert_Decimal(string original, int index, double doubleValue, string expected)
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
netfx;
</BuildConfigurations>
</PropertyGroup>
<!-- Must match version supported by frameworks which support 4.1.* inbox.
Can be removed when API is added and this assembly is versioned to 4.2.* -->
<AssemblyVersion Condition="'$(TargetsNetFx)' != 'true'">4.1.1.0</AssemblyVersion>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.AccessControl.cs" />
<Reference Include="mscorlib" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetFx)' != 'true'">
- <SuppressPackageTargetFrameworkCompatibility Include="$(UAPvNextTFM)" />
<ProjectReference Include="..\..\System.Security.Principal.Windows\ref\System.Security.Principal.Windows.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj" />
</ItemGroup>
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp-Windows_NT;
- uap-Windows_NT;
netfx-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)'=='true'">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard'">SR.PlatformNotSupported_AccessControl</GeneratePlatformNotSupportedAssemblyMessage>
- <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetFx)'=='true'">
<Reference Include="mscorlib" />
</ItemGroup>
- <ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp')) OR '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System\Security\AccessControl\ACE.cs" />
<Compile Include="System\Security\AccessControl\ACL.cs" />
<Compile Include="System\Security\AccessControl\CommonObjectSecurity.cs" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Security.Principal.Windows" />
</ItemGroup>
- <ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp')) == 'true' OR '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Reference Include="System.Collections" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Runtime.Extensions" />
[Theory]
[MemberData(nameof(AccessRule_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "FileSystemAccessRule is not supported on UAP")]
public void AccessRule_Constructor(string sid, int accessMask, bool isInherited, int inheritanceFlags, int propagationFlags, int accessControlType)
{
IdentityReference identityReference = new SecurityIdentifier(sid);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "FileSystemAccessRule is not supported on UAP")]
public override void AccessRule_Constructor_Invalid()
{
AssertExtensions.Throws<ArgumentNullException>("identity", () => Constructor(null, 1, true, (InheritanceFlags)1, (PropagationFlags)1, (AccessControlType)0));
[Theory]
[MemberData(nameof(AuditRule_TestData))]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "FileSystemAuditRule is not supported on UAP")]
public void AuditRule_Constructor(string sid, int accessMask, bool isInherited, int inheritanceFlags, int propagationFlags, int AuditFlags)
{
IdentityReference identityReference = new SecurityIdentifier(sid);
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "FileSystemAuditRule is not supported on UAP")]
public override void AuditRule_Constructor_Invalid()
{
AssertExtensions.Throws<ArgumentNullException>("identity", () => Constructor(null, 1, true, (InheritanceFlags)1, (PropagationFlags)1, (AuditFlags)0));
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UnsupportedPlatforms>Linux;NetBSD;OSX</UnsupportedPlatforms>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Ace\Ace.Common.Tests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Claims.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>System.Security.Claims</AssemblyName>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ClaimsIdentityTests.cs" />
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.Algorithms.cs" />
netcoreapp-Unix;
netcoreapp-OSX;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);INTERNAL_ASYMMETRIC_IMPLEMENTATIONS</DefineConstants>
<NoWarn>CS1573;CS3016;CA5350;CA5351;CA5379;CA5384;CA5385;$(NoWarn)</NoWarn>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1\AsnXml.targets"/>
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\PositionValueStream.cs">
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
$(PackageConfigurations)
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<DefineConstants Condition="'$(TargetGroup)' != 'net461' AND '$(TargetGroup)' != 'net462'">$(DefineConstants);FEATURE_ECPARAMETERS</DefineConstants>
<!-- FEATURE_DSA_HASHDATA is technically also available on net462+, but it doesn't require being enabled since it is a facade -->
- <DefineConstants Condition="'$(TargetGroup)' == 'uap' Or '$(TargetsNetCoreApp)' == 'true' OR '$(TargetsNetStandard)' == 'true'">$(DefineConstants);FEATURE_DSA_HASHDATA</DefineConstants>
+ <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsNetStandard)' == 'true'">$(DefineConstants);FEATURE_DSA_HASHDATA</DefineConstants>
<!-- FEATURE_ECDH_DERIVEFROM is technically also available on net462+, but it doesn't require being enabled since it is a facade -->
- <DefineConstants Condition="'$(TargetGroup)' == 'uap' Or '$(TargetsNetCoreApp)' == 'true' OR '$(TargetsNetStandard)' == 'true'">$(DefineConstants);FEATURE_ECDH_DERIVEFROM</DefineConstants>
+ <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsNetStandard)' == 'true'">$(DefineConstants);FEATURE_ECDH_DERIVEFROM</DefineConstants>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
- <Configurations>net461-Debug;net461-Release;net462-Debug;net462-Release;net47-Debug;net47-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard2.1-Debug;netstandard2.1-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;net462-Debug;net462-Release;net47-Debug;net47-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.Cng.cs" />
<Reference Include="mscorlib" />
<Reference Include="System.Core" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' Or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
<ProjectReference Include="..\..\System.Runtime.Handles\ref\System.Runtime.Handles.csproj" />
netcoreapp-Windows_NT;
netcoreapp;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(IsPartialFacadeAssembly)' == 'true'">true</OmitResources>
<GenFacadesIgnoreMissingTypes Condition="'$(TargetGroup)' == 'net461'">true</GenFacadesIgnoreMissingTypes>
- <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;net462-Windows_NT-Debug;net462-Windows_NT-Release;net47-Windows_NT-Debug;net47-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;net462-Windows_NT-Debug;net462-Windows_NT-Release;net47-Windows_NT-Debug;net47-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetsWindows)' != 'true'">
<GeneratePlatformNotSupportedAssemblyMessage>SR.PlatformNotSupported_CryptographyCng</GeneratePlatformNotSupportedAssemblyMessage>
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DefineConstants>$(DefineConstants);TESTING_CNG_IMPLEMENTATION</DefineConstants>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CreateTests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.Csp.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CA5373</NoWarn>
<NoWarn Condition="'$(TargetsUnix)' == 'true'">$(NoWarn);CS0809</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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Security\Cryptography\AesCryptoServiceProvider.cs" />
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CreateTransformCompat.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.Encoding.cs" />
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<AssemblyName>System.Security.Cryptography.Encoding</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <DefineConstants Condition="'$(TargetGroup)'=='netcoreapp'">$(DefineConstants);netcoreapp</DefineConstants>
- <DefineConstants Condition="'$(TargetGroup)'=='uap'">$(DefineConstants);uap</DefineConstants>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1\AsnXml.targets" Condition=" '$(TargetsOSX)' == 'true' " />
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" Condition=" '$(TargetsOSX)' == 'true' " />
<BuildConfigurations>
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" />
<ItemGroup>
$(PackageConfigurations)
netfx;
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard2.1-Debug;netstandard2.1-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.Pkcs.cs" />
- <Compile Include="System.Security.Cryptography.Pkcs.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true' OR '$(TargetGroup)' == 'uap' OR '$(TargetsNetStandard)' == 'true'" />
+ <Compile Include="System.Security.Cryptography.Pkcs.netcoreapp.cs" Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsNetStandard)' == 'true'" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Security" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' OR '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Security.Cryptography.Algorithms\ref\System.Security.Cryptography.Algorithms.csproj" />
<ProjectReference Include="..\..\System.Security.Cryptography.Csp\ref\System.Security.Cryptography.Csp.csproj" />
netcoreapp-Windows_NT;
netcoreapp;
netfx-Windows_NT;
- <!-- uap; -->
</BuildConfigurations>
</PropertyGroup>
</Project>
[ConditionalFact(nameof(SupportsRc4))]
[OuterLoop(/* Leaks key on disk if interrupted */)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RC4 isn't available via CNG, and CNG is the only library available to UWP")]
public static void Rc4AndCngWrappersDontMixTest()
{
//
[Theory]
[InlineData(SubjectIdentifierType.IssuerAndSerialNumber, false)]
[InlineData(SubjectIdentifierType.IssuerAndSerialNumber, true)]
- [ActiveIssue(31977, TargetFrameworkMonikers.Uap)]
public static void AddFirstSigner_DSA(SubjectIdentifierType identifierType, bool detached)
{
ContentInfo contentInfo = new ContentInfo(new byte[] { 9, 8, 7, 6, 5 });
[Theory]
[InlineData(false)]
[InlineData(true)]
- [ActiveIssue(31977, TargetFrameworkMonikers.Uap)]
public static void EnsureExtraCertsAdded(bool newDocument)
{
SignedCms cms;
[InlineData(0)]
[InlineData(1)]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "NetFx bug")]
- [ActiveIssue(31977, TargetFrameworkMonikers.Uap)]
public static void RemoveCounterSignature_EncodedInSingleAttribute(int indexToRemove)
{
SignedCms cms = new SignedCms();
}
[Fact]
- [ActiveIssue(31977, TargetFrameworkMonikers.Uap)]
public static void AddCounterSigner_DSA()
{
SignedCms cms = new SignedCms();
}
[Fact]
- [ActiveIssue(31977, TargetFrameworkMonikers.Uap)]
public static void EnsureExtraCertsAdded()
{
SignedCms cms = new SignedCms();
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <!--
- UAP fails when loading the src assembly:
- Could not load file or assembly 'System.Security.Cryptography.Pkcs, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
- The located assembly's manifest definition does not match the assembly reference. (0x80131040)
- -->
<Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.Primitives.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<AssemblyName>System.Security.Cryptography.Primitives</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Security\Cryptography\AsymmetricAlgorithm.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(CommonTestPath)\Tests.props" />
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)\System\IO\PositionValueStream.cs">
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ProtectedDataTests.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Cryptography.X509Certificates.cs" />
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<AssemblyName>System.Security.Cryptography.X509Certificates</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);CS3016;CA5379;CA5384;CA5385</NoWarn>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1\AsnXml.targets" />
<Import Project="$(CommonPath)\System\Security\Cryptography\Asn1Reader\System.Security.Cryptography.Asn1Reader.Shared.projitems" />
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "Arrays with non-zero lower bounds are not supported.")]
public static void X509ExtensionCollection_CopyTo_NonZeroLowerBound_ThrowsIndexOutOfRangeException()
{
using (X509Certificate2 cert = new X509Certificate2(TestData.PfxData, TestData.PfxDataPassword, Cert.EphemeralIfPossible))
netcoreapp-OSX;
netcoreapp-Unix;
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <HaveDSA Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">true</HaveDSA>
- <HaveCertificateCreation Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">true</HaveCertificateCreation>
- <DefineConstants Condition="'$(TargetsNetCoreApp)' != 'true' and '$(TargetsUap)' != 'true'">$(DefineConstants);NO_DSA_AVAILABLE</DefineConstants>
- <DefineConstants Condition="'$(HaveCertificateCreation)' != 'true'">$(DefineConstants);NO_EPHEMERALKEYSET_AVAILABLE</DefineConstants>
- <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetsUap)' == 'true'">$(DefineConstants);HAVE_THUMBPRINT_OVERLOADS</DefineConstants>
+ <DefineConstants>$(DefineConstants);HAVE_THUMBPRINT_OVERLOADS</DefineConstants>
<DefineConstants Condition="'$(TargetsUnix)' == 'true'">$(DefineConstants);Unix</DefineConstants>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Cert.cs" />
<Link>CommonTest\System\Security\Cryptography\ByteUtils.cs</Link>
</Compile>
<Compile Include="ImportTests.cs" />
- </ItemGroup>
- <ItemGroup Condition="'$(HaveCertificateCreation)'=='true'">
<Compile Include="CertificateCreation\CertificateRequestApiTests.cs" />
<Compile Include="CertificateCreation\CertificateRequestChainTests.cs" />
<Compile Include="CertificateCreation\CertificateRequestUsageTests.cs" />
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#if NETCOREAPP || uap
+#if NETCOREAPP
#define HAVE_STORE_ISOPEN
#endif
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>System.Security.Cryptography.Xml.Tests</RootNamespace>
netstandard;
net461;
netcoreapp3.0;
- uap;
</PackageConfigurations>
<BuildConfigurations>
$(PackageConfigurations);
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityPermissionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityPermissionFlag))]
-#if NETCOREAPP || uap
+#if NETCOREAPP
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.IStackWalk))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.PermissionSet))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.PermissionState))]
void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level);
System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level);
}
-#if !NETCOREAPP && !uap
+#if !NETCOREAPP
public partial interface IStackWalk
{
void Assert();
public override int GetHashCode() { throw null; }
public override System.Security.SecurityElement ToXml() { throw null; }
}
-#if !NETCOREAPP && !uap
+#if !NETCOREAPP
public partial class PermissionSet : System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Security.ISecurityEncodable, System.Security.IStackWalk
{
public PermissionSet(System.Security.Permissions.PermissionState state) { }
public override System.Security.IPermission CreatePermission() { throw null; }
public System.Security.PermissionSet CreatePermissionSet() { throw null; }
}
-#if !NETCOREAPP && !uap
+#if !NETCOREAPP
public enum PermissionState
{
None = 0,
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Permissions.cs" />
<Compile Include="System.Security.Permissions.Forwards.cs" />
- <SuppressPackageTargetFrameworkCompatibility Include="$(UAPvNextTFM)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Compile Include="System.Security.Permissions.netcoreapp.cs" />
<ItemGroup Condition="'$(TargetsNetFx)' != 'true'">
<ProjectReference Include="..\..\System.Security.AccessControl\ref\System.Security.AccessControl.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<ProjectReference Include="..\..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj" />
<ProjectReference Include="..\..\System.ComponentModel.Primitives\ref\System.ComponentModel.Primitives.csproj" />
<ProjectReference Include="..\..\System.Data.Common\ref\System.Data.Common.csproj" />
<PropertyGroup>
<PackageConfigurations>
netcoreapp3.0;
- uap;
netstandard;
net461;
</PackageConfigurations>
<RootNamespace>System.Security.Permissions</RootNamespace>
<AssemblyName>System.Security.Permissions</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsNetFx)' != 'true'">
<Compile Include="System\ApplicationIdentity.cs" />
<ItemGroup>
<Reference Include="System.Security.AccessControl" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<Reference Include="System.Collections" />
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.ComponentModel.Primitives" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ApplicationTrustTests.cs" />
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
<IsNETCoreAppRef>false</IsNETCoreAppRef>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
$(PackageConfigurations);
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- Must match version supported by frameworks which support 4.1.* inbox.
Can be removed when API is added and this assembly is versioned to 4.2.* -->
<AssemblyVersion Condition="'$(TargetsNetFx)' != 'true'">4.1.1.0</AssemblyVersion>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
- <SuppressPackageTargetFrameworkCompatibility Include="$(UAPvNextTFM)" />
<Compile Include="System.Security.Principal.Windows.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Reference Include="mscorlib" />
<Reference Include="System" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
+ <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Security.Claims\ref\System.Security.Claims.csproj" />
<ProjectReference Include="..\..\System.Security.Principal\ref\System.Security.Principal.csproj" />
$(PackageConfigurations)
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
netfx-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(TargetsNetFx)' == 'true'">true</OmitResources>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_Principal</GeneratePlatformNotSupportedAssemblyMessage>
- <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Unix-Debug;netcoreapp2.0-Unix-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Unix-Debug;netcoreapp2.0-Unix-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
- <ItemGroup Condition="($(TargetGroup.StartsWith('netcoreapp')) or '$(TargetGroup)' == 'uap') AND '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsWindows)' == 'true'">
<Compile Include="Microsoft\Win32\SafeHandles\SafeAccessTokenHandle.cs" />
<Compile Include="System\Security\Principal\IdentityNotMappedException.cs" />
<Compile Include="System\Security\Principal\IdentityReference.cs" />
<Link>Common\Microsoft\Win32\SafeHandles\SafeLsaReturnBufferHandle.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp')) AND '$(TargetsWindows)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsWindows)' == 'true'">
<Compile Include="$(CommonPath)\Interop\Windows\Advapi32\Interop.CheckTokenMembership.cs">
<Link>Common\Interop\Interop.CheckTokenMembership.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'uap' AND '$(TargetsWindows)' == 'true'">
- <Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.CheckTokenMembershipEx.cs">
- <Link>Common\Interop\Interop.CheckTokenMembershipEx.cs</Link>
- </Compile>
- </ItemGroup>
<ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
<Reference Include="mscorlib" />
</ItemGroup>
// CheckTokenMembership will check if the SID is both present and enabled in the access token.
-#if uap
- if (!Interop.Kernel32.CheckTokenMembershipEx((til != TokenImpersonationLevel.None ? _safeTokenHandle : token),
- sid.BinaryForm,
- Interop.Kernel32.CTMF_INCLUDE_APPCONTAINER,
- ref isMember))
- throw new SecurityException(new Win32Exception().Message);
-#else
if (!Interop.Advapi32.CheckTokenMembership((til != TokenImpersonationLevel.None ? _safeTokenHandle : token),
sid.BinaryForm,
ref isMember))
throw new SecurityException(new Win32Exception().Message);
-#endif
}
bool isMember = false;
// CheckTokenMembership will check if the SID is both present and enabled in the access token.
-#if uap
- if (!Interop.Kernel32.CheckTokenMembershipEx((_identity.ImpersonationLevel != TokenImpersonationLevel.None ? _identity.AccessToken : token),
- sid.BinaryForm,
- Interop.Kernel32.CTMF_INCLUDE_APPCONTAINER,
- ref isMember))
- throw new SecurityException(new Win32Exception().Message);
-#else
if (!Interop.Advapi32.CheckTokenMembership((_identity.ImpersonationLevel != TokenImpersonationLevel.None ? _identity.AccessToken : token),
sid.BinaryForm,
ref isMember))
throw new SecurityException(new Win32Exception().Message);
-#endif
token.Dispose();
return isMember;
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="NTAccount.cs" />
}
[Fact]
- [ActiveIssue(31911, TargetFrameworkMonikers.Uap)]
public static void CloneAndProperties()
{
TestUsingAccessToken((logonToken) =>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.SecureString.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<RootNamespace>System.Security.SecureString</RootNamespace>
<AssemblyName>System.Security.SecureString</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BasicScenarioTests.cs" />
<IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
<OmitResources Condition="'$(TargetsNetFx)' == 'true'">true</OmitResources>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' != 'true'">SR.PlatformNotSupported_ServiceController</GeneratePlatformNotSupportedAssemblyMessage>
- <!-- Although we have a netstandard configuration, we know we are not currently UAP compatible-->
- <UWPCompatible>false</UWPCompatible>
<Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp')) OR ('$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' == 'true')">
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- copy the Windows-specific implementation to net461 folder so that restore without a RID works -->
<PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard' AND '$(TargetsWindows)' == 'true'">netstandard2.0;net461</PackageTargetFramework>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.0-Windows_NT-Debug;netcoreapp2.0-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Microsoft\Win32\SafeHandles\SafeAllocHHandle.cs" />
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="EncoderFallbackBufferHelper.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Text.Encoding.Extensions</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Text.Encoding.Forwards.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Text.Encoding</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
public void GetEncoding_EncodingName()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
+ foreach (CodePageMapping map in s_mapping)
{
- foreach (CodePageMapping map in s_mapping)
- {
- Encoding encoding = Encoding.GetEncoding(map.Name);
+ Encoding encoding = Encoding.GetEncoding(map.Name);
- string name = encoding.EncodingName;
+ string name = encoding.EncodingName;
- Assert.NotNull(name);
- Assert.NotEqual(string.Empty, name);
+ Assert.NotNull(name);
+ Assert.NotEqual(string.Empty, name);
- Assert.All(name, ch => Assert.InRange(ch, 0, 127));
- }
+ Assert.All(name, ch => Assert.InRange(ch, 0, 127));
}
- }).Dispose();
+ }
}
[Fact]
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="ASCIIEncoding\ASCIIEncodingEncode.cs" />
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
$(PackageConfigurations);
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release</Configurations>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Text.Encodings.Web.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' OR '$(TargetsUap)' == 'true'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Memory\ref\System.Memory.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.Extensions\ref\System.Runtime.Extensions.csproj" />
<BuildConfigurations>
netstandard2.1;
netstandard;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<RootNamespace>System.Text.Encodings.Web</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netstandard-Debug;netstandard-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Text\Encodings\Web\HexUtil.cs" />
<Reference Include="System.Memory" />
<Reference Include="System.Resources.ResourceManager" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' OR '$(TargetsUap)' == 'true'">
- <Reference Include="System.Diagnostics.Debug" />
- <Reference Include="System.Runtime" />
- <Reference Include="System.Runtime.Extensions" />
- <Reference Include="System.Threading" />
- </ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp;
netfx;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<BuildConfigurations>
netstandard;
netcoreapp;
- uap;
netfx;
</BuildConfigurations>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Text.Json.cs" />
<PackageConfigurations>
netstandard;
netcoreapp3.0;
- uap-Windows_NT;
net461;
</PackageConfigurations>
<BuildConfigurations>
<AssemblyName>System.Text.Json</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
- <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>net461-Debug;net461-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netfx-Debug;netfx-Release;netstandard-Debug;netstandard-Release</Configurations>
<!-- For the inbox library (that is shipping with the product), this should always be true. -->
<!-- BUILDING_INBOX_LIBRARY is only false when building the netstandard compatible NuGet package. -->
<DefineConstants Condition="'$(TargetsNETStandard)' != 'true' AND '$(TargetsNetFx)' != 'true'">$(DefineConstants);BUILDING_INBOX_LIBRARY</DefineConstants>
<BuildConfigurations>
netcoreapp;
netfx;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
<DefineConstants Condition="'$(TargetGroup)'!='netfx'">$(DefineConstants);BUILDING_INBOX_LIBRARY</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Text.RegularExpressions.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);FEATURE_COMPILED</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);FEATURE_COMPILEAPIS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Collections\Generic\ValueListBuilder.Pop.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
[Fact]
public void GroupsEnUS()
{
- RemoteExecutorForUap.Invoke(() => {
- using (new ThreadCultureChange(s_enUSCulture))
+ using (new ThreadCultureChange(s_enUSCulture))
+ {
+ foreach (object[] testCase in Groups_CustomCulture_TestData_enUS())
{
- foreach (object[] testCase in Groups_CustomCulture_TestData_enUS())
- {
- GroupsTest(testCase);
- }
+ GroupsTest(testCase);
}
- }).Dispose();
+ }
}
[Fact]
public void GroupsCzech()
{
- RemoteExecutorForUap.Invoke(() => {
- using (new ThreadCultureChange(s_czechCulture))
+ using (new ThreadCultureChange(s_czechCulture))
+ {
+ foreach (object[] testCase in Groups_CustomCulture_TestData_Czech())
{
- foreach (object[] testCase in Groups_CustomCulture_TestData_Czech())
- {
- GroupsTest(testCase);
- }
+ GroupsTest(testCase);
}
- }).Dispose();
+ }
}
[Fact]
public void GroupsDanish()
{
- RemoteExecutorForUap.Invoke(() => {
- using (new ThreadCultureChange(s_danishCulture))
+ using (new ThreadCultureChange(s_danishCulture))
+ {
+ foreach (object[] testCase in Groups_CustomCulture_TestData_Danish())
{
- foreach (object[] testCase in Groups_CustomCulture_TestData_Danish())
- {
- GroupsTest(testCase);
- }
+ GroupsTest(testCase);
}
- }).Dispose();
+ }
}
[Fact]
public void GroupsTurkish()
{
- RemoteExecutorForUap.Invoke(() => {
- using (new ThreadCultureChange(s_turkishCulture))
+ using (new ThreadCultureChange(s_turkishCulture))
+ {
+ foreach (object[] testCase in Groups_CustomCulture_TestData_Turkish())
{
- foreach (object[] testCase in Groups_CustomCulture_TestData_Turkish())
- {
- GroupsTest(testCase);
- }
+ GroupsTest(testCase);
}
- }).Dispose();
+ }
}
[Fact]
public void GroupsAzeriLatin()
{
- RemoteExecutorForUap.Invoke(() => {
- using (new ThreadCultureChange(s_azeriLatinCulture))
+ using (new ThreadCultureChange(s_azeriLatinCulture))
+ {
+ foreach (object[] testCase in Groups_CustomCulture_TestData_AzeriLatin())
{
- foreach (object[] testCase in Groups_CustomCulture_TestData_AzeriLatin())
- {
- GroupsTest(testCase);
- }
+ GroupsTest(testCase);
}
- }).Dispose();
+ }
}
[Fact]
public void GroupsBasic()
{
- RemoteExecutorForUap.Invoke(() => {
- using (new ThreadCultureChange(GetDefaultCultureForTests()))
+ using (new ThreadCultureChange(GetDefaultCultureForTests()))
+ {
+ foreach (object[] testCase in Groups_Basic_TestData())
{
- foreach (object[] testCase in Groups_Basic_TestData())
- {
- GroupsTest(testCase);
- }
+ GroupsTest(testCase);
}
- }).Dispose();
+ }
}
[Fact]
[Fact]
public void Match_SpecialUnicodeCharacters_enUS()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange("en-US"))
{
- using (new ThreadCultureChange("en-US"))
- {
- Match("\u0131", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
- Match("\u0131", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
- }
- }).Dispose();
+ Match("\u0131", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
+ Match("\u0131", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
+ }
}
[Fact]
public void Match_SpecialUnicodeCharacters_Invariant()
{
- RemoteExecutorForUap.Invoke(() =>
+ using (new ThreadCultureChange(CultureInfo.InvariantCulture))
{
- using (new ThreadCultureChange(CultureInfo.InvariantCulture))
- {
- Match("\u0131", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
- Match("\u0131", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
- Match("\u0130", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
- Match("\u0130", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
- }
- }).Dispose();
+ Match("\u0131", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
+ Match("\u0131", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
+ Match("\u0130", "\u0049", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
+ Match("\u0130", "\u0069", RegexOptions.IgnoreCase, 0, 1, false, string.Empty);
+ }
}
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArmProcess))] // times out on ARM
/// <returns></returns>
public static IEnumerable<object[]> TransformRegexOptions(string testDataMethodName, int regexOptionsArrayIndex)
{
- // On UWP the compiled feature isn't currently enabled,
- // therefore we don't need the additional test data.
- if (PlatformDetection.IsUap)
- {
- return Enumerable.Empty<object[]>();
- }
-
IEnumerable<Type> types = Assembly.GetExecutingAssembly().GetTypes().Where(t => t.Namespace == typeof(RegexCompilationHelper).Namespace);
foreach (Type type in types)
{
/// <summary>
/// See https://en.wikipedia.org/wiki/Dotted_and_dotless_I
/// </summary>
- [ActiveIssue(38195, TargetFrameworkMonikers.Uap)]
[Fact]
public void TurkishI_Is_Differently_LowerUpperCased_In_Turkish_Culture()
{
- RemoteExecutorForUap.Invoke(() =>
- {
- var turkish = new CultureInfo("tr-TR");
- string input = "I\u0131\u0130i";
+ var turkish = new CultureInfo("tr-TR");
+ string input = "I\u0131\u0130i";
- Regex[] cultInvariantRegex = Create(input, CultureInfo.InvariantCulture, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
- Regex[] turkishRegex = Create(input, turkish, RegexOptions.IgnoreCase);
+ Regex[] cultInvariantRegex = Create(input, CultureInfo.InvariantCulture, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
+ Regex[] turkishRegex = Create(input, turkish, RegexOptions.IgnoreCase);
- // same input and regex does match so far so good
- Assert.All(cultInvariantRegex, rex => Assert.True(rex.IsMatch(input)));
+ // same input and regex does match so far so good
+ Assert.All(cultInvariantRegex, rex => Assert.True(rex.IsMatch(input)));
- // when the Regex was created with a turkish locale the lower cased turkish version will
- // no longer match the input string which contains upper and lower case iiiis hence even the input string
- // will no longer match
- Assert.All(turkishRegex, rex => Assert.False(rex.IsMatch(input)));
+ // when the Regex was created with a turkish locale the lower cased turkish version will
+ // no longer match the input string which contains upper and lower case iiiis hence even the input string
+ // will no longer match
+ Assert.All(turkishRegex, rex => Assert.False(rex.IsMatch(input)));
- // Now comes the tricky part depending on the use locale in ToUpper the results differ
- // Hence the regular expression will not match if different locales were used
- Assert.All(cultInvariantRegex, rex => Assert.True(rex.IsMatch(input.ToLowerInvariant())));
- Assert.All(cultInvariantRegex, rex => Assert.False(rex.IsMatch(input.ToLower(turkish))));
+ // Now comes the tricky part depending on the use locale in ToUpper the results differ
+ // Hence the regular expression will not match if different locales were used
+ Assert.All(cultInvariantRegex, rex => Assert.True(rex.IsMatch(input.ToLowerInvariant())));
+ Assert.All(cultInvariantRegex, rex => Assert.False(rex.IsMatch(input.ToLower(turkish))));
- Assert.All(turkishRegex, rex => Assert.False(rex.IsMatch(input.ToLowerInvariant())));
- Assert.All(turkishRegex, rex => Assert.True(rex.IsMatch(input.ToLower(turkish))));
- }).Dispose();
+ Assert.All(turkishRegex, rex => Assert.False(rex.IsMatch(input.ToLowerInvariant())));
+ Assert.All(turkishRegex, rex => Assert.True(rex.IsMatch(input.ToLower(turkish))));
}
/// <summary>
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<NoWarn>$(NoWarn);xUnit2008</NoWarn>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
</PropertyGroup>
<BuildConfigurations>
netcoreapp-Windows_NT;
netfx-Windows_NT;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MutexSecurityTests.cs" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
<ItemGroup>
<ProjectReference Include="..\src\System.Threading.Channels.csproj">
- <SupportedFramework>net46;netcore50;netcoreapp1.0;$(UAPvNextTFM);$(AllXamarinFrameworks)</SupportedFramework>
+ <SupportedFramework>net46;netcore50;netcoreapp1.0;$(AllXamarinFrameworks)</SupportedFramework>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="BoundedChannelTests.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AssemblyName>System.Threading.Overlapped</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
internal static class DllImport
{
-#if !uap
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
internal static extern Win32Handle CreateFile(string lpFileName,
FileAccess dwDesiredAccess, FileShare dwShareMode,
IntPtr securityAttrs, CreationDisposition dwCreationDisposition,
FileAttributes dwFlagsAndAttributes, IntPtr hTemplateFile);
-#else
- [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode, BestFitMapping = false)]
- internal static extern unsafe Win32Handle CreateFile2(string lpFileName,
- FileAccess dwDesiredAccess, FileShare dwShareMode,
- CreationDisposition dwCreationDisposition, CREATEFILE2_EXTENDED_PARAMETERS* pCreateExParams);
-
- [StructLayout(LayoutKind.Sequential)]
- internal struct CREATEFILE2_EXTENDED_PARAMETERS
- {
- internal uint dwSize;
- internal FileAttributes dwFileAttributes;
- internal FileAttributes dwFileFlags;
- internal uint dwSecurityQosFlags;
- internal IntPtr lpSecurityAttributes;
- internal IntPtr hTemplateFile;
- }
-#endif
[DllImport("kernel32.dll", SetLastError = true)]
internal static extern unsafe int WriteFile(SafeHandle handle, byte* bytes, int numBytesToWrite, IntPtr numBytesWritten_mustBeZero, NativeOverlapped* lpOverlapped);
private static unsafe Win32Handle CreateHandle(bool async, string fileName)
{
- Win32Handle handle;
-#if !uap
- handle = DllImport.CreateFile(
+ Win32Handle handle = DllImport.CreateFile(
fileName,
DllImport.FileAccess.GenericWrite,
DllImport.FileShare.Write,
DllImport.CreationDisposition.CreateAlways,
async ? DllImport.FileAttributes.Overlapped : DllImport.FileAttributes.Normal,
IntPtr.Zero);
-#else
- var p = new DllImport.CREATEFILE2_EXTENDED_PARAMETERS();
- p.dwSize = (uint)sizeof(DllImport.CREATEFILE2_EXTENDED_PARAMETERS);
- p.dwFileAttributes = DllImport.FileAttributes.Normal;
- p.dwFileFlags = async ? DllImport.FileAttributes.Overlapped : DllImport.FileAttributes.Normal;
- p.dwSecurityQosFlags = (uint)0;
- p.lpSecurityAttributes = IntPtr.Zero;
- p.hTemplateFile = IntPtr.Zero;
- handle = DllImport.CreateFile2(
- fileName,
- DllImport.FileAccess.GenericWrite,
- DllImport.FileShare.Write,
- DllImport.CreationDisposition.CreateAlways,
- &p);
-#endif
if (!handle.IsInvalid)
{
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
}
[Fact]
- [ActiveIssue(21066, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix
public void BindHandle_ClosedSyncHandleAsHandle_ThrowsArgumentException()
{
}
[Fact]
- [ActiveIssue(21066, TargetFrameworkMonikers.Uap)]
[PlatformSpecific(TestPlatforms.Windows)] // ThreadPoolBoundHandle.BindHandle is not supported on Unix
public void BindHandle_ClosedAsyncHandleAsHandle_ThrowsArgumentException()
{
<AssemblyVersion>4.6.4.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp;
netfx;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netfx-Debug;netfx-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Dataflow\ActionBlockTests.cs" />
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
- <!-- System.Threading.Tasks.Extensions has forwarded types into the runtime on netcoreapp/uap
+ <!-- System.Threading.Tasks.Extensions has forwarded types into the runtime on netcoreapp.
It must win over assemblies versioned at 4.2.* -->
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Threading.Tasks.Extensions.Forwards.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' Or '$(TargetGroup)' == 'uap'">
+ <ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netstandard1.0'">
- <Reference Include="System.Runtime" />
- <Reference Include="System.Threading.Tasks" />
- </ItemGroup>
</Project>
\ No newline at end of file
<BuildConfigurations>
netcoreapp-Windows_NT;
netcoreapp-Unix;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<FileAlignment>512</FileAlignment>
<DefineConstants>$(DefineConstants);CONCURRENT_COLLECTIONS;FEATURE_TRACING</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Threading.Tasks</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="Helpers.cs" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<OutputType>Library</OutputType>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<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>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Threading\ThreadExceptionEventArgs.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
<TargetExt>.exe</TargetExt>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="DefaultApartmentStateMain.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
<TargetExt>.exe</TargetExt>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="MTAMain.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- To be consistent between netfx and others we override the SDK behavior which defaults to .dll -->
<TargetExt>.exe</TargetExt>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="STAMain.cs" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="CompressedStackTests.cs" />
[InlineData("MTAMain.exe", "SetApartmentStateTest")]
[InlineData("DefaultApartmentStateMain.exe", "GetApartmentStateTest")]
[InlineData("DefaultApartmentStateMain.exe", "SetApartmentStateTest")]
- [ActiveIssue(20766, TargetFrameworkMonikers.Uap)]
public static void ApartmentState_AttributePresent(string appName, string testName)
{
var psi = new ProcessStartInfo();
}
[Fact]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "RemoteExecutor is STA on UAP.")]
[PlatformSpecific(TestPlatforms.Windows)]
public static void ApartmentState_NoAttributePresent_DefaultState_Windows()
{
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap)]
public static void CurrentCultureTest_DifferentThread()
{
CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
- [SkipOnTargetFramework(TargetFrameworkMonikers.Uap, "SetPrincipal doesn't work on UAP.")]
public static void WindowsPrincipalPolicyTest_Windows()
{
RemoteExecutor.Invoke(() =>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Threading.ThreadPool</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Threading.Timer</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
</PropertyGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AssemblyName>System.Threading</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
{
yield return string.Empty;
yield return "Local\\";
-
- // Creating global sync objects is not allowed in UWP apps
- if (!PlatformDetection.IsUap)
- {
- yield return "Global\\";
- }
+ yield return "Global\\";
}
public static IEnumerable<object[]> AbandonExisting_MemberData()
<PropertyGroup>
<TestRuntime>true</TestRuntime>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="AsyncLocalTests.cs" />
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Transactions.Local.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<PropertyGroup>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<CoverageSupported>false</CoverageSupported>
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="NonMsdtcPromoterTests.cs" />
[InlineData("İI", "iI", StringComparison.CurrentCultureIgnoreCase, "tr-TR", true)]
public static void Equals_NonOrdinal(string str1, string str2, StringComparison comparison, string culture, bool shouldCompareAsEqual)
{
- Func<string, string, string, string, string, int> action = (str1, str2, comparison, culture, shouldCompareAsEqual) =>
+ using (new ThreadCultureChange(culture))
{
- using (new ThreadCultureChange(culture))
- {
- using BoundedUtf8Span boundedSpan1 = new BoundedUtf8Span(str1);
- using BoundedUtf8Span boundedSpan2 = new BoundedUtf8Span(str2);
+ using BoundedUtf8Span boundedSpan1 = new BoundedUtf8Span(str1);
+ using BoundedUtf8Span boundedSpan2 = new BoundedUtf8Span(str2);
- Utf8Span span1 = boundedSpan1.Span;
- Utf8Span span2 = boundedSpan2.Span;
+ Utf8Span span1 = boundedSpan1.Span;
+ Utf8Span span2 = boundedSpan2.Span;
- StringComparison comparisonType = Enum.Parse<StringComparison>(comparison);
- bool expected = bool.Parse(shouldCompareAsEqual);
-
- Assert.Equal(expected, span1.Equals(span2, comparisonType));
- Assert.Equal(expected, span2.Equals(span1, comparisonType));
- Assert.Equal(expected, Utf8Span.Equals(span1, span2, comparisonType));
- Assert.Equal(expected, Utf8Span.Equals(span2, span1, comparisonType));
- }
-
- return RemoteExecutor.SuccessExitCode;
- };
-
- if (culture != null && PlatformDetection.IsUap) // need to apply a culture to the current thread
- {
- RemoteExecutor.Invoke(action, str1, str2, comparison.ToString(), culture, shouldCompareAsEqual.ToString()).Dispose();
- }
- else
- {
- action(str1, str2, comparison.ToString(), culture, shouldCompareAsEqual.ToString());
+ Assert.Equal(shouldCompareAsEqual, span1.Equals(span2, comparison));
+ Assert.Equal(shouldCompareAsEqual, span2.Equals(span1, comparison));
+ Assert.Equal(shouldCompareAsEqual, Utf8Span.Equals(span1, span2, comparison));
+ Assert.Equal(shouldCompareAsEqual, Utf8Span.Equals(span2, span1, comparison));
}
}
<AssemblyVersion>4.0.4.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
_netfx;
</BuildConfigurations>
</PropertyGroup>
<!-- Must match version supported by frameworks which support 4.0.* inbox.
Can be removed when API is added and this assembly is versioned to 4.1.* -->
<AssemblyVersion>4.0.3.0</AssemblyVersion>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.ValueTuple.TypeForwards.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
_netfx;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<!-- rev'ed to 4.0.1.0 even though 4.0.0.0 never shipped so that we can drop pre-release down to beta -->
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Collections" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
<TestRuntime>true</TestRuntime>
</PropertyGroup>
<ItemGroup>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
<StrongNameKeyId>Open</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Web.HttpUtility.cs" />
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<!-- Default configurations to help VS understand the options -->
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="HttpUtility\HttpUtilityTest.cs" />
<AssemblyVersion>4.2.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.ReaderWriter.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AssemblyName>System.Xml.ReaderWriter</AssemblyName>
<RootNamespace>System.Xml</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.XDocument.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AssemblyName>System.Xml.XDocument</AssemblyName>
<RootNamespace>System.Xml</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.XPath.XDocument.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AssemblyName>System.Xml.XPath.XDocument</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\Xml\XPath\XDocumentExtensions.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'=='netcoreapp' or '$(TargetGroup)'=='uap'">
+ <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
<ProjectReference Include="..\..\System.Private.Xml.Linq\src\System.Private.Xml.Linq.csproj" />
</ItemGroup>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.XPath.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<PropertyGroup>
<AssemblyName>System.Xml.XPath</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.XmlDocument.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<RootNamespace>System.Xml.XmlDocument</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Xml.XmlSerializer.cs" />
<Project DefaultTargets="Build">
<PropertyGroup>
<BuildConfigurations>
- uap-Windows_NT;
netcoreapp-Windows_NT;
netcoreapp-Unix;
</BuildConfigurations>
<AssemblyName>System.Xml.XmlSerializer</AssemblyName>
<RootNamespace>System.Xml.XmlSerializer</RootNamespace>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
- <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
+ <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Private.Xml\src\System.Private.Xml.csproj" />
<SolutionsToUpdate Include="@(_solutionsToUpdateFiles->'%(RootDir)%(Directory)')" Exclude="@(_solutionsToExcludeFromUpdate)" />
</ItemGroup>
</Target>
-
- <Import Project="$(RepositoryEngineeringDir)restore\uap-tools.targets" />
</Project>
<Project>
<PropertyGroup>
<BuildConfigurations>
- uap;
netcoreapp;
netstandard;
netstandard1.0;
<!-- do not binplace, this is only used to help compile references
against Windows.winmd. The real mscorlib comes from src/shims/shims.proj -->
<BinPlaceRef>false</BinPlaceRef>
- <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Debug;uap-Release</Configurations>
+ <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="TypeForwards.cs" />
<FrameworkLayout Include="$(NETCoreAppPackageRefPath)">
<TargetFramework>netcoreapp2.0</TargetFramework>
</FrameworkLayout>
- <FrameworkLayout Include="$(UAPPackageRefPath)">
- <TargetFramework>$(UAPvNextTFM)</TargetFramework>
- </FrameworkLayout>
<FrameworkLayout Include="$(NuGetPackageRoot)$(NETStandardLibraryPackageId)\$(NETStandardLibraryPackageVersion)\build\netstandard2.0\ref">
<TargetFramework>netstandard2.0</TargetFramework>
</FrameworkLayout>
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.0.0.0",
- "uap10.0.16300": "4.0.4.0",
"win8": "4.0.0.0",
"wp8": "4.0.0.0",
"wpa81": "4.0.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.2.1.0",
- "uap10.0.16300": "4.3.0.0",
"win8": "4.0.0.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.3.0.0",
- "uap10.0.16300": "4.6.0.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"netcoreapp3.0": "4.2.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
- "uap10.0.16300": "4.2.0.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.1.4.0",
- "uap10.0.16300": "4.1.5.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.0.4.0",
- "uap10.0.16300": "4.0.5.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.1.3.0",
- "uap10.0.16300": "4.1.4.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.3.1.0",
- "uap10.0.16300": "4.3.2.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"portable46-wp81+wpa81": "4.0.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
- "uap10.0.16300": "4.0.0.0",
"win8": "4.0.0.0",
"wp8": "2.0.5.0",
"wpa81": "4.0.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.1.1.0",
- "uap10.0.16300": "4.1.2.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"netcoreapp2.1": "4.3.0.0",
"monoandroid10": "Any",
"monotouch10": "Any",
- "uap10.0.16300": "4.3.0.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
"monoandroid10": "Any",
"monotouch10": "Any",
"uap10.0.16299": "4.0.3.0",
- "uap10.0.16300": "4.0.4.0",
"xamarinios10": "Any",
"xamarinmac20": "Any",
"xamarintvos10": "Any",
]
},
{
- "Name": "System.Net.Http.Rtc",
- "Description": "Provides the System.Net.Http.RtcRequestFactory class, which creates HTTP requests for use with the Real-Time-Communications (RTC) background notification infrastructure.",
- "CommonTypes": [
- "System.Net.Http.RtcRequestFactory"
- ]
- },
- {
"Name": "System.Net.Requests",
"Description": "Provides older classes (such as HttpWebRequest and HttpWebResponse) for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. Developers should prefer the classes in the System.Net.Http package.",
"CommonTypes": [
]
},
{
- "Name": "System.Numerics.Vectors.WindowsRuntime",
- "Description": "Provides extension methods for converting between System.Numerics.Vector2 and Windows.Foundation.Point and Size.",
- "CommonTypes": [
- "System.Numerics.VectorExtensions"
- ]
- },
- {
"Name": "System.ObjectModel",
"Description": "Provides types and interfaces that allow the creation of observable types that provide notifications to clients when changes are made to it.",
"CommonTypes": [
<ApiCompatNSBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.$(TargetGroup).netstandard.txt</ApiCompatNSBaselineFile>
<ApiCompatNSOnlyBaselineFile>$(MSBuildThisFileDirectory)ApiCompatBaseline.$(TargetGroup).netstandardOnly.txt</ApiCompatNSOnlyBaselineFile>
<ApiCompatImplementationDirs>$(RefPath.TrimEnd('\/'))</ApiCompatImplementationDirs>
- <!-- If we are targeting uap run ApiCompat against the implementation assemblies instead since they don't match the reference assemblies -->
- <!-- also include $(RefPath) last to pick up windows.winmd dependency, which we don't place in RuntimePath -->
- <ApiCompatImplementationDirs Condition="'$(TargetsUap)' == 'true'">$(RuntimePath.TrimEnd('\/')),$(RefPath.TrimEnd('\/'))</ApiCompatImplementationDirs>
<!-- Set to true to build this project -->
- <!-- Separate property otherwise /p:BaselineApiCompat=true would force it to run even for non-UAP -->
<BaselineApiCompat Condition="'$(BaselineApiCompat)' == ''">false</BaselineApiCompat>
<_RunApiCompat>true</_RunApiCompat>
- <!-- Disable running apicompat for uap scenarios because the RuntimePath is not correctly setup in BuildAllConfigurations mode -->
- <_RunApiCompat Condition="'$(BuildAllConfigurations)' == 'true' and '$(TargetsUap)' == 'true'">false</_RunApiCompat>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<!-- shared configurations between shims and apicompat -->
<BuildConfigurations>
$(BuildConfigurations);
- netcoreapp;
- uap;
+ netcoreapp;;
</BuildConfigurations>
</PropertyGroup>
<PropertyGroup>
<IsNETCoreApp>true</IsNETCoreApp>
- <IsUAP>true</IsUAP>
<NuGetTargetMoniker Condition="'$(NuGetTargetMoniker)' == ''">$(TargetFramework)</NuGetTargetMoniker>
</PropertyGroup>
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
- uap;
</BuildConfigurations>
</PropertyGroup>
</Project>
\ No newline at end of file
<PropertyGroup>
<IsRuntimeAssembly>true</IsRuntimeAssembly>
<!-- Use runtime assemblies for the TargetGroup, using build configuration OSGroup -->
- <_runtimeOSGroup>$(_bc_OSGroup)</_runtimeOSGroup>
- <_runtimeOSGroup Condition="'$(TargetsUAP)' == 'true'">Windows_NT</_runtimeOSGroup>
- <RefPath>$(ArtifactsBinDir)runtime/$(TargetGroup)-$(_runtimeOSGroup)-$(_bc_ConfigurationGroup)-$(ArchGroup)/</RefPath>
+ <RefPath>$(ArtifactsBinDir)runtime/$(TargetGroup)-$(_bc_OSGroup)-$(_bc_ConfigurationGroup)-$(ArchGroup)/</RefPath>
</PropertyGroup>
<ItemGroup>
<GenerateFullCoverageReport>true</GenerateFullCoverageReport>
<CoverageReportInputPath>$(ArtifactsBinDir)*.Tests/**/coverage.xml</CoverageReportInputPath>
<CoverageReportDir>$(ArtifactsDir)coverage</CoverageReportDir>
- <!-- For UAP we are using an APPX that is registered with a unique ID. Because of that we need to run tests sequentially -->
- <SerializeProjects Condition="'$(BuildingUAPVertical)' == 'true' or '$(Coverage)' == 'true'">true</SerializeProjects>
- <TraversalBuildDependsOn Condition="'$(BuildingUAPVertical)' == 'true' and '$(BuildAllConfigurations)' != 'true'">MakeCommonResourcesPriFile;$(TraversalBuildDependsOn)</TraversalBuildDependsOn>
+ <SerializeProjects Condition="'$(Coverage)' == 'true'">true</SerializeProjects>
</PropertyGroup>
<ItemGroup Condition="'$(BuildAllConfigurations)' != 'true'">