Add reference assembly for System.Private.CoreLib.dll (#72143)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 2 Aug 2022 15:58:13 +0000 (17:58 +0200)
committerGitHub <noreply@github.com>
Tue, 2 Aug 2022 15:58:13 +0000 (17:58 +0200)
We now compile against the reference assembly in all places where we were compiling against the mono/coreclr System.Private.CoreLib.dll implementation assembly before.

The new reference assembly consumes sources from the existing contracts to avoid checking in a generated version of SPC.dll (this would add ~20k lines of .cs which is mostly duplicated with System.Runtime.cs)

Since a few contracts have only partially moved types to SPC we wrap contract types with `#if !BUILDING_CORELIB_REFERENCE` so we can hide them when compiling the SPC reference assembly. This needed a few GenAPI changes which are implemented here: https://github.com/dotnet/arcade/pull/10003.

Note that this means that the types which live in CoreLib are moved to the end of the ref .cs file which causes a GitHub diff to show up, but it is actually a no-op.

Regenerating the ref .cs files works the same way as before, by running the `GenerateReferenceAssemblySource` target in the contract's src\ folder.

Fixes https://github.com/dotnet/runtime/issues/67660

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
58 files changed:
Directory.Build.props
docs/coding-guidelines/updating-ref-source.md
eng/Version.Details.xml
eng/Versions.props
eng/references.targets
eng/resolveContract.props [new file with mode: 0644]
eng/resolveContract.targets
src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt [new file with mode: 0644]
src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt [new file with mode: 0644]
src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/ThreadPool.Windows.cs
src/coreclr/nativeaot/System.Private.DisabledReflection/src/System.Private.DisabledReflection.csproj
src/coreclr/nativeaot/System.Private.Reflection.Execution/src/System.Private.Reflection.Execution.csproj
src/coreclr/nativeaot/System.Private.StackTraceMetadata/src/System.Private.StackTraceMetadata.csproj
src/coreclr/nativeaot/System.Private.TypeLoader/src/System.Private.TypeLoader.csproj
src/libraries/Directory.Build.props
src/libraries/Directory.Build.targets
src/libraries/System.Collections.Concurrent/ref/System.Collections.Concurrent.cs
src/libraries/System.Collections.Concurrent/src/System.Collections.Concurrent.csproj
src/libraries/System.Collections/ref/System.Collections.cs
src/libraries/System.Collections/src/System.Collections.csproj
src/libraries/System.Diagnostics.Debug/tests/System.Diagnostics.Debug.Tests.csproj
src/libraries/System.Diagnostics.StackTrace/ref/System.Diagnostics.StackTrace.cs
src/libraries/System.Diagnostics.StackTrace/src/System.Diagnostics.StackTrace.csproj
src/libraries/System.Diagnostics.Tracing/src/ApiCompatBaseline.Tracing.txt [moved from src/libraries/System.Diagnostics.Tracing/src/ApiCompatBaseline.txt with 100% similarity]
src/libraries/System.Diagnostics.Tracing/src/MatchingRefApiCompatBaseline.txt
src/libraries/System.Diagnostics.Tracing/src/System.Diagnostics.Tracing.csproj
src/libraries/System.Memory/ref/System.Memory.cs
src/libraries/System.Memory/src/System.Memory.csproj
src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.txt [new file with mode: 0644]
src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.csproj [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/CounterGroup.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/DiagnosticCounter.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventCounter.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingEventCounter.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/IncrementingPollingCounter.cs
src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/PollingCounter.cs
src/libraries/System.Private.CoreLib/src/System/Threading/RegisteredWaitHandle.Portable.cs
src/libraries/System.Private.CoreLib/src/System/Threading/Thread.cs
src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
src/libraries/System.Runtime.InteropServices/ref/System.Runtime.InteropServices.cs
src/libraries/System.Runtime.InteropServices/src/System.Runtime.InteropServices.csproj
src/libraries/System.Runtime/ref/System.Runtime.cs
src/libraries/System.Runtime/src/System.Runtime.csproj
src/libraries/System.Threading.Thread/src/ApiCompatBaseline.Threading.txt [moved from src/libraries/System.Threading.Thread/src/MatchingRefApiCompatBaseline.txt with 100% similarity]
src/libraries/System.Threading.Thread/src/ApiCompatBaseline.txt [deleted file]
src/libraries/System.Threading.Thread/src/System.Threading.Thread.csproj
src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.Threading.txt [moved from src/libraries/System.Threading.ThreadPool/src/MatchingRefApiCompatBaseline.txt with 100% similarity]
src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.txt [deleted file]
src/libraries/System.Threading.ThreadPool/src/System.Threading.ThreadPool.csproj
src/libraries/System.Threading/ref/System.Threading.cs
src/libraries/System.Threading/src/System.Threading.csproj
src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt [new file with mode: 0644]
src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
src/mono/System.Private.CoreLib/src/System/Threading/ThreadPool.Browser.Mono.cs

index f3b2b5a..ad48dd6 100644 (file)
 
   <PropertyGroup>
     <CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir>
+    <CoreLibRefDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'ref'))</CoreLibRefDir>
     <CoreLibProject Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
     <CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
     <CoreLibProject Condition="'$(UseNativeAotCoreLib)' == 'true'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'nativeaot', 'System.Private.CoreLib', 'src', 'System.Private.CoreLib.csproj'))</CoreLibProject>
+    <UriProject>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'System.Private.Uri', 'src', 'System.Private.Uri.csproj'))</UriProject>
 
     <!-- this property is used by the SDK to pull in mono-based runtime packs -->
     <UseMonoRuntime Condition="'$(UseMonoRuntime)' == '' and '$(RuntimeFlavor)' == 'Mono'">true</UseMonoRuntime>
index 5b8bb95..fa33fe5 100644 (file)
@@ -13,7 +13,7 @@ This document provides the steps you need to take to update the reference assemb
 
 These steps can also be applied to some unique assemblies which depend on changes in System.Private.Corelib. (partial facades like System.Memory, for example).
 
-1) Run `dotnet build --no-incremental /t:GenerateReferenceSource` from the System.Runtime/src directory.
+1) Run `dotnet build --no-incremental /t:GenerateReferenceAssemblySource` from the System.Runtime/src directory.
 2) Filter out all unrelated changes and extract the changes you care about (ignore certain attributes being removed). Generally, this step is not required for other reference assemblies.
 
 ## For Full Facade Assemblies implementation assemblies
index 50179ab..b96e021 100644 (file)
@@ -66,9 +66,9 @@
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Sha>11672d906390046e77a34b6406d9e02229fd7e45</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.22372.1">
+    <Dependency Name="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.22401.3">
       <Uri>https://github.com/dotnet/arcade</Uri>
-      <Sha>11672d906390046e77a34b6406d9e02229fd7e45</Sha>
+      <Sha>aa90e21c63248b4d6d61e8de14a0d8e7a9275130</Sha>
     </Dependency>
     <Dependency Name="Microsoft.DotNet.GenFacades" Version="7.0.0-beta.22372.1">
       <Uri>https://github.com/dotnet/arcade</Uri>
index 69383a1..9d4b272 100644 (file)
@@ -57,7 +57,7 @@
     <MicrosoftDotNetApiCompatVersion>7.0.0-beta.22372.1</MicrosoftDotNetApiCompatVersion>
     <MicrosoftDotNetBuildTasksFeedVersion>7.0.0-beta.22372.1</MicrosoftDotNetBuildTasksFeedVersion>
     <MicrosoftDotNetCodeAnalysisVersion>7.0.0-beta.22372.1</MicrosoftDotNetCodeAnalysisVersion>
-    <MicrosoftDotNetGenAPIVersion>7.0.0-beta.22372.1</MicrosoftDotNetGenAPIVersion>
+    <MicrosoftDotNetGenAPIVersion>7.0.0-beta.22401.3</MicrosoftDotNetGenAPIVersion>
     <MicrosoftDotNetGenFacadesVersion>7.0.0-beta.22372.1</MicrosoftDotNetGenFacadesVersion>
     <MicrosoftDotNetXUnitExtensionsVersion>7.0.0-beta.22372.1</MicrosoftDotNetXUnitExtensionsVersion>
     <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.22372.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
index 80eed8f..29cff24 100644 (file)
                       Condition="'$(IsSourceProject)' == 'true' and '@(_coreLibProjectReference)' != ''" />
   </ItemGroup>
 
-  <!-- Disable TargetArchitectureMismatch warning when we reference CoreLib as it is platform specific. -->
-  <Target Name="DisableProjectReferenceArchitectureMismatchWarningForCoreLib"
-          Condition="'@(_coreLibProjectReference)' != ''"
-          BeforeTargets="ResolveAssemblyReferences">
-    <PropertyGroup>
-      <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
-    </PropertyGroup>
-  </Target>
-
   <!-- Filter out transitive P2Ps which should be excluded. -->
   <Target Name="FilterTransitiveProjectReferences"
           AfterTargets="IncludeTransitiveProjectReferences"
     </ItemGroup>
   </Target>
 
+  <Target Name="ReplaceCoreLibSrcWithRefAssemblyForCompilation"
+          AfterTargets="FindReferenceAssembliesForReferences"
+          Condition="'$(CompileUsingReferenceAssemblies)' != 'true' and '@(_coreLibProjectReference)' != ''">
+    <ItemGroup>
+      <_resolvedCoreLibProjectReference Include="@(_ResolvedProjectReferencePaths->WithMetadataValue('MSBuildSourceProjectFile','$(CoreLibProject)'))" />
+      <ReferencePathWithRefAssemblies Remove="@(_resolvedCoreLibProjectReference)" />
+      <ReferencePathWithRefAssemblies Include="@(_resolvedCoreLibProjectReference->Metadata('ReferenceAssembly'))" />
+    </ItemGroup>
+  </Target>
+
   <!-- For experimental ref assemblies (which typically have the same name as a regular ref
        assembly), bump their minor file version by 100 to make it distinguishable from the regular
        ref assembly. -->
diff --git a/eng/resolveContract.props b/eng/resolveContract.props
new file mode 100644 (file)
index 0000000..5360c9c
--- /dev/null
@@ -0,0 +1,13 @@
+<Project>
+  <!-- ApiCompat setting -->
+  <PropertyGroup>
+    <RunApiCompatForSrc>$([MSBuild]::ValueOrDefault('$(IsSourceProject)', 'false'))</RunApiCompatForSrc>
+    <RunMatchingRefApiCompat>$([MSBuild]::ValueOrDefault('$(IsSourceProject)', 'false'))</RunMatchingRefApiCompat>
+    <ApiCompatEnforceOptionalRules>true</ApiCompatEnforceOptionalRules>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ApiCompatExcludeAttributesFile Include="$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt" />
+    <ApiCompatExcludeAttributesFile Include="$(RepositoryEngineeringDir)ApiCompatExcludeAttributes.txt" />
+  </ItemGroup>
+</Project>
index 37ab1d2..4a2b0a5 100644 (file)
@@ -12,6 +12,7 @@
     <GenAPIHeaderFile>$(RepositoryEngineeringDir)LicenseHeader.txt</GenAPIHeaderFile>
     <GenAPITargetPath>$([MSBuild]::NormalizePath('$(MSBuildProjectDirectory)', '..', 'ref', '$(AssemblyName).cs'))</GenAPITargetPath>
     <GenAPILangVersion Condition="'$(LangVersion)' != ''">$(LangVersion)</GenAPILangVersion>
+    <ProjectForGenAPIDocIdGeneration Condition="'$(IsSourceProject)' == 'true' and '$(ProjectForGenAPIDocIdGeneration)' == ''">$(CoreLibProject)</ProjectForGenAPIDocIdGeneration>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(IsSourceProject)' == 'true'">
     <RunApiCompat Condition="'$(HasMatchingContract)' != 'true'">false</RunApiCompat>
   </PropertyGroup>
 
+  <ItemGroup Condition="'$(IsSourceProject)' == 'true' or '$(IsReferenceAssemblyProject)' == 'true' or '$(IsPartialFacadeAssembly)' == 'true'">
+    <PackageReference Include="Microsoft.DotNet.ApiCompat" Condition="'$(DotNetBuildFromSource)' != 'true'" Version="$(MicrosoftDotNetApiCompatVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
+  </ItemGroup>
+
   <ItemGroup Condition="'$(HasMatchingContract)' == 'true' and '$(ContractProject)' != '' and '@(ResolvedMatchingContract)' == ''">
     <ProjectReference Include="$(ContractProject)" ReferenceOutputAssembly="false" OutputItemType="ResolvedMatchingContract" />
     <!-- We aren't referencing the contract, but make sure it's considered as an input to Compile so that if it changes we rebuild and rerun API compat -->
                                       ReferenceAssembly="" />
     </ItemGroup>
   </Target>
-  
+
+  <!-- Generate a .txt file with all public types of the project referenced by ProjectForGenAPIDocIdGeneration (e.g. System.Private.CoreLib or System.Private.Uri implementation assembly).
+       This file is then later on passed to GenAPI as the list of types which should be "split out" with the conditional compilation logic. -->
+  <Target Name="GenerateConditionalTypeLists"
+          Condition="'@(ProjectReference)' != '' and @(ProjectReference->AnyHaveMetadataValue('Identity', '$(ProjectForGenAPIDocIdGeneration)')) and ('$(ContractTypesPartiallyMoved)' == 'true' or '$(ContractTypesPartiallyMoved)' == 'true')">
+    <PropertyGroup>
+      <!-- We either wrap all contract types in a #if condition (when SymbolForGenAPIConditionalTypeLists is empty),
+           or just the types mentioned in GenAPIConditionalTypeLists with the symbol specified in SymbolForGenAPIConditionalTypeLists -->
+      <GenAPIDefaultCondition Condition="'$(SymbolForGenAPIConditionalTypeLists)' == ''">!BUILDING_CORELIB_REFERENCE</GenAPIDefaultCondition>
+    </PropertyGroup>
+
+    <ItemGroup>
+      <_genAPILibPathForGenAPIDocIdGeneration Include="@(ReferencePath->'%(RootDir)%(Directory)'->Distinct())" />
+      <_genAPIResolvedProjectForGenAPIDocIdGeneration Include="@(_ResolvedProjectReferencePaths->WithMetadataValue('MSBuildSourceProjectFile','$(ProjectForGenAPIDocIdGeneration)'))" />
+
+      <GenAPIConditionalTypeLists Include="$(IntermediateOutputPath)GenAPIConditionalTypeList.txt">
+        <Symbol Condition="'$(SymbolForGenAPIConditionalTypeLists)' != ''">$(SymbolForGenAPIConditionalTypeLists)</Symbol>
+      </GenAPIConditionalTypeLists>
+    </ItemGroup>
+
+    <!-- Generate conditional compilation symbols to hide types implemented in contracts so we can include the .cs in the System.Private.CoreLib ref -->
+    <Microsoft.DotNet.GenAPI.GenAPITask
+        Assembly="@(_genAPIResolvedProjectForGenAPIDocIdGeneration)"
+        LibPath="@(_genAPILibPathForGenAPIDocIdGeneration)"
+        WriterType="DocIds"
+        DocIdKinds="Namespace, Type"
+        OutputPath="@(GenAPIConditionalTypeLists)" />
+  </Target>
+
   <Target Name="SetGenAPIProperties"
+          DependsOnTargets="GenerateConditionalTypeLists"
           BeforeTargets="GenerateReferenceAssemblySource">
     <PropertyGroup>
-      <GenAPIFollowTypeForwards Condition="'%(ProjectReference.Identity)' == '$(CoreLibProject)'">true</GenAPIFollowTypeForwards>
+      <GenAPIFollowTypeForwards Condition="'%(ProjectReference.Identity)' == '$(CoreLibProject)' or '%(ProjectReference.Identity)' == '$(UriProject)'">true</GenAPIFollowTypeForwards>
     </PropertyGroup>
   </Target>
 
diff --git a/src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt b/src/coreclr/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
new file mode 100644 (file)
index 0000000..0a2be8f
--- /dev/null
@@ -0,0 +1,35 @@
+Compat issues with assembly System.Private.CoreLib:
+TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.InteropServices.ComActivationContextInternal' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.InteropServices.ComActivator' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.InteropServices.InMemoryAssemblyLoader' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected void System.WeakReference..ctor()' does not exist in the reference but it does exist in the implementation.
+CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.Comparer<T>' in the implementation but not the reference.
+CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.TypeDependencyAttribute' exists on 'System.Collections.Generic.EqualityComparer<T>' in the implementation but not the reference.
+MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
+CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
+CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
+TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
+MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
index 78568b2..f408f01 100644 (file)
       <FileWrites Include="@(EventingSourceFile)" />
     </ItemGroup>
   </Target>
+
+  <!-- Import refererence assembly and ApiCompat logic -->
+  <PropertyGroup>
+    <IsSourceProject>true</IsSourceProject>
+    <ApiCompatValidateBaseline>true</ApiCompatValidateBaseline>
+  </PropertyGroup>
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.props" />
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
 </Project>
diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt b/src/coreclr/nativeaot/System.Private.CoreLib/src/MatchingRefApiCompatBaseline.txt
new file mode 100644 (file)
index 0000000..622a470
--- /dev/null
@@ -0,0 +1,271 @@
+Compat issues with assembly System.Private.CoreLib:
+TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.DeveloperExperience.DeveloperExperience' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ArraySignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ArraySignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.AssemblyFlags' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.AssemblyHashAlgorithm' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.BooleanCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ByReferenceSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ByReferenceSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ByteCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.CharCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantBooleanArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantBooleanArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantBooleanValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantBooleanValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantBoxedEnumValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantBoxedEnumValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantByteArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantByteArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantByteValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantByteValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantCharArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantCharArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantCharValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantCharValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantDoubleArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantDoubleArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantDoubleValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantDoubleValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantEnumArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantEnumArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantHandleArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantHandleArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt16Array' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt16ArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt16Value' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt16ValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt32Array' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt32ArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt32Value' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt32ValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt64Array' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt64ArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt64Value' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantInt64ValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantReferenceValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantReferenceValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSByteArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSByteArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSByteValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSByteValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSingleArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSingleArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSingleValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantSingleValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantStringArray' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantStringArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantStringValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantStringValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt16Array' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt16ArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt16Value' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt16ValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt32Array' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt32ArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt32Value' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt32ValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt64Array' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt64ArrayHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt64Value' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ConstantUInt64ValueHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.CustomAttribute' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.CustomAttributeHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.CustomAttributeHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.DoubleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Event' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.EventHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.EventHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Field' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.FieldHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.FieldHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.FieldSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.FieldSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.FunctionPointerSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.FunctionPointerSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.GenericParameter' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.GenericParameterHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.GenericParameterHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.GenericParameterKind' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Handle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.HandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.HandleType' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Int16Collection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Int32Collection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Int64Collection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MemberReference' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MemberReferenceHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MetadataReader' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Method' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodInstantiation' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodInstantiationHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodSemantics' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodSemanticsAttributes' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodSemanticsHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodSemanticsHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodTypeVariableSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.MethodTypeVariableSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ModifiedType' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ModifiedTypeHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamedArgument' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamedArgumentHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamedArgumentHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamedArgumentMemberKind' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamespaceDefinition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamespaceDefinitionHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamespaceDefinitionHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamespaceReference' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NamespaceReferenceHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.NativeFormatReaderExtensions' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Parameter' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ParameterHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ParameterHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PInvokeAttributes' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PointerSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PointerSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.Property' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PropertyHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PropertyHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PropertySignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.PropertySignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.QualifiedField' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.QualifiedFieldHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.QualifiedMethod' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.QualifiedMethodHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.SByteCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ScopeDefinition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ScopeDefinitionHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ScopeDefinitionHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ScopeReference' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.ScopeReferenceHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.SingleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.SZArraySignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.SZArraySignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeDefinition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeDefinitionHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeDefinitionHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeForwarder' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeForwarderHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeForwarderHandleCollection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeInstantiationSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeInstantiationSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeReference' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeReferenceHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeSpecification' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeSpecificationHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeVariableSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.TypeVariableSignatureHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.UInt16Collection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.UInt32Collection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Metadata.NativeFormat.UInt64Collection' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Augments.ReflectionAugments' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Augments.ReflectionCoreCallbacks' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.AssemblyBinder' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.AssemblyBindResult' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.QScopeDefinition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.ReflectionDomainSetup' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.Execution.ExecutionDomain' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.Execution.ExecutionEnvironment' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.Execution.FieldAccessor' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.Execution.MethodInvoker' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Core.Execution.ReflectionCoreExecution' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Extensions.NonPortable.CustomAttributeInheritanceRules' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Reflection.Extensions.NonPortable.CustomAttributeInstantiator' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CanonTypeKind' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.ReadyToRunSectionType' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.TypeManagerHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.Augments.DynamicDelegateAugments' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.Augments.ReflectionExecutionDomainCallbacks' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.Augments.RuntimeAugments' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.Augments.StackTraceMetadataCallbacks' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.Augments.TypeLoaderCallbacks' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerHelpers.MathHelpers' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerHelpers.StartupCodeHelpers' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerHelpers.ThrowHelpers' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.FixupRuntimeTypeHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.FunctionPointerOps' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.GenericMethodDescriptor' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.MethodNameAndSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.OpenMethodResolver' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeFieldHandleInfo' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeMethodHandleInfo' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.CompilerServices.RuntimeSignature' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.TypeSystem.ExceptionStringID' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.TypeSystem.LockFreeReaderHashtable<TKey, TValue>' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Array<T>' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.InvokeUtils' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.MDArray' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.ModuleHandle..ctor(System.Reflection.Module)' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.RuntimeExceptionHelpers' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.RuntimeType' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.String System.Type.InternalNameIfAvailable.get()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Boolean System.TypedReference.IsNull.get()' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Diagnostics.DebugAnnotations' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Diagnostics.DebuggerGuidedStepThroughAttribute' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
+CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
+CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
+TypesMustExist : Type 'System.Diagnostics.Tracing.PropertyValue' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
+TypesMustExist : Type 'System.Reflection.AssemblyRuntimeNameHelpers' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.BinderBundle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.DelegateDynamicInvokeInfo' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.EnumInfo' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Reflection.ParameterInfo[] System.Reflection.MethodBase.GetParametersNoCopy()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Reflection.MethodBase System.Reflection.MethodBase.MetadataDefinitionMethod.get()' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.MissingMetadataException' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.RuntimeAssembly' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.RuntimeAssemblyName' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.MetadataReaderExtensions' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.NativeFormatMetadataReaderExtensions' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.QGenericParameter' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.QHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.QMethodDefinition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.QSignatureTypeHandle' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.QTypeDefinition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Reflection.Runtime.General.QTypeDefRefOrSpec' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Resources.RuntimeResourceSet' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.ExceptionIDs' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.RhFailFastReason' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.RuntimeImportAttribute' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.RuntimeImports' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.RuntimeObjectFactory' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.TypeLoaderExports' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.ForceDictionaryLookupsAttribute' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.ForceLazyDictionaryAttribute' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.ReflectionBlockedAttribute' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.StaticClassConstructionContext' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.InteropServices.InteropExtensions' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.InteropServices.NativeFunctionPointerWrapper' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.InteropServices.PInvokeMarshal' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.InteropServices.UnsafeGCHandle' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Threading.Condition' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Threading.Lock' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Threading.LockHolder' does not exist in the reference but it does exist in the implementation.
\ No newline at end of file
index 3734a91..9075bb0 100644 (file)
     <!-- This is the T4 template service and is added by VS anytime you modify a T4 template. Required for .tt files. -->
     <Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
   </ItemGroup>
+
+  <!-- Import refererence assembly and ApiCompat logic -->
+  <PropertyGroup>
+    <IsSourceProject>true</IsSourceProject>
+    <ApiCompatValidateBaseline>true</ApiCompatValidateBaseline>
+  </PropertyGroup>
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.props" />
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
 </Project>
index 391148c..ba38ba5 100644 (file)
@@ -13,6 +13,9 @@ namespace System.Threading
     //
     // Windows-specific implementation of ThreadPool
     //
+#if !FEATURE_WASM_THREADS
+    [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
     public sealed class RegisteredWaitHandle : MarshalByRefObject
     {
         private readonly Lock _lock;
index 4e84ebf..163f809 100644 (file)
@@ -1,4 +1,8 @@
 <Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <!-- we access a lot of internals of System.Private.CoreLib, disable compiling against the ref assembly for now so we don't need to update it -->
+    <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+  </PropertyGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\System.Private.CoreLib\src\System.Private.CoreLib.csproj" />
   </ItemGroup>
index d7883b5..d2c2c95 100644 (file)
@@ -6,6 +6,8 @@
 
   <PropertyGroup>
     <NativeFormatCommonPath>$(CompilerCommonPath)\Internal\NativeFormat</NativeFormatCommonPath>
+    <!-- we access a lot of internals of System.Private.CoreLib, disable compiling against the ref assembly for now so we don't need to update it -->
+    <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(NativeFormatCommonPath)\NativeFormat.cs" />
index 0b0589e..87b0de7 100644 (file)
@@ -1,4 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <!-- we access a lot of internals of System.Private.CoreLib, disable compiling against the ref assembly for now so we don't need to update it -->
+    <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
+  </PropertyGroup>
+
   <ItemGroup>
     <ILLinkSubstitutionsXmls Include="ILLink\ILLink.Substitutions.xml" />
   </ItemGroup>
index b9532d1..9c3fc10 100644 (file)
@@ -7,6 +7,8 @@
     <DefineConstants Condition="'$(GVM_RESOLUTION_TRACE)' != ''">GVM_RESOLUTION_TRACE;$(DefineConstants)</DefineConstants>
     <DefineConstants Condition="'$(CCCONVERTER_TRACE)' != ''">CCCONVERTER_TRACE;$(DefineConstants)</DefineConstants>
     <DefineConstants Condition="'$(GENERICS_FORCE_USG)' != ''">GENERICS_FORCE_USG;$(DefineConstants)</DefineConstants>
+    <!-- we access a lot of internals of System.Private.CoreLib, disable compiling against the ref assembly for now so we don't need to update it -->
+    <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
   </PropertyGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\System.Private.CoreLib\src\System.Private.CoreLib.csproj" />
index 25649e4..392e6ba 100644 (file)
     <AssemblyVersion />
   </PropertyGroup>
 
-  <!-- ApiCompat setting -->
-  <PropertyGroup>
-    <RunApiCompatForSrc>$([MSBuild]::ValueOrDefault('$(IsSourceProject)', 'false'))</RunApiCompatForSrc>
-    <RunMatchingRefApiCompat>$([MSBuild]::ValueOrDefault('$(IsSourceProject)', 'false'))</RunMatchingRefApiCompat>
-    <ApiCompatEnforceOptionalRules>true</ApiCompatEnforceOptionalRules>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <ApiCompatExcludeAttributesFile Include="$(RepositoryEngineeringDir)DefaultGenApiDocIds.txt" />
-    <ApiCompatExcludeAttributesFile Include="$(RepositoryEngineeringDir)ApiCompatExcludeAttributes.txt" />
-  </ItemGroup>
-
   <ItemGroup>
     <!-- Projects which are manually built. -->
     <ProjectExclusions Include="$(CommonTestPath)System\Net\Prerequisites\**\*.csproj" />
@@ -76,6 +64,7 @@
 
   <Import Project="NetCoreAppLibrary.props" />
   <Import Project="$(RepositoryEngineeringDir)referenceAssemblies.props" Condition="'$(IsReferenceAssemblyProject)' == 'true'" />
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.props" />
 
   <PropertyGroup>
     <!-- Default any assembly not specifying a key to use the Open Key -->
index 26155ac..8f9b52a 100644 (file)
   </ItemGroup>
   
   <ItemGroup Condition="'$(IsSourceProject)' == 'true' or '$(IsReferenceAssemblyProject)' == 'true' or '$(IsPartialFacadeAssembly)' == 'true'">
-    <PackageReference Include="Microsoft.DotNet.ApiCompat" Condition="'$(DotNetBuildFromSource)' != 'true'" Version="$(MicrosoftDotNetApiCompatVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
     <PackageReference Include="Microsoft.DotNet.GenAPI" Condition="'$(DotNetBuildFromSource)' != 'true'" Version="$(MicrosoftDotNetGenApiVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
     <PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
   </ItemGroup>
index 4afe534..6c2b093 100644 (file)
@@ -4,6 +4,7 @@
 // Changes to this file must follow the https://aka.ms/api-review process.
 // ------------------------------------------------------------------------------
 
+#if !BUILDING_CORELIB_REFERENCE
 namespace System.Collections.Concurrent
 {
     [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
@@ -126,26 +127,6 @@ namespace System.Collections.Concurrent
         public bool TryRemove(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
         public bool TryUpdate(TKey key, TValue newValue, TValue comparisonValue) { throw null; }
     }
-    public partial class ConcurrentQueue<T> : System.Collections.Concurrent.IProducerConsumerCollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
-    {
-        public ConcurrentQueue() { }
-        public ConcurrentQueue(System.Collections.Generic.IEnumerable<T> collection) { }
-        public int Count { get { throw null; } }
-        public bool IsEmpty { get { throw null; } }
-        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
-        object System.Collections.ICollection.SyncRoot { get { throw null; } }
-        public void Clear() { }
-        public void CopyTo(T[] array, int index) { }
-        public void Enqueue(T item) { }
-        public System.Collections.Generic.IEnumerator<T> GetEnumerator() { throw null; }
-        bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryAdd(T item) { throw null; }
-        bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T item) { throw null; }
-        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        public T[] ToArray() { throw null; }
-        public bool TryDequeue([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
-        public bool TryPeek([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
-    }
     public partial class ConcurrentStack<T> : System.Collections.Concurrent.IProducerConsumerCollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
     {
         public ConcurrentStack() { }
@@ -176,13 +157,6 @@ namespace System.Collections.Concurrent
         None = 0,
         NoBuffering = 1,
     }
-    public partial interface IProducerConsumerCollection<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.ICollection, System.Collections.IEnumerable
-    {
-        void CopyTo(T[] array, int index);
-        T[] ToArray();
-        bool TryAdd(T item);
-        bool TryTake([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T item);
-    }
     public abstract partial class OrderablePartitioner<TSource> : System.Collections.Concurrent.Partitioner<TSource>
     {
         protected OrderablePartitioner(bool keysOrderedInEachPartition, bool keysOrderedAcrossPartitions, bool keysNormalized) { }
@@ -213,3 +187,34 @@ namespace System.Collections.Concurrent
         public abstract System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<TSource>> GetPartitions(int partitionCount);
     }
 }
+#endif // !BUILDING_CORELIB_REFERENCE
+namespace System.Collections.Concurrent
+{
+    public partial class ConcurrentQueue<T> : System.Collections.Concurrent.IProducerConsumerCollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
+    {
+        public ConcurrentQueue() { }
+        public ConcurrentQueue(System.Collections.Generic.IEnumerable<T> collection) { }
+        public int Count { get { throw null; } }
+        public bool IsEmpty { get { throw null; } }
+        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
+        object System.Collections.ICollection.SyncRoot { get { throw null; } }
+        public void Clear() { }
+        public void CopyTo(T[] array, int index) { }
+        public void Enqueue(T item) { }
+        public System.Collections.Generic.IEnumerator<T> GetEnumerator() { throw null; }
+        bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryAdd(T item) { throw null; }
+        bool System.Collections.Concurrent.IProducerConsumerCollection<T>.TryTake([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T item) { throw null; }
+        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+        public T[] ToArray() { throw null; }
+        public bool TryDequeue([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
+        public bool TryPeek([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
+    }
+    public partial interface IProducerConsumerCollection<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.ICollection, System.Collections.IEnumerable
+    {
+        void CopyTo(T[] array, int index);
+        T[] ToArray();
+        bool TryAdd(T item);
+        bool TryTake([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T item);
+    }
+}
index aecb5df..9360971 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
   </PropertyGroup>
   <ItemGroup>
index 7a15ca7..1a994d7 100644 (file)
@@ -4,6 +4,7 @@
 // Changes to this file must follow the https://aka.ms/api-review process.
 // ------------------------------------------------------------------------------
 
+#if !BUILDING_CORELIB_REFERENCE
 namespace System.Collections
 {
     public sealed partial class BitArray : System.Collections.ICollection, System.Collections.IEnumerable, System.ICloneable
@@ -50,29 +51,117 @@ namespace System.Collections.Generic
         public static System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly<T>(this IList<T> list) { throw null; }
         public static System.Collections.ObjectModel.ReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary) where TKey : notnull { throw null; }
     }
-    public abstract partial class Comparer<T> : System.Collections.Generic.IComparer<T>, System.Collections.IComparer
+    public sealed partial class LinkedListNode<T>
     {
-        protected Comparer() { }
-        public static System.Collections.Generic.Comparer<T> Default { get { throw null; } }
-        public abstract int Compare(T? x, T? y);
-        public static System.Collections.Generic.Comparer<T> Create(System.Comparison<T> comparison) { throw null; }
-        int System.Collections.IComparer.Compare(object? x, object? y) { throw null; }
+        public LinkedListNode(T value) { }
+        public System.Collections.Generic.LinkedList<T>? List { get { throw null; } }
+        public System.Collections.Generic.LinkedListNode<T>? Next { get { throw null; } }
+        public System.Collections.Generic.LinkedListNode<T>? Previous { get { throw null; } }
+        public T Value { get { throw null; } set { } }
+        public ref T ValueRef { get { throw null; } }
     }
-    public partial class Dictionary<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IDictionary<TKey, TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable where TKey : notnull
+    public partial class LinkedList<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
     {
-        public Dictionary() { }
-        public Dictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary) { }
-        public Dictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary, System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
-        public Dictionary(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> collection) { }
-        public Dictionary(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> collection, System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
-        public Dictionary(System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
-        public Dictionary(int capacity) { }
-        public Dictionary(int capacity, System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
-        protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public System.Collections.Generic.IEqualityComparer<TKey> Comparer { get { throw null; } }
+        public LinkedList() { }
+        public LinkedList(System.Collections.Generic.IEnumerable<T> collection) { }
+        protected LinkedList(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public int Count { get { throw null; } }
+        public System.Collections.Generic.LinkedListNode<T>? First { get { throw null; } }
+        public System.Collections.Generic.LinkedListNode<T>? Last { get { throw null; } }
+        bool System.Collections.Generic.ICollection<T>.IsReadOnly { get { throw null; } }
+        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
+        object System.Collections.ICollection.SyncRoot { get { throw null; } }
+        public void AddAfter(System.Collections.Generic.LinkedListNode<T> node, System.Collections.Generic.LinkedListNode<T> newNode) { }
+        public System.Collections.Generic.LinkedListNode<T> AddAfter(System.Collections.Generic.LinkedListNode<T> node, T value) { throw null; }
+        public void AddBefore(System.Collections.Generic.LinkedListNode<T> node, System.Collections.Generic.LinkedListNode<T> newNode) { }
+        public System.Collections.Generic.LinkedListNode<T> AddBefore(System.Collections.Generic.LinkedListNode<T> node, T value) { throw null; }
+        public void AddFirst(System.Collections.Generic.LinkedListNode<T> node) { }
+        public System.Collections.Generic.LinkedListNode<T> AddFirst(T value) { throw null; }
+        public void AddLast(System.Collections.Generic.LinkedListNode<T> node) { }
+        public System.Collections.Generic.LinkedListNode<T> AddLast(T value) { throw null; }
+        public void Clear() { }
+        public bool Contains(T value) { throw null; }
+        public void CopyTo(T[] array, int index) { }
+        public System.Collections.Generic.LinkedListNode<T>? Find(T value) { throw null; }
+        public System.Collections.Generic.LinkedListNode<T>? FindLast(T value) { throw null; }
+        public System.Collections.Generic.LinkedList<T>.Enumerator GetEnumerator() { throw null; }
+        public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public virtual void OnDeserialization(object? sender) { }
+        public void Remove(System.Collections.Generic.LinkedListNode<T> node) { }
+        public bool Remove(T value) { throw null; }
+        public void RemoveFirst() { }
+        public void RemoveLast() { }
+        void System.Collections.Generic.ICollection<T>.Add(T value) { }
+        System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
+        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+        public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
+        {
+            private T _current;
+            private object _dummy;
+            private int _dummyPrimitive;
+            public T Current { get { throw null; } }
+            object? System.Collections.IEnumerator.Current { get { throw null; } }
+            public void Dispose() { }
+            public bool MoveNext() { throw null; }
+            void System.Collections.IEnumerator.Reset() { }
+            void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object? sender) { }
+            void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        }
+    }
+    public partial class PriorityQueue<TElement, TPriority>
+    {
+        public PriorityQueue() { }
+        public PriorityQueue(System.Collections.Generic.IComparer<TPriority>? comparer) { }
+        public PriorityQueue(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items) { }
+        public PriorityQueue(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items, System.Collections.Generic.IComparer<TPriority>? comparer) { }
+        public PriorityQueue(int initialCapacity) { }
+        public PriorityQueue(int initialCapacity, System.Collections.Generic.IComparer<TPriority>? comparer) { }
+        public System.Collections.Generic.IComparer<TPriority> Comparer { get { throw null; } }
+        public int Count { get { throw null; } }
+        public System.Collections.Generic.PriorityQueue<TElement, TPriority>.UnorderedItemsCollection UnorderedItems { get { throw null; } }
+        public void Clear() { }
+        public TElement Dequeue() { throw null; }
+        public void Enqueue(TElement element, TPriority priority) { }
+        public TElement EnqueueDequeue(TElement element, TPriority priority) { throw null; }
+        public void EnqueueRange(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items) { }
+        public void EnqueueRange(System.Collections.Generic.IEnumerable<TElement> elements, TPriority priority) { }
+        public int EnsureCapacity(int capacity) { throw null; }
+        public TElement Peek() { throw null; }
+        public void TrimExcess() { }
+        public bool TryDequeue([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TElement element, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TPriority priority) { throw null; }
+        public bool TryPeek([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TElement element, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TPriority priority) { throw null; }
+        public sealed partial class UnorderedItemsCollection : System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)>, System.Collections.Generic.IReadOnlyCollection<(TElement Element, TPriority Priority)>, System.Collections.ICollection, System.Collections.IEnumerable
+        {
+            internal UnorderedItemsCollection(PriorityQueue<TElement, TPriority> queue) { }
+            public int Count { get { throw null; } }
+            bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
+            object System.Collections.ICollection.SyncRoot { get { throw null; } }
+            void ICollection.CopyTo(System.Array array, int index) { }
+            public System.Collections.Generic.PriorityQueue<TElement, TPriority>.UnorderedItemsCollection.Enumerator GetEnumerator() { throw null; }
+            System.Collections.Generic.IEnumerator<(TElement Element, TPriority Priority)> System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)>.GetEnumerator() { throw null; }
+            System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+            public partial struct Enumerator : System.Collections.Generic.IEnumerator<(TElement Element, TPriority Priority)>, System.Collections.IEnumerator, System.IDisposable
+            {
+                (TElement Element, TPriority Priority) IEnumerator<(TElement Element, TPriority Priority)>.Current { get { throw null; } }
+                public void Dispose() { }
+                public bool MoveNext() { throw null; }
+                public (TElement Element, TPriority Priority) Current { get { throw null; } }
+                object System.Collections.IEnumerator.Current { get { throw null; } }
+                void System.Collections.IEnumerator.Reset() { }
+            }
+        }
+    }
+    public partial class SortedDictionary<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IDictionary<TKey, TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable where TKey : notnull
+    {
+        public SortedDictionary() { }
+        public SortedDictionary(System.Collections.Generic.IComparer<TKey>? comparer) { }
+        public SortedDictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary) { }
+        public SortedDictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary, System.Collections.Generic.IComparer<TKey>? comparer) { }
+        public System.Collections.Generic.IComparer<TKey> Comparer { get { throw null; } }
         public int Count { get { throw null; } }
         public TValue this[TKey key] { get { throw null; } set { } }
-        public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection Keys { get { throw null; } }
+        public System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyCollection Keys { get { throw null; } }
         bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.IsReadOnly { get { throw null; } }
         System.Collections.Generic.ICollection<TKey> System.Collections.Generic.IDictionary<TKey, TValue>.Keys { get { throw null; } }
         System.Collections.Generic.ICollection<TValue> System.Collections.Generic.IDictionary<TKey, TValue>.Values { get { throw null; } }
@@ -85,20 +174,16 @@ namespace System.Collections.Generic
         object? System.Collections.IDictionary.this[object key] { get { throw null; } set { } }
         System.Collections.ICollection System.Collections.IDictionary.Keys { get { throw null; } }
         System.Collections.ICollection System.Collections.IDictionary.Values { get { throw null; } }
-        public System.Collections.Generic.Dictionary<TKey, TValue>.ValueCollection Values { get { throw null; } }
+        public System.Collections.Generic.SortedDictionary<TKey, TValue>.ValueCollection Values { get { throw null; } }
         public void Add(TKey key, TValue value) { }
         public void Clear() { }
         public bool ContainsKey(TKey key) { throw null; }
         public bool ContainsValue(TValue value) { throw null; }
-        public int EnsureCapacity(int capacity) { throw null; }
-        public System.Collections.Generic.Dictionary<TKey, TValue>.Enumerator GetEnumerator() { throw null; }
-        public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public virtual void OnDeserialization(object? sender) { }
+        public void CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int index) { }
+        public System.Collections.Generic.SortedDictionary<TKey, TValue>.Enumerator GetEnumerator() { throw null; }
         public bool Remove(TKey key) { throw null; }
-        public bool Remove(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
         void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Add(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { }
         bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Contains(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
-        void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int index) { }
         bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Remove(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
         System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>.GetEnumerator() { throw null; }
         void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
@@ -107,9 +192,6 @@ namespace System.Collections.Generic
         System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() { throw null; }
         void System.Collections.IDictionary.Remove(object key) { }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        public void TrimExcess() { }
-        public void TrimExcess(int capacity) { }
-        public bool TryAdd(TKey key, TValue value) { throw null; }
         public bool TryGetValue(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
         public partial struct Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IDictionaryEnumerator, System.Collections.IEnumerator, System.IDisposable
         {
@@ -126,13 +208,13 @@ namespace System.Collections.Generic
         }
         public sealed partial class KeyCollection : System.Collections.Generic.ICollection<TKey>, System.Collections.Generic.IEnumerable<TKey>, System.Collections.Generic.IReadOnlyCollection<TKey>, System.Collections.ICollection, System.Collections.IEnumerable
         {
-            public KeyCollection(System.Collections.Generic.Dictionary<TKey, TValue> dictionary) { }
+            public KeyCollection(System.Collections.Generic.SortedDictionary<TKey, TValue> dictionary) { }
             public int Count { get { throw null; } }
             bool System.Collections.Generic.ICollection<TKey>.IsReadOnly { get { throw null; } }
             bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
             object System.Collections.ICollection.SyncRoot { get { throw null; } }
             public void CopyTo(TKey[] array, int index) { }
-            public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
+            public System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
             void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
             void System.Collections.Generic.ICollection<TKey>.Clear() { }
             bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
@@ -142,7 +224,6 @@ namespace System.Collections.Generic
             System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
             public partial struct Enumerator : System.Collections.Generic.IEnumerator<TKey>, System.Collections.IEnumerator, System.IDisposable
             {
-                private TKey _currentKey;
                 private object _dummy;
                 private int _dummyPrimitive;
                 public TKey Current { get { throw null; } }
@@ -154,13 +235,13 @@ namespace System.Collections.Generic
         }
         public sealed partial class ValueCollection : System.Collections.Generic.ICollection<TValue>, System.Collections.Generic.IEnumerable<TValue>, System.Collections.Generic.IReadOnlyCollection<TValue>, System.Collections.ICollection, System.Collections.IEnumerable
         {
-            public ValueCollection(System.Collections.Generic.Dictionary<TKey, TValue> dictionary) { }
+            public ValueCollection(System.Collections.Generic.SortedDictionary<TKey, TValue> dictionary) { }
             public int Count { get { throw null; } }
             bool System.Collections.Generic.ICollection<TValue>.IsReadOnly { get { throw null; } }
             bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
             object System.Collections.ICollection.SyncRoot { get { throw null; } }
             public void CopyTo(TValue[] array, int index) { }
-            public System.Collections.Generic.Dictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator() { throw null; }
+            public System.Collections.Generic.SortedDictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator() { throw null; }
             void System.Collections.Generic.ICollection<TValue>.Add(TValue item) { }
             void System.Collections.Generic.ICollection<TValue>.Clear() { }
             bool System.Collections.Generic.ICollection<TValue>.Contains(TValue item) { throw null; }
@@ -170,7 +251,6 @@ namespace System.Collections.Generic
             System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
             public partial struct Enumerator : System.Collections.Generic.IEnumerator<TValue>, System.Collections.IEnumerator, System.IDisposable
             {
-                private TValue _currentValue;
                 private object _dummy;
                 private int _dummyPrimitive;
                 public TValue Current { get { throw null; } }
@@ -181,114 +261,106 @@ namespace System.Collections.Generic
             }
         }
     }
-    public abstract partial class EqualityComparer<T> : System.Collections.Generic.IEqualityComparer<T>, System.Collections.IEqualityComparer
+    public partial class SortedList<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IDictionary<TKey, TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable where TKey : notnull
     {
-        protected EqualityComparer() { }
-        public static System.Collections.Generic.EqualityComparer<T> Default { get { throw null; } }
-        public abstract bool Equals(T? x, T? y);
-        public abstract int GetHashCode([System.Diagnostics.CodeAnalysis.DisallowNullAttribute] T obj);
-        bool System.Collections.IEqualityComparer.Equals(object? x, object? y) { throw null; }
-        int System.Collections.IEqualityComparer.GetHashCode(object obj) { throw null; }
+        public SortedList() { }
+        public SortedList(System.Collections.Generic.IComparer<TKey>? comparer) { }
+        public SortedList(System.Collections.Generic.IDictionary<TKey, TValue> dictionary) { }
+        public SortedList(System.Collections.Generic.IDictionary<TKey, TValue> dictionary, System.Collections.Generic.IComparer<TKey>? comparer) { }
+        public SortedList(int capacity) { }
+        public SortedList(int capacity, System.Collections.Generic.IComparer<TKey>? comparer) { }
+        public int Capacity { get { throw null; } set { } }
+        public System.Collections.Generic.IComparer<TKey> Comparer { get { throw null; } }
+        public int Count { get { throw null; } }
+        public TValue this[TKey key] { get { throw null; } set { } }
+        public System.Collections.Generic.IList<TKey> Keys { get { throw null; } }
+        bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.IsReadOnly { get { throw null; } }
+        System.Collections.Generic.ICollection<TKey> System.Collections.Generic.IDictionary<TKey, TValue>.Keys { get { throw null; } }
+        System.Collections.Generic.ICollection<TValue> System.Collections.Generic.IDictionary<TKey, TValue>.Values { get { throw null; } }
+        System.Collections.Generic.IEnumerable<TKey> System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>.Keys { get { throw null; } }
+        System.Collections.Generic.IEnumerable<TValue> System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>.Values { get { throw null; } }
+        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
+        object System.Collections.ICollection.SyncRoot { get { throw null; } }
+        bool System.Collections.IDictionary.IsFixedSize { get { throw null; } }
+        bool System.Collections.IDictionary.IsReadOnly { get { throw null; } }
+        object? System.Collections.IDictionary.this[object key] { get { throw null; } set { } }
+        System.Collections.ICollection System.Collections.IDictionary.Keys { get { throw null; } }
+        System.Collections.ICollection System.Collections.IDictionary.Values { get { throw null; } }
+        public System.Collections.Generic.IList<TValue> Values { get { throw null; } }
+        public void Add(TKey key, TValue value) { }
+        public void Clear() { }
+        public bool ContainsKey(TKey key) { throw null; }
+        public bool ContainsValue(TValue value) { throw null; }
+        public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> GetEnumerator() { throw null; }
+        public TKey GetKeyAtIndex(int index) { throw null; }
+        public TValue GetValueAtIndex(int index) { throw null; }
+        public int IndexOfKey(TKey key) { throw null; }
+        public int IndexOfValue(TValue value) { throw null; }
+        public bool Remove(TKey key) { throw null; }
+        public void RemoveAt(int index) { }
+        public void SetValueAtIndex(int index, TValue value) { }
+        void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Add(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { }
+        bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Contains(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
+        void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int arrayIndex) { }
+        bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Remove(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
+        System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>.GetEnumerator() { throw null; }
+        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
+        void System.Collections.IDictionary.Add(object key, object? value) { }
+        bool System.Collections.IDictionary.Contains(object key) { throw null; }
+        System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() { throw null; }
+        void System.Collections.IDictionary.Remove(object key) { }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+        public void TrimExcess() { }
+        public bool TryGetValue(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
     }
-    public partial class HashSet<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.ISet<T>, System.Collections.Generic.IReadOnlySet<T>, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
+    public partial class SortedSet<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.ISet<T>, System.Collections.Generic.IReadOnlySet<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
     {
-        public HashSet() { }
-        public HashSet(System.Collections.Generic.IEnumerable<T> collection) { }
-        public HashSet(System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IEqualityComparer<T>? comparer) { }
-        public HashSet(System.Collections.Generic.IEqualityComparer<T>? comparer) { }
-        public HashSet(int capacity) { }
-        public HashSet(int capacity, System.Collections.Generic.IEqualityComparer<T>? comparer) { }
-        protected HashSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public System.Collections.Generic.IEqualityComparer<T> Comparer { get { throw null; } }
+        public SortedSet() { }
+        public SortedSet(System.Collections.Generic.IComparer<T>? comparer) { }
+        public SortedSet(System.Collections.Generic.IEnumerable<T> collection) { }
+        public SortedSet(System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IComparer<T>? comparer) { }
+        protected SortedSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public System.Collections.Generic.IComparer<T> Comparer { get { throw null; } }
         public int Count { get { throw null; } }
+        public T? Max { get { throw null; } }
+        public T? Min { get { throw null; } }
         bool System.Collections.Generic.ICollection<T>.IsReadOnly { get { throw null; } }
+        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
+        object System.Collections.ICollection.SyncRoot { get { throw null; } }
         public bool Add(T item) { throw null; }
-        public void Clear() { }
-        public bool Contains(T item) { throw null; }
+        public virtual void Clear() { }
+        public virtual bool Contains(T item) { throw null; }
         public void CopyTo(T[] array) { }
-        public void CopyTo(T[] array, int arrayIndex) { }
-        public void CopyTo(T[] array, int arrayIndex, int count) { }
-        public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.HashSet<T>> CreateSetComparer() { throw null; }
-        public int EnsureCapacity(int capacity) { throw null; }
+        public void CopyTo(T[] array, int index) { }
+        public void CopyTo(T[] array, int index, int count) { }
+        public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.SortedSet<T>> CreateSetComparer() { throw null; }
+        public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.SortedSet<T>> CreateSetComparer(System.Collections.Generic.IEqualityComparer<T>? memberEqualityComparer) { throw null; }
         public void ExceptWith(System.Collections.Generic.IEnumerable<T> other) { }
-        public System.Collections.Generic.HashSet<T>.Enumerator GetEnumerator() { throw null; }
-        public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public void IntersectWith(System.Collections.Generic.IEnumerable<T> other) { }
+        public System.Collections.Generic.SortedSet<T>.Enumerator GetEnumerator() { throw null; }
+        protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public virtual System.Collections.Generic.SortedSet<T> GetViewBetween(T? lowerValue, T? upperValue) { throw null; }
+        public virtual void IntersectWith(System.Collections.Generic.IEnumerable<T> other) { }
         public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsSubsetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
-        public virtual void OnDeserialization(object? sender) { }
+        protected virtual void OnDeserialization(object? sender) { }
         public bool Overlaps(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool Remove(T item) { throw null; }
         public int RemoveWhere(System.Predicate<T> match) { throw null; }
+        public System.Collections.Generic.IEnumerable<T> Reverse() { throw null; }
         public bool SetEquals(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public void SymmetricExceptWith(System.Collections.Generic.IEnumerable<T> other) { }
         void System.Collections.Generic.ICollection<T>.Add(T item) { }
         System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
+        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        public void TrimExcess() { }
+        void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object? sender) { }
+        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
         public bool TryGetValue(T equalValue, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T actualValue) { throw null; }
         public void UnionWith(System.Collections.Generic.IEnumerable<T> other) { }
-        public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
-        {
-            private T _current;
-            private object _dummy;
-            private int _dummyPrimitive;
-            public T Current { get { throw null; } }
-            object? System.Collections.IEnumerator.Current { get { throw null; } }
-            public void Dispose() { }
-            public bool MoveNext() { throw null; }
-            void System.Collections.IEnumerator.Reset() { }
-        }
-    }
-    public sealed partial class LinkedListNode<T>
-    {
-        public LinkedListNode(T value) { }
-        public System.Collections.Generic.LinkedList<T>? List { get { throw null; } }
-        public System.Collections.Generic.LinkedListNode<T>? Next { get { throw null; } }
-        public System.Collections.Generic.LinkedListNode<T>? Previous { get { throw null; } }
-        public T Value { get { throw null; } set { } }
-        public ref T ValueRef { get { throw null; } }
-    }
-    public partial class LinkedList<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
-    {
-        public LinkedList() { }
-        public LinkedList(System.Collections.Generic.IEnumerable<T> collection) { }
-        protected LinkedList(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public int Count { get { throw null; } }
-        public System.Collections.Generic.LinkedListNode<T>? First { get { throw null; } }
-        public System.Collections.Generic.LinkedListNode<T>? Last { get { throw null; } }
-        bool System.Collections.Generic.ICollection<T>.IsReadOnly { get { throw null; } }
-        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
-        object System.Collections.ICollection.SyncRoot { get { throw null; } }
-        public void AddAfter(System.Collections.Generic.LinkedListNode<T> node, System.Collections.Generic.LinkedListNode<T> newNode) { }
-        public System.Collections.Generic.LinkedListNode<T> AddAfter(System.Collections.Generic.LinkedListNode<T> node, T value) { throw null; }
-        public void AddBefore(System.Collections.Generic.LinkedListNode<T> node, System.Collections.Generic.LinkedListNode<T> newNode) { }
-        public System.Collections.Generic.LinkedListNode<T> AddBefore(System.Collections.Generic.LinkedListNode<T> node, T value) { throw null; }
-        public void AddFirst(System.Collections.Generic.LinkedListNode<T> node) { }
-        public System.Collections.Generic.LinkedListNode<T> AddFirst(T value) { throw null; }
-        public void AddLast(System.Collections.Generic.LinkedListNode<T> node) { }
-        public System.Collections.Generic.LinkedListNode<T> AddLast(T value) { throw null; }
-        public void Clear() { }
-        public bool Contains(T value) { throw null; }
-        public void CopyTo(T[] array, int index) { }
-        public System.Collections.Generic.LinkedListNode<T>? Find(T value) { throw null; }
-        public System.Collections.Generic.LinkedListNode<T>? FindLast(T value) { throw null; }
-        public System.Collections.Generic.LinkedList<T>.Enumerator GetEnumerator() { throw null; }
-        public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public virtual void OnDeserialization(object? sender) { }
-        public void Remove(System.Collections.Generic.LinkedListNode<T> node) { }
-        public bool Remove(T value) { throw null; }
-        public void RemoveFirst() { }
-        public void RemoveLast() { }
-        void System.Collections.Generic.ICollection<T>.Add(T value) { }
-        System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
-        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
         public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
         {
-            private T _current;
             private object _dummy;
             private int _dummyPrimitive;
             public T Current { get { throw null; } }
@@ -300,155 +372,29 @@ namespace System.Collections.Generic
             void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
         }
     }
-    public partial class List<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList
+    public partial class Stack<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
     {
-        public List() { }
-        public List(System.Collections.Generic.IEnumerable<T> collection) { }
-        public List(int capacity) { }
-        public int Capacity { get { throw null; } set { } }
+        public Stack() { }
+        public Stack(System.Collections.Generic.IEnumerable<T> collection) { }
+        public Stack(int capacity) { }
         public int Count { get { throw null; } }
-        public T this[int index] { get { throw null; } set { } }
-        bool System.Collections.Generic.ICollection<T>.IsReadOnly { get { throw null; } }
         bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
         object System.Collections.ICollection.SyncRoot { get { throw null; } }
-        bool System.Collections.IList.IsFixedSize { get { throw null; } }
-        bool System.Collections.IList.IsReadOnly { get { throw null; } }
-        object? System.Collections.IList.this[int index] { get { throw null; } set { } }
-        public void Add(T item) { }
-        public void AddRange(System.Collections.Generic.IEnumerable<T> collection) { }
-        public System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly() { throw null; }
-        public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer<T>? comparer) { throw null; }
-        public int BinarySearch(T item) { throw null; }
-        public int BinarySearch(T item, System.Collections.Generic.IComparer<T>? comparer) { throw null; }
         public void Clear() { }
         public bool Contains(T item) { throw null; }
-        public System.Collections.Generic.List<TOutput> ConvertAll<TOutput>(System.Converter<T, TOutput> converter) { throw null; }
-        public void CopyTo(int index, T[] array, int arrayIndex, int count) { }
-        public void CopyTo(T[] array) { }
         public void CopyTo(T[] array, int arrayIndex) { }
-        public int EnsureCapacity(int capacity) { throw null; }
-        public bool Exists(System.Predicate<T> match) { throw null; }
-        public T? Find(System.Predicate<T> match) { throw null; }
-        public System.Collections.Generic.List<T> FindAll(System.Predicate<T> match) { throw null; }
-        public int FindIndex(int startIndex, int count, System.Predicate<T> match) { throw null; }
-        public int FindIndex(int startIndex, System.Predicate<T> match) { throw null; }
-        public int FindIndex(System.Predicate<T> match) { throw null; }
-        public T? FindLast(System.Predicate<T> match) { throw null; }
-        public int FindLastIndex(int startIndex, int count, System.Predicate<T> match) { throw null; }
-        public int FindLastIndex(int startIndex, System.Predicate<T> match) { throw null; }
-        public int FindLastIndex(System.Predicate<T> match) { throw null; }
-        public void ForEach(System.Action<T> action) { }
-        public System.Collections.Generic.List<T>.Enumerator GetEnumerator() { throw null; }
-        public System.Collections.Generic.List<T> GetRange(int index, int count) { throw null; }
-        public int IndexOf(T item) { throw null; }
-        public int IndexOf(T item, int index) { throw null; }
-        public int IndexOf(T item, int index, int count) { throw null; }
-        public void Insert(int index, T item) { }
-        public void InsertRange(int index, System.Collections.Generic.IEnumerable<T> collection) { }
-        public int LastIndexOf(T item) { throw null; }
-        public int LastIndexOf(T item, int index) { throw null; }
-        public int LastIndexOf(T item, int index, int count) { throw null; }
-        public bool Remove(T item) { throw null; }
-        public int RemoveAll(System.Predicate<T> match) { throw null; }
-        public void RemoveAt(int index) { }
-        public void RemoveRange(int index, int count) { }
-        public void Reverse() { }
-        public void Reverse(int index, int count) { }
-        public void Sort() { }
-        public void Sort(System.Collections.Generic.IComparer<T>? comparer) { }
-        public void Sort(System.Comparison<T> comparison) { }
-        public void Sort(int index, int count, System.Collections.Generic.IComparer<T>? comparer) { }
+        public System.Collections.Generic.Stack<T>.Enumerator GetEnumerator() { throw null; }
+        public T Peek() { throw null; }
+        public T Pop() { throw null; }
+        public void Push(T item) { }
         System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
         void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) { }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        int System.Collections.IList.Add(object? item) { throw null; }
-        bool System.Collections.IList.Contains(object? item) { throw null; }
-        int System.Collections.IList.IndexOf(object? item) { throw null; }
-        void System.Collections.IList.Insert(int index, object? item) { }
-        void System.Collections.IList.Remove(object? item) { }
-        public T[] ToArray() { throw null; }
-        public void TrimExcess() { }
-        public bool TrueForAll(System.Predicate<T> match) { throw null; }
-        public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
-        {
-            private T _current;
-            private object _dummy;
-            private int _dummyPrimitive;
-            public T Current { get { throw null; } }
-            object? System.Collections.IEnumerator.Current { get { throw null; } }
-            public void Dispose() { }
-            public bool MoveNext() { throw null; }
-            void System.Collections.IEnumerator.Reset() { }
-        }
-    }
-
-    public partial class PriorityQueue<TElement, TPriority>
-    {
-        public PriorityQueue() { }
-        public PriorityQueue(System.Collections.Generic.IComparer<TPriority>? comparer) { }
-        public PriorityQueue(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items) { }
-        public PriorityQueue(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items, System.Collections.Generic.IComparer<TPriority>? comparer) { }
-        public PriorityQueue(int initialCapacity) { }
-        public PriorityQueue(int initialCapacity, System.Collections.Generic.IComparer<TPriority>? comparer) { }
-        public System.Collections.Generic.IComparer<TPriority> Comparer { get { throw null; } }
-        public int Count { get { throw null; } }
-        public System.Collections.Generic.PriorityQueue<TElement, TPriority>.UnorderedItemsCollection UnorderedItems { get { throw null; } }
-        public void Clear() { }
-        public TElement Dequeue() { throw null; }
-        public void Enqueue(TElement element, TPriority priority) { }
-        public TElement EnqueueDequeue(TElement element, TPriority priority) { throw null; }
-        public void EnqueueRange(System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)> items) { }
-        public void EnqueueRange(System.Collections.Generic.IEnumerable<TElement> elements, TPriority priority) { }
         public int EnsureCapacity(int capacity) { throw null; }
-        public TElement Peek() { throw null; }
-        public void TrimExcess() { }
-        public bool TryDequeue([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TElement element, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TPriority priority) { throw null; }
-        public bool TryPeek([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TElement element, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TPriority priority) { throw null; }
-        public sealed partial class UnorderedItemsCollection : System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)>, System.Collections.Generic.IReadOnlyCollection<(TElement Element, TPriority Priority)>, System.Collections.ICollection, System.Collections.IEnumerable
-        {
-            internal UnorderedItemsCollection(PriorityQueue<TElement, TPriority> queue) { }
-            public int Count { get { throw null; } }
-            bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
-            object System.Collections.ICollection.SyncRoot { get { throw null; } }
-            void ICollection.CopyTo(System.Array array, int index) { }
-            public System.Collections.Generic.PriorityQueue<TElement, TPriority>.UnorderedItemsCollection.Enumerator GetEnumerator() { throw null; }
-            System.Collections.Generic.IEnumerator<(TElement Element, TPriority Priority)> System.Collections.Generic.IEnumerable<(TElement Element, TPriority Priority)>.GetEnumerator() { throw null; }
-            System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-            public partial struct Enumerator : System.Collections.Generic.IEnumerator<(TElement Element, TPriority Priority)>, System.Collections.IEnumerator, System.IDisposable
-            {
-                (TElement Element, TPriority Priority) IEnumerator<(TElement Element, TPriority Priority)>.Current { get { throw null; } }
-                public void Dispose() { }
-                public bool MoveNext() { throw null; }
-                public (TElement Element, TPriority Priority) Current { get { throw null; } }
-                object System.Collections.IEnumerator.Current { get { throw null; } }
-                void System.Collections.IEnumerator.Reset() { }
-            }
-        }
-    }
-
-    public partial class Queue<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
-    {
-        public Queue() { }
-        public Queue(System.Collections.Generic.IEnumerable<T> collection) { }
-        public Queue(int capacity) { }
-        public int Count { get { throw null; } }
-        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
-        object System.Collections.ICollection.SyncRoot { get { throw null; } }
-        public void Clear() { }
-        public bool Contains(T item) { throw null; }
-        public void CopyTo(T[] array, int arrayIndex) { }
-        public T Dequeue() { throw null; }
-        public void Enqueue(T item) { }
-        public System.Collections.Generic.Queue<T>.Enumerator GetEnumerator() { throw null; }
-        public T Peek() { throw null; }
-        System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
-        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
         public T[] ToArray() { throw null; }
         public void TrimExcess() { }
-        public int EnsureCapacity(int capacity) { throw null; }
-        public bool TryDequeue([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
         public bool TryPeek([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
+        public bool TryPop([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
         public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
         {
             private T _currentElement;
@@ -461,23 +407,33 @@ namespace System.Collections.Generic
             void System.Collections.IEnumerator.Reset() { }
         }
     }
-    public sealed class ReferenceEqualityComparer : System.Collections.Generic.IEqualityComparer<object?>, System.Collections.IEqualityComparer
+}
+#endif // !BUILDING_CORELIB_REFERENCE
+namespace System.Collections.Generic
+{
+    public abstract partial class Comparer<T> : System.Collections.Generic.IComparer<T>, System.Collections.IComparer
     {
-        private ReferenceEqualityComparer() { }
-        public static System.Collections.Generic.ReferenceEqualityComparer Instance { get { throw null; } }
-        public new bool Equals(object? x, object? y) { throw null; }
-        public int GetHashCode(object? obj) { throw null; }
+        protected Comparer() { }
+        public static System.Collections.Generic.Comparer<T> Default { get { throw null; } }
+        public abstract int Compare(T? x, T? y);
+        public static System.Collections.Generic.Comparer<T> Create(System.Comparison<T> comparison) { throw null; }
+        int System.Collections.IComparer.Compare(object? x, object? y) { throw null; }
     }
-    public partial class SortedDictionary<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IDictionary<TKey, TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable where TKey : notnull
+    public partial class Dictionary<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IDictionary<TKey, TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable where TKey : notnull
     {
-        public SortedDictionary() { }
-        public SortedDictionary(System.Collections.Generic.IComparer<TKey>? comparer) { }
-        public SortedDictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary) { }
-        public SortedDictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary, System.Collections.Generic.IComparer<TKey>? comparer) { }
-        public System.Collections.Generic.IComparer<TKey> Comparer { get { throw null; } }
+        public Dictionary() { }
+        public Dictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary) { }
+        public Dictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary, System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
+        public Dictionary(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> collection) { }
+        public Dictionary(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>> collection, System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
+        public Dictionary(System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
+        public Dictionary(int capacity) { }
+        public Dictionary(int capacity, System.Collections.Generic.IEqualityComparer<TKey>? comparer) { }
+        protected Dictionary(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public System.Collections.Generic.IEqualityComparer<TKey> Comparer { get { throw null; } }
         public int Count { get { throw null; } }
         public TValue this[TKey key] { get { throw null; } set { } }
-        public System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyCollection Keys { get { throw null; } }
+        public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection Keys { get { throw null; } }
         bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.IsReadOnly { get { throw null; } }
         System.Collections.Generic.ICollection<TKey> System.Collections.Generic.IDictionary<TKey, TValue>.Keys { get { throw null; } }
         System.Collections.Generic.ICollection<TValue> System.Collections.Generic.IDictionary<TKey, TValue>.Values { get { throw null; } }
@@ -490,16 +446,20 @@ namespace System.Collections.Generic
         object? System.Collections.IDictionary.this[object key] { get { throw null; } set { } }
         System.Collections.ICollection System.Collections.IDictionary.Keys { get { throw null; } }
         System.Collections.ICollection System.Collections.IDictionary.Values { get { throw null; } }
-        public System.Collections.Generic.SortedDictionary<TKey, TValue>.ValueCollection Values { get { throw null; } }
+        public System.Collections.Generic.Dictionary<TKey, TValue>.ValueCollection Values { get { throw null; } }
         public void Add(TKey key, TValue value) { }
         public void Clear() { }
         public bool ContainsKey(TKey key) { throw null; }
         public bool ContainsValue(TValue value) { throw null; }
-        public void CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int index) { }
-        public System.Collections.Generic.SortedDictionary<TKey, TValue>.Enumerator GetEnumerator() { throw null; }
+        public int EnsureCapacity(int capacity) { throw null; }
+        public System.Collections.Generic.Dictionary<TKey, TValue>.Enumerator GetEnumerator() { throw null; }
+        public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public virtual void OnDeserialization(object? sender) { }
         public bool Remove(TKey key) { throw null; }
+        public bool Remove(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
         void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Add(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { }
         bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Contains(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
+        void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int index) { }
         bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Remove(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
         System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>.GetEnumerator() { throw null; }
         void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
@@ -508,6 +468,9 @@ namespace System.Collections.Generic
         System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() { throw null; }
         void System.Collections.IDictionary.Remove(object key) { }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+        public void TrimExcess() { }
+        public void TrimExcess(int capacity) { }
+        public bool TryAdd(TKey key, TValue value) { throw null; }
         public bool TryGetValue(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
         public partial struct Enumerator : System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.IDictionaryEnumerator, System.Collections.IEnumerator, System.IDisposable
         {
@@ -524,13 +487,13 @@ namespace System.Collections.Generic
         }
         public sealed partial class KeyCollection : System.Collections.Generic.ICollection<TKey>, System.Collections.Generic.IEnumerable<TKey>, System.Collections.Generic.IReadOnlyCollection<TKey>, System.Collections.ICollection, System.Collections.IEnumerable
         {
-            public KeyCollection(System.Collections.Generic.SortedDictionary<TKey, TValue> dictionary) { }
+            public KeyCollection(System.Collections.Generic.Dictionary<TKey, TValue> dictionary) { }
             public int Count { get { throw null; } }
             bool System.Collections.Generic.ICollection<TKey>.IsReadOnly { get { throw null; } }
             bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
             object System.Collections.ICollection.SyncRoot { get { throw null; } }
             public void CopyTo(TKey[] array, int index) { }
-            public System.Collections.Generic.SortedDictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
+            public System.Collections.Generic.Dictionary<TKey, TValue>.KeyCollection.Enumerator GetEnumerator() { throw null; }
             void System.Collections.Generic.ICollection<TKey>.Add(TKey item) { }
             void System.Collections.Generic.ICollection<TKey>.Clear() { }
             bool System.Collections.Generic.ICollection<TKey>.Contains(TKey item) { throw null; }
@@ -540,6 +503,7 @@ namespace System.Collections.Generic
             System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
             public partial struct Enumerator : System.Collections.Generic.IEnumerator<TKey>, System.Collections.IEnumerator, System.IDisposable
             {
+                private TKey _currentKey;
                 private object _dummy;
                 private int _dummyPrimitive;
                 public TKey Current { get { throw null; } }
@@ -551,13 +515,13 @@ namespace System.Collections.Generic
         }
         public sealed partial class ValueCollection : System.Collections.Generic.ICollection<TValue>, System.Collections.Generic.IEnumerable<TValue>, System.Collections.Generic.IReadOnlyCollection<TValue>, System.Collections.ICollection, System.Collections.IEnumerable
         {
-            public ValueCollection(System.Collections.Generic.SortedDictionary<TKey, TValue> dictionary) { }
+            public ValueCollection(System.Collections.Generic.Dictionary<TKey, TValue> dictionary) { }
             public int Count { get { throw null; } }
             bool System.Collections.Generic.ICollection<TValue>.IsReadOnly { get { throw null; } }
             bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
             object System.Collections.ICollection.SyncRoot { get { throw null; } }
             public void CopyTo(TValue[] array, int index) { }
-            public System.Collections.Generic.SortedDictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator() { throw null; }
+            public System.Collections.Generic.Dictionary<TKey, TValue>.ValueCollection.Enumerator GetEnumerator() { throw null; }
             void System.Collections.Generic.ICollection<TValue>.Add(TValue item) { }
             void System.Collections.Generic.ICollection<TValue>.Clear() { }
             bool System.Collections.Generic.ICollection<TValue>.Contains(TValue item) { throw null; }
@@ -567,6 +531,7 @@ namespace System.Collections.Generic
             System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
             public partial struct Enumerator : System.Collections.Generic.IEnumerator<TValue>, System.Collections.IEnumerator, System.IDisposable
             {
+                private TValue _currentValue;
                 private object _dummy;
                 private int _dummyPrimitive;
                 public TValue Current { get { throw null; } }
@@ -577,106 +542,58 @@ namespace System.Collections.Generic
             }
         }
     }
-    public partial class SortedList<TKey, TValue> : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IDictionary<TKey, TValue>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>, System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable where TKey : notnull
+    public abstract partial class EqualityComparer<T> : System.Collections.Generic.IEqualityComparer<T>, System.Collections.IEqualityComparer
     {
-        public SortedList() { }
-        public SortedList(System.Collections.Generic.IComparer<TKey>? comparer) { }
-        public SortedList(System.Collections.Generic.IDictionary<TKey, TValue> dictionary) { }
-        public SortedList(System.Collections.Generic.IDictionary<TKey, TValue> dictionary, System.Collections.Generic.IComparer<TKey>? comparer) { }
-        public SortedList(int capacity) { }
-        public SortedList(int capacity, System.Collections.Generic.IComparer<TKey>? comparer) { }
-        public int Capacity { get { throw null; } set { } }
-        public System.Collections.Generic.IComparer<TKey> Comparer { get { throw null; } }
-        public int Count { get { throw null; } }
-        public TValue this[TKey key] { get { throw null; } set { } }
-        public System.Collections.Generic.IList<TKey> Keys { get { throw null; } }
-        bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.IsReadOnly { get { throw null; } }
-        System.Collections.Generic.ICollection<TKey> System.Collections.Generic.IDictionary<TKey, TValue>.Keys { get { throw null; } }
-        System.Collections.Generic.ICollection<TValue> System.Collections.Generic.IDictionary<TKey, TValue>.Values { get { throw null; } }
-        System.Collections.Generic.IEnumerable<TKey> System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>.Keys { get { throw null; } }
-        System.Collections.Generic.IEnumerable<TValue> System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>.Values { get { throw null; } }
-        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
-        object System.Collections.ICollection.SyncRoot { get { throw null; } }
-        bool System.Collections.IDictionary.IsFixedSize { get { throw null; } }
-        bool System.Collections.IDictionary.IsReadOnly { get { throw null; } }
-        object? System.Collections.IDictionary.this[object key] { get { throw null; } set { } }
-        System.Collections.ICollection System.Collections.IDictionary.Keys { get { throw null; } }
-        System.Collections.ICollection System.Collections.IDictionary.Values { get { throw null; } }
-        public System.Collections.Generic.IList<TValue> Values { get { throw null; } }
-        public void Add(TKey key, TValue value) { }
-        public void Clear() { }
-        public bool ContainsKey(TKey key) { throw null; }
-        public bool ContainsValue(TValue value) { throw null; }
-        public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> GetEnumerator() { throw null; }
-        public TKey GetKeyAtIndex(int index) { throw null; }
-        public TValue GetValueAtIndex(int index) { throw null; }
-        public int IndexOfKey(TKey key) { throw null; }
-        public int IndexOfValue(TValue value) { throw null; }
-        public bool Remove(TKey key) { throw null; }
-        public void RemoveAt(int index) { }
-        public void SetValueAtIndex(int index, TValue value) { }
-        void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Add(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { }
-        bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Contains(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
-        void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.CopyTo(System.Collections.Generic.KeyValuePair<TKey, TValue>[] array, int arrayIndex) { }
-        bool System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey, TValue>>.Remove(System.Collections.Generic.KeyValuePair<TKey, TValue> keyValuePair) { throw null; }
-        System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey, TValue>>.GetEnumerator() { throw null; }
-        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
-        void System.Collections.IDictionary.Add(object key, object? value) { }
-        bool System.Collections.IDictionary.Contains(object key) { throw null; }
-        System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() { throw null; }
-        void System.Collections.IDictionary.Remove(object key) { }
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        public void TrimExcess() { }
-        public bool TryGetValue(TKey key, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out TValue value) { throw null; }
+        protected EqualityComparer() { }
+        public static System.Collections.Generic.EqualityComparer<T> Default { get { throw null; } }
+        public abstract bool Equals(T? x, T? y);
+        public abstract int GetHashCode([System.Diagnostics.CodeAnalysis.DisallowNullAttribute] T obj);
+        bool System.Collections.IEqualityComparer.Equals(object? x, object? y) { throw null; }
+        int System.Collections.IEqualityComparer.GetHashCode(object obj) { throw null; }
     }
-    public partial class SortedSet<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.ISet<T>, System.Collections.Generic.IReadOnlySet<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
+    public partial class HashSet<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.ISet<T>, System.Collections.Generic.IReadOnlySet<T>, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
     {
-        public SortedSet() { }
-        public SortedSet(System.Collections.Generic.IComparer<T>? comparer) { }
-        public SortedSet(System.Collections.Generic.IEnumerable<T> collection) { }
-        public SortedSet(System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IComparer<T>? comparer) { }
-        protected SortedSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public System.Collections.Generic.IComparer<T> Comparer { get { throw null; } }
+        public HashSet() { }
+        public HashSet(System.Collections.Generic.IEnumerable<T> collection) { }
+        public HashSet(System.Collections.Generic.IEnumerable<T> collection, System.Collections.Generic.IEqualityComparer<T>? comparer) { }
+        public HashSet(System.Collections.Generic.IEqualityComparer<T>? comparer) { }
+        public HashSet(int capacity) { }
+        public HashSet(int capacity, System.Collections.Generic.IEqualityComparer<T>? comparer) { }
+        protected HashSet(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public System.Collections.Generic.IEqualityComparer<T> Comparer { get { throw null; } }
         public int Count { get { throw null; } }
-        public T? Max { get { throw null; } }
-        public T? Min { get { throw null; } }
         bool System.Collections.Generic.ICollection<T>.IsReadOnly { get { throw null; } }
-        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
-        object System.Collections.ICollection.SyncRoot { get { throw null; } }
         public bool Add(T item) { throw null; }
-        public virtual void Clear() { }
-        public virtual bool Contains(T item) { throw null; }
+        public void Clear() { }
+        public bool Contains(T item) { throw null; }
         public void CopyTo(T[] array) { }
-        public void CopyTo(T[] array, int index) { }
-        public void CopyTo(T[] array, int index, int count) { }
-        public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.SortedSet<T>> CreateSetComparer() { throw null; }
-        public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.SortedSet<T>> CreateSetComparer(System.Collections.Generic.IEqualityComparer<T>? memberEqualityComparer) { throw null; }
+        public void CopyTo(T[] array, int arrayIndex) { }
+        public void CopyTo(T[] array, int arrayIndex, int count) { }
+        public static System.Collections.Generic.IEqualityComparer<System.Collections.Generic.HashSet<T>> CreateSetComparer() { throw null; }
+        public int EnsureCapacity(int capacity) { throw null; }
         public void ExceptWith(System.Collections.Generic.IEnumerable<T> other) { }
-        public System.Collections.Generic.SortedSet<T>.Enumerator GetEnumerator() { throw null; }
-        protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public virtual System.Collections.Generic.SortedSet<T> GetViewBetween(T? lowerValue, T? upperValue) { throw null; }
-        public virtual void IntersectWith(System.Collections.Generic.IEnumerable<T> other) { }
+        public System.Collections.Generic.HashSet<T>.Enumerator GetEnumerator() { throw null; }
+        public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public void IntersectWith(System.Collections.Generic.IEnumerable<T> other) { }
         public bool IsProperSubsetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsSubsetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
-        protected virtual void OnDeserialization(object? sender) { }
+        public virtual void OnDeserialization(object? sender) { }
         public bool Overlaps(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool Remove(T item) { throw null; }
         public int RemoveWhere(System.Predicate<T> match) { throw null; }
-        public System.Collections.Generic.IEnumerable<T> Reverse() { throw null; }
         public bool SetEquals(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public void SymmetricExceptWith(System.Collections.Generic.IEnumerable<T> other) { }
         void System.Collections.Generic.ICollection<T>.Add(T item) { }
         System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
-        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object? sender) { }
-        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public void TrimExcess() { }
         public bool TryGetValue(T equalValue, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T actualValue) { throw null; }
         public void UnionWith(System.Collections.Generic.IEnumerable<T> other) { }
-        public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable
+        public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
         {
+            private T _current;
             private object _dummy;
             private int _dummyPrimitive;
             public T Current { get { throw null; } }
@@ -684,33 +601,112 @@ namespace System.Collections.Generic
             public void Dispose() { }
             public bool MoveNext() { throw null; }
             void System.Collections.IEnumerator.Reset() { }
-            void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object? sender) { }
-            void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
         }
     }
-    public partial class Stack<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
+    public partial class List<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.Generic.IReadOnlyList<T>, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList
     {
-        public Stack() { }
-        public Stack(System.Collections.Generic.IEnumerable<T> collection) { }
-        public Stack(int capacity) { }
+        public List() { }
+        public List(System.Collections.Generic.IEnumerable<T> collection) { }
+        public List(int capacity) { }
+        public int Capacity { get { throw null; } set { } }
         public int Count { get { throw null; } }
+        public T this[int index] { get { throw null; } set { } }
+        bool System.Collections.Generic.ICollection<T>.IsReadOnly { get { throw null; } }
         bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
         object System.Collections.ICollection.SyncRoot { get { throw null; } }
+        bool System.Collections.IList.IsFixedSize { get { throw null; } }
+        bool System.Collections.IList.IsReadOnly { get { throw null; } }
+        object? System.Collections.IList.this[int index] { get { throw null; } set { } }
+        public void Add(T item) { }
+        public void AddRange(System.Collections.Generic.IEnumerable<T> collection) { }
+        public System.Collections.ObjectModel.ReadOnlyCollection<T> AsReadOnly() { throw null; }
+        public int BinarySearch(int index, int count, T item, System.Collections.Generic.IComparer<T>? comparer) { throw null; }
+        public int BinarySearch(T item) { throw null; }
+        public int BinarySearch(T item, System.Collections.Generic.IComparer<T>? comparer) { throw null; }
         public void Clear() { }
         public bool Contains(T item) { throw null; }
+        public System.Collections.Generic.List<TOutput> ConvertAll<TOutput>(System.Converter<T, TOutput> converter) { throw null; }
+        public void CopyTo(int index, T[] array, int arrayIndex, int count) { }
+        public void CopyTo(T[] array) { }
         public void CopyTo(T[] array, int arrayIndex) { }
-        public System.Collections.Generic.Stack<T>.Enumerator GetEnumerator() { throw null; }
-        public T Peek() { throw null; }
-        public T Pop() { throw null; }
-        public void Push(T item) { }
+        public int EnsureCapacity(int capacity) { throw null; }
+        public bool Exists(System.Predicate<T> match) { throw null; }
+        public T? Find(System.Predicate<T> match) { throw null; }
+        public System.Collections.Generic.List<T> FindAll(System.Predicate<T> match) { throw null; }
+        public int FindIndex(int startIndex, int count, System.Predicate<T> match) { throw null; }
+        public int FindIndex(int startIndex, System.Predicate<T> match) { throw null; }
+        public int FindIndex(System.Predicate<T> match) { throw null; }
+        public T? FindLast(System.Predicate<T> match) { throw null; }
+        public int FindLastIndex(int startIndex, int count, System.Predicate<T> match) { throw null; }
+        public int FindLastIndex(int startIndex, System.Predicate<T> match) { throw null; }
+        public int FindLastIndex(System.Predicate<T> match) { throw null; }
+        public void ForEach(System.Action<T> action) { }
+        public System.Collections.Generic.List<T>.Enumerator GetEnumerator() { throw null; }
+        public System.Collections.Generic.List<T> GetRange(int index, int count) { throw null; }
+        public int IndexOf(T item) { throw null; }
+        public int IndexOf(T item, int index) { throw null; }
+        public int IndexOf(T item, int index, int count) { throw null; }
+        public void Insert(int index, T item) { }
+        public void InsertRange(int index, System.Collections.Generic.IEnumerable<T> collection) { }
+        public int LastIndexOf(T item) { throw null; }
+        public int LastIndexOf(T item, int index) { throw null; }
+        public int LastIndexOf(T item, int index, int count) { throw null; }
+        public bool Remove(T item) { throw null; }
+        public int RemoveAll(System.Predicate<T> match) { throw null; }
+        public void RemoveAt(int index) { }
+        public void RemoveRange(int index, int count) { }
+        public void Reverse() { }
+        public void Reverse(int index, int count) { }
+        public void Sort() { }
+        public void Sort(System.Collections.Generic.IComparer<T>? comparer) { }
+        public void Sort(System.Comparison<T> comparison) { }
+        public void Sort(int index, int count, System.Collections.Generic.IComparer<T>? comparer) { }
         System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
         void System.Collections.ICollection.CopyTo(System.Array array, int arrayIndex) { }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
-        public int EnsureCapacity(int capacity) { throw null; }
+        int System.Collections.IList.Add(object? item) { throw null; }
+        bool System.Collections.IList.Contains(object? item) { throw null; }
+        int System.Collections.IList.IndexOf(object? item) { throw null; }
+        void System.Collections.IList.Insert(int index, object? item) { }
+        void System.Collections.IList.Remove(object? item) { }
+        public T[] ToArray() { throw null; }
+        public void TrimExcess() { }
+        public bool TrueForAll(System.Predicate<T> match) { throw null; }
+        public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
+        {
+            private T _current;
+            private object _dummy;
+            private int _dummyPrimitive;
+            public T Current { get { throw null; } }
+            object? System.Collections.IEnumerator.Current { get { throw null; } }
+            public void Dispose() { }
+            public bool MoveNext() { throw null; }
+            void System.Collections.IEnumerator.Reset() { }
+        }
+    }
+    public partial class Queue<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection, System.Collections.IEnumerable
+    {
+        public Queue() { }
+        public Queue(System.Collections.Generic.IEnumerable<T> collection) { }
+        public Queue(int capacity) { }
+        public int Count { get { throw null; } }
+        bool System.Collections.ICollection.IsSynchronized { get { throw null; } }
+        object System.Collections.ICollection.SyncRoot { get { throw null; } }
+        public void Clear() { }
+        public bool Contains(T item) { throw null; }
+        public void CopyTo(T[] array, int arrayIndex) { }
+        public T Dequeue() { throw null; }
+        public void Enqueue(T item) { }
+        public System.Collections.Generic.Queue<T>.Enumerator GetEnumerator() { throw null; }
+        public T Peek() { throw null; }
+        System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
+        void System.Collections.ICollection.CopyTo(System.Array array, int index) { }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
         public T[] ToArray() { throw null; }
         public void TrimExcess() { }
+        public int EnsureCapacity(int capacity) { throw null; }
+        public bool TryDequeue([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
         public bool TryPeek([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
-        public bool TryPop([System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T result) { throw null; }
         public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
         {
             private T _currentElement;
@@ -723,4 +719,11 @@ namespace System.Collections.Generic
             void System.Collections.IEnumerator.Reset() { }
         }
     }
+    public sealed class ReferenceEqualityComparer : System.Collections.Generic.IEqualityComparer<object?>, System.Collections.IEqualityComparer
+    {
+        private ReferenceEqualityComparer() { }
+        public static System.Collections.Generic.ReferenceEqualityComparer Instance { get { throw null; } }
+        public new bool Equals(object? x, object? y) { throw null; }
+        public int GetHashCode(object? obj) { throw null; }
+    }
 }
index 4d69208..7c570c8 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
   </PropertyGroup>
   <ItemGroup>
index b08220b..601c003 100644 (file)
@@ -1,10 +1,10 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <RootNamespace>System.Diagnostics.Tests</RootNamespace>
-    <IgnoreArchitectureMismatches>true</IgnoreArchitectureMismatches>
-    <ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
     <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix</TargetFrameworks>
     <TestRuntime>true</TestRuntime>
+    <!-- Some tests need types like System.Diagnostics.DebugProvider which are only exposed from System.Private.CoreLib -->
+    <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies>
   </PropertyGroup>
   <ItemGroup>
     <DefaultReferenceExclusion Include="System.Diagnostics.Debug" />
@@ -13,7 +13,7 @@
     <ProjectReference Include="$(CoreLibProject)" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
-    <ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" SkipUseReferenceAssembly="true" />
+    <ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="DebugTests.cs" />
index 60e755e..b53929e 100644 (file)
@@ -4,53 +4,7 @@
 // Changes to this file must follow the https://aka.ms/api-review process.
 // ------------------------------------------------------------------------------
 
-namespace System.Diagnostics
-{
-    public partial class StackFrame
-    {
-        public const int OFFSET_UNKNOWN = -1;
-        public StackFrame() { }
-        public StackFrame(bool needFileInfo) { }
-        public StackFrame(int skipFrames) { }
-        public StackFrame(int skipFrames, bool needFileInfo) { }
-        public StackFrame(string? fileName, int lineNumber) { }
-        public StackFrame(string? fileName, int lineNumber, int colNumber) { }
-        public virtual int GetFileColumnNumber() { throw null; }
-        public virtual int GetFileLineNumber() { throw null; }
-        public virtual string? GetFileName() { throw null; }
-        public virtual int GetILOffset() { throw null; }
-        [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Metadata for the method might be incomplete or removed")]
-        public virtual System.Reflection.MethodBase? GetMethod() { throw null; }
-        public virtual int GetNativeOffset() { throw null; }
-        public override string ToString() { throw null; }
-    }
-    public static partial class StackFrameExtensions
-    {
-        public static System.IntPtr GetNativeImageBase(this System.Diagnostics.StackFrame stackFrame) { throw null; }
-        public static System.IntPtr GetNativeIP(this System.Diagnostics.StackFrame stackFrame) { throw null; }
-        public static bool HasILOffset(this System.Diagnostics.StackFrame stackFrame) { throw null; }
-        public static bool HasMethod(this System.Diagnostics.StackFrame stackFrame) { throw null; }
-        public static bool HasNativeImage(this System.Diagnostics.StackFrame stackFrame) { throw null; }
-        public static bool HasSource(this System.Diagnostics.StackFrame stackFrame) { throw null; }
-    }
-    public partial class StackTrace
-    {
-        public const int METHODS_TO_SKIP = 0;
-        public StackTrace() { }
-        public StackTrace(bool fNeedFileInfo) { }
-        public StackTrace(System.Diagnostics.StackFrame frame) { }
-        public StackTrace(System.Exception e) { }
-        public StackTrace(System.Exception e, bool fNeedFileInfo) { }
-        public StackTrace(System.Exception e, int skipFrames) { }
-        public StackTrace(System.Exception e, int skipFrames, bool fNeedFileInfo) { }
-        public StackTrace(int skipFrames) { }
-        public StackTrace(int skipFrames, bool fNeedFileInfo) { }
-        public virtual int FrameCount { get { throw null; } }
-        public virtual System.Diagnostics.StackFrame? GetFrame(int index) { throw null; }
-        public virtual System.Diagnostics.StackFrame[] GetFrames() { throw null; }
-        public override string ToString() { throw null; }
-    }
-}
+#if !BUILDING_CORELIB_REFERENCE
 namespace System.Diagnostics.SymbolStore
 {
     public partial interface ISymbolBinder
@@ -75,11 +29,6 @@ namespace System.Diagnostics.SymbolStore
         byte[] GetCheckSum();
         byte[] GetSourceRange(int startLine, int startColumn, int endLine, int endColumn);
     }
-    public partial interface ISymbolDocumentWriter
-    {
-        void SetCheckSum(System.Guid algorithmId, byte[] checkSum);
-        void SetSource(byte[] source);
-    }
     public partial interface ISymbolMethod
     {
         System.Diagnostics.SymbolStore.ISymbolScope RootScope { get; }
@@ -207,3 +156,59 @@ namespace System.Diagnostics.SymbolStore
         public SymLanguageVendor() { }
     }
 }
+#endif // !BUILDING_CORELIB_REFERENCE
+namespace System.Diagnostics
+{
+    public partial class StackFrame
+    {
+        public const int OFFSET_UNKNOWN = -1;
+        public StackFrame() { }
+        public StackFrame(bool needFileInfo) { }
+        public StackFrame(int skipFrames) { }
+        public StackFrame(int skipFrames, bool needFileInfo) { }
+        public StackFrame(string? fileName, int lineNumber) { }
+        public StackFrame(string? fileName, int lineNumber, int colNumber) { }
+        public virtual int GetFileColumnNumber() { throw null; }
+        public virtual int GetFileLineNumber() { throw null; }
+        public virtual string? GetFileName() { throw null; }
+        public virtual int GetILOffset() { throw null; }
+        [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Metadata for the method might be incomplete or removed")]
+        public virtual System.Reflection.MethodBase? GetMethod() { throw null; }
+        public virtual int GetNativeOffset() { throw null; }
+        public override string ToString() { throw null; }
+    }
+    public static partial class StackFrameExtensions
+    {
+        public static System.IntPtr GetNativeImageBase(this System.Diagnostics.StackFrame stackFrame) { throw null; }
+        public static System.IntPtr GetNativeIP(this System.Diagnostics.StackFrame stackFrame) { throw null; }
+        public static bool HasILOffset(this System.Diagnostics.StackFrame stackFrame) { throw null; }
+        public static bool HasMethod(this System.Diagnostics.StackFrame stackFrame) { throw null; }
+        public static bool HasNativeImage(this System.Diagnostics.StackFrame stackFrame) { throw null; }
+        public static bool HasSource(this System.Diagnostics.StackFrame stackFrame) { throw null; }
+    }
+    public partial class StackTrace
+    {
+        public const int METHODS_TO_SKIP = 0;
+        public StackTrace() { }
+        public StackTrace(bool fNeedFileInfo) { }
+        public StackTrace(System.Diagnostics.StackFrame frame) { }
+        public StackTrace(System.Exception e) { }
+        public StackTrace(System.Exception e, bool fNeedFileInfo) { }
+        public StackTrace(System.Exception e, int skipFrames) { }
+        public StackTrace(System.Exception e, int skipFrames, bool fNeedFileInfo) { }
+        public StackTrace(int skipFrames) { }
+        public StackTrace(int skipFrames, bool fNeedFileInfo) { }
+        public virtual int FrameCount { get { throw null; } }
+        public virtual System.Diagnostics.StackFrame? GetFrame(int index) { throw null; }
+        public virtual System.Diagnostics.StackFrame[] GetFrames() { throw null; }
+        public override string ToString() { throw null; }
+    }
+}
+namespace System.Diagnostics.SymbolStore
+{
+    public partial interface ISymbolDocumentWriter
+    {
+        void SetCheckSum(System.Guid algorithmId, byte[] checkSum);
+        void SetSource(byte[] source);
+    }
+}
index f168cde..dbc40ff 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
   </PropertyGroup>
   <ItemGroup>
index d5f2617..1311ef1 100644 (file)
@@ -1,9 +1,4 @@
 Compat issues with assembly System.Diagnostics.Tracing:
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Diagnostics.Tracing.DiagnosticCounter' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Diagnostics.Tracing.EventCounter' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Diagnostics.Tracing.IncrementingEventCounter' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Diagnostics.Tracing.IncrementingPollingCounter' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Diagnostics.Tracing.PollingCounter' in the contract but not the implementation.
 MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
 CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
 CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
index 49a3f30..a08b302 100644 (file)
@@ -6,4 +6,10 @@
   <ItemGroup>
     <ProjectReference Include="$(CoreLibProject)" />
   </ItemGroup>
+  <ItemGroup Condition="'$(WasmEnableThreads)' == 'true' or '$(WasmEnablePerfTracing)' == 'true'">
+    <!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
+         but this contract still does since we only expose the wasm threading through System.Diagnostics.Tracing.WebAssembly.PerfTracing
+         so we need to baseline the ApiCompat errors related to that -->
+    <ApiCompatBaselineFile Include="ApiCompatBaseline.Tracing.txt" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
index 8207698..86eb011 100644 (file)
@@ -4,6 +4,190 @@
 // Changes to this file must follow the https://aka.ms/api-review process.
 // ------------------------------------------------------------------------------
 
+#if !BUILDING_CORELIB_REFERENCE
+namespace System
+{
+    public readonly partial struct SequencePosition : System.IEquatable<System.SequencePosition>
+    {
+        private readonly object _dummy;
+        private readonly int _dummyPrimitive;
+        public SequencePosition(object? @object, int integer) { throw null; }
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public bool Equals(System.SequencePosition other) { throw null; }
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        public override int GetHashCode() { throw null; }
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        public int GetInteger() { throw null; }
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        public object? GetObject() { throw null; }
+    }
+}
+namespace System.Buffers
+{
+    public sealed partial class ArrayBufferWriter<T> : System.Buffers.IBufferWriter<T>
+    {
+        public ArrayBufferWriter() { }
+        public ArrayBufferWriter(int initialCapacity) { }
+        public int Capacity { get { throw null; } }
+        public int FreeCapacity { get { throw null; } }
+        public int WrittenCount { get { throw null; } }
+        public System.ReadOnlyMemory<T> WrittenMemory { get { throw null; } }
+        public System.ReadOnlySpan<T> WrittenSpan { get { throw null; } }
+        public void Advance(int count) { }
+        public void Clear() { }
+        public System.Memory<T> GetMemory(int sizeHint = 0) { throw null; }
+        public System.Span<T> GetSpan(int sizeHint = 0) { throw null; }
+    }
+    public static partial class BuffersExtensions
+    {
+        public static void CopyTo<T>(this in System.Buffers.ReadOnlySequence<T> source, System.Span<T> destination) { }
+        public static System.SequencePosition? PositionOf<T>(this in System.Buffers.ReadOnlySequence<T> source, T value) where T : System.IEquatable<T> { throw null; }
+        public static T[] ToArray<T>(this in System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
+        public static void Write<T>(this System.Buffers.IBufferWriter<T> writer, System.ReadOnlySpan<T> value) { }
+    }
+    public partial interface IBufferWriter<T>
+    {
+        void Advance(int count);
+        System.Memory<T> GetMemory(int sizeHint = 0);
+        System.Span<T> GetSpan(int sizeHint = 0);
+    }
+    public abstract partial class MemoryPool<T> : System.IDisposable
+    {
+        protected MemoryPool() { }
+        public abstract int MaxBufferSize { get; }
+        public static System.Buffers.MemoryPool<T> Shared { get { throw null; } }
+        public void Dispose() { }
+        protected abstract void Dispose(bool disposing);
+        public abstract System.Buffers.IMemoryOwner<T> Rent(int minBufferSize = -1);
+    }
+    public abstract partial class ReadOnlySequenceSegment<T>
+    {
+        protected ReadOnlySequenceSegment() { }
+        public System.ReadOnlyMemory<T> Memory { get { throw null; } protected set { } }
+        public System.Buffers.ReadOnlySequenceSegment<T>? Next { get { throw null; } protected set { } }
+        public long RunningIndex { get { throw null; } protected set { } }
+    }
+    public readonly partial struct ReadOnlySequence<T>
+    {
+        private readonly object _dummy;
+        private readonly int _dummyPrimitive;
+        public static readonly System.Buffers.ReadOnlySequence<T> Empty;
+        public ReadOnlySequence(System.Buffers.ReadOnlySequenceSegment<T> startSegment, int startIndex, System.Buffers.ReadOnlySequenceSegment<T> endSegment, int endIndex) { throw null; }
+        public ReadOnlySequence(System.ReadOnlyMemory<T> memory) { throw null; }
+        public ReadOnlySequence(T[] array) { throw null; }
+        public ReadOnlySequence(T[] array, int start, int length) { throw null; }
+        public System.SequencePosition End { get { throw null; } }
+        public System.ReadOnlyMemory<T> First { get { throw null; } }
+        public System.ReadOnlySpan<T> FirstSpan { get { throw null; } }
+        public bool IsEmpty { get { throw null; } }
+        public bool IsSingleSegment { get { throw null; } }
+        public long Length { get { throw null; } }
+        public System.SequencePosition Start { get { throw null; } }
+        public System.Buffers.ReadOnlySequence<T>.Enumerator GetEnumerator() { throw null; }
+        public long GetOffset(System.SequencePosition position) { throw null; }
+        public System.SequencePosition GetPosition(long offset) { throw null; }
+        public System.SequencePosition GetPosition(long offset, System.SequencePosition origin) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(int start, int length) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(int start, System.SequencePosition end) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(long start) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(long start, long length) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(long start, System.SequencePosition end) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start, int length) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start, long length) { throw null; }
+        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start, System.SequencePosition end) { throw null; }
+        public override string ToString() { throw null; }
+        public bool TryGet(ref System.SequencePosition position, out System.ReadOnlyMemory<T> memory, bool advance = true) { throw null; }
+        public partial struct Enumerator
+        {
+            private object _dummy;
+            private int _dummyPrimitive;
+            public Enumerator(in System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
+            public System.ReadOnlyMemory<T> Current { get { throw null; } }
+            public bool MoveNext() { throw null; }
+        }
+    }
+    public static partial class SequenceReaderExtensions
+    {
+        public static bool TryReadBigEndian(this ref System.Buffers.SequenceReader<byte> reader, out short value) { throw null; }
+        public static bool TryReadBigEndian(this ref System.Buffers.SequenceReader<byte> reader, out int value) { throw null; }
+        public static bool TryReadBigEndian(this ref System.Buffers.SequenceReader<byte> reader, out long value) { throw null; }
+        public static bool TryReadLittleEndian(this ref System.Buffers.SequenceReader<byte> reader, out short value) { throw null; }
+        public static bool TryReadLittleEndian(this ref System.Buffers.SequenceReader<byte> reader, out int value) { throw null; }
+        public static bool TryReadLittleEndian(this ref System.Buffers.SequenceReader<byte> reader, out long value) { throw null; }
+    }
+    public ref partial struct SequenceReader<T> where T : unmanaged, System.IEquatable<T>
+    {
+        private object _dummy;
+        private int _dummyPrimitive;
+        public SequenceReader(System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
+        public readonly long Consumed { get { throw null; } }
+        public readonly System.ReadOnlySpan<T> CurrentSpan { get { throw null; } }
+        public readonly int CurrentSpanIndex { get { throw null; } }
+        public readonly bool End { get { throw null; } }
+        public readonly long Length { get { throw null; } }
+        public readonly System.SequencePosition Position { get { throw null; } }
+        public readonly long Remaining { get { throw null; } }
+        public readonly System.Buffers.ReadOnlySequence<T> Sequence { get { throw null; } }
+        public readonly System.Buffers.ReadOnlySequence<T> UnreadSequence { get { throw null; } }
+        public readonly System.ReadOnlySpan<T> UnreadSpan { get { throw null; } }
+        public void Advance(long count) { }
+        public long AdvancePast(T value) { throw null; }
+        public long AdvancePastAny(scoped System.ReadOnlySpan<T> values) { throw null; }
+        public long AdvancePastAny(T value0, T value1) { throw null; }
+        public long AdvancePastAny(T value0, T value1, T value2) { throw null; }
+        public long AdvancePastAny(T value0, T value1, T value2, T value3) { throw null; }
+        public void AdvanceToEnd() { throw null; }
+        public bool IsNext(scoped System.ReadOnlySpan<T> next, bool advancePast = false) { throw null; }
+        public bool IsNext(T next, bool advancePast = false) { throw null; }
+        public void Rewind(long count) { }
+        public bool TryAdvanceTo(T delimiter, bool advancePastDelimiter = true) { throw null; }
+        public bool TryAdvanceToAny(scoped System.ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) { throw null; }
+        public readonly bool TryCopyTo(System.Span<T> destination) { throw null; }
+        public readonly bool TryPeek(out T value) { throw null; }
+        public readonly bool TryPeek(long offset, out T value) { throw null; }
+        public bool TryRead(out T value) { throw null; }
+        public bool TryReadTo(out System.Buffers.ReadOnlySequence<T> sequence, scoped System.ReadOnlySpan<T> delimiter, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadTo(out System.Buffers.ReadOnlySequence<T> sequence, T delimiter, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadTo(out System.Buffers.ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadTo(out System.ReadOnlySpan<T> span, scoped System.ReadOnlySpan<T> delimiter, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadTo(out System.ReadOnlySpan<T> span, T delimiter, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadTo(out System.ReadOnlySpan<T> span, T delimiter, T delimiterEscape, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadToAny(out System.Buffers.ReadOnlySequence<T> sequence, scoped System.ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadToAny(out System.ReadOnlySpan<T> span, scoped System.ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) { throw null; }
+        public bool TryReadExact(int count, out System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
+    }
+}
+namespace System.Runtime.InteropServices
+{
+    public static partial class SequenceMarshal
+    {
+        public static bool TryGetArray<T>(System.Buffers.ReadOnlySequence<T> sequence, out System.ArraySegment<T> segment) { throw null; }
+        public static bool TryGetReadOnlyMemory<T>(System.Buffers.ReadOnlySequence<T> sequence, out System.ReadOnlyMemory<T> memory) { throw null; }
+        public static bool TryGetReadOnlySequenceSegment<T>(System.Buffers.ReadOnlySequence<T> sequence, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Buffers.ReadOnlySequenceSegment<T>? startSegment, out int startIndex, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Buffers.ReadOnlySequenceSegment<T>? endSegment, out int endIndex) { throw null; }
+        public static bool TryRead<T>(ref System.Buffers.SequenceReader<byte> reader, out T value) where T : unmanaged { throw null; }
+    }
+}
+namespace System.Text
+{
+    public static partial class EncodingExtensions
+    {
+        public static void Convert(this System.Text.Decoder decoder, in System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer, bool flush, out long charsUsed, out bool completed) { throw null; }
+        public static void Convert(this System.Text.Decoder decoder, System.ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer, bool flush, out long charsUsed, out bool completed) { throw null; }
+        public static void Convert(this System.Text.Encoder encoder, in System.Buffers.ReadOnlySequence<char> chars, System.Buffers.IBufferWriter<byte> writer, bool flush, out long bytesUsed, out bool completed) { throw null; }
+        public static void Convert(this System.Text.Encoder encoder, System.ReadOnlySpan<char> chars, System.Buffers.IBufferWriter<byte> writer, bool flush, out long bytesUsed, out bool completed) { throw null; }
+        public static byte[] GetBytes(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<char> chars) { throw null; }
+        public static long GetBytes(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<char> chars, System.Buffers.IBufferWriter<byte> writer) { throw null; }
+        public static int GetBytes(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<char> chars, System.Span<byte> bytes) { throw null; }
+        public static long GetBytes(this System.Text.Encoding encoding, System.ReadOnlySpan<char> chars, System.Buffers.IBufferWriter<byte> writer) { throw null; }
+        public static long GetChars(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer) { throw null; }
+        public static int GetChars(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, System.Span<char> chars) { throw null; }
+        public static long GetChars(this System.Text.Encoding encoding, System.ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer) { throw null; }
+        public static string GetString(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes) { throw null; }
+    }
+}
+#endif // !BUILDING_CORELIB_REFERENCE
 namespace System
 {
     public static partial class MemoryExtensions
@@ -185,157 +369,9 @@ namespace System
             public bool AppendFormatted(string? value, int alignment = 0, string? format = null) { throw null; }
         }
     }
-    public readonly partial struct SequencePosition : System.IEquatable<System.SequencePosition>
-    {
-        private readonly object _dummy;
-        private readonly int _dummyPrimitive;
-        public SequencePosition(object? @object, int integer) { throw null; }
-        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
-        public bool Equals(System.SequencePosition other) { throw null; }
-        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-        public override int GetHashCode() { throw null; }
-        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-        public int GetInteger() { throw null; }
-        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-        public object? GetObject() { throw null; }
-    }
 }
 namespace System.Buffers
 {
-    public sealed partial class ArrayBufferWriter<T> : System.Buffers.IBufferWriter<T>
-    {
-        public ArrayBufferWriter() { }
-        public ArrayBufferWriter(int initialCapacity) { }
-        public int Capacity { get { throw null; } }
-        public int FreeCapacity { get { throw null; } }
-        public int WrittenCount { get { throw null; } }
-        public System.ReadOnlyMemory<T> WrittenMemory { get { throw null; } }
-        public System.ReadOnlySpan<T> WrittenSpan { get { throw null; } }
-        public void Advance(int count) { }
-        public void Clear() { }
-        public System.Memory<T> GetMemory(int sizeHint = 0) { throw null; }
-        public System.Span<T> GetSpan(int sizeHint = 0) { throw null; }
-    }
-    public static partial class BuffersExtensions
-    {
-        public static void CopyTo<T>(this in System.Buffers.ReadOnlySequence<T> source, System.Span<T> destination) { }
-        public static System.SequencePosition? PositionOf<T>(this in System.Buffers.ReadOnlySequence<T> source, T value) where T : System.IEquatable<T> { throw null; }
-        public static T[] ToArray<T>(this in System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
-        public static void Write<T>(this System.Buffers.IBufferWriter<T> writer, System.ReadOnlySpan<T> value) { }
-    }
-    public partial interface IBufferWriter<T>
-    {
-        void Advance(int count);
-        System.Memory<T> GetMemory(int sizeHint = 0);
-        System.Span<T> GetSpan(int sizeHint = 0);
-    }
-    public abstract partial class MemoryPool<T> : System.IDisposable
-    {
-        protected MemoryPool() { }
-        public abstract int MaxBufferSize { get; }
-        public static System.Buffers.MemoryPool<T> Shared { get { throw null; } }
-        public void Dispose() { }
-        protected abstract void Dispose(bool disposing);
-        public abstract System.Buffers.IMemoryOwner<T> Rent(int minBufferSize = -1);
-    }
-    public abstract partial class ReadOnlySequenceSegment<T>
-    {
-        protected ReadOnlySequenceSegment() { }
-        public System.ReadOnlyMemory<T> Memory { get { throw null; } protected set { } }
-        public System.Buffers.ReadOnlySequenceSegment<T>? Next { get { throw null; } protected set { } }
-        public long RunningIndex { get { throw null; } protected set { } }
-    }
-    public readonly partial struct ReadOnlySequence<T>
-    {
-        private readonly object _dummy;
-        private readonly int _dummyPrimitive;
-        public static readonly System.Buffers.ReadOnlySequence<T> Empty;
-        public ReadOnlySequence(System.Buffers.ReadOnlySequenceSegment<T> startSegment, int startIndex, System.Buffers.ReadOnlySequenceSegment<T> endSegment, int endIndex) { throw null; }
-        public ReadOnlySequence(System.ReadOnlyMemory<T> memory) { throw null; }
-        public ReadOnlySequence(T[] array) { throw null; }
-        public ReadOnlySequence(T[] array, int start, int length) { throw null; }
-        public System.SequencePosition End { get { throw null; } }
-        public System.ReadOnlyMemory<T> First { get { throw null; } }
-        public System.ReadOnlySpan<T> FirstSpan { get { throw null; } }
-        public bool IsEmpty { get { throw null; } }
-        public bool IsSingleSegment { get { throw null; } }
-        public long Length { get { throw null; } }
-        public System.SequencePosition Start { get { throw null; } }
-        public System.Buffers.ReadOnlySequence<T>.Enumerator GetEnumerator() { throw null; }
-        public long GetOffset(System.SequencePosition position) { throw null; }
-        public System.SequencePosition GetPosition(long offset) { throw null; }
-        public System.SequencePosition GetPosition(long offset, System.SequencePosition origin) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(int start, int length) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(int start, System.SequencePosition end) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(long start) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(long start, long length) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(long start, System.SequencePosition end) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start, int length) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start, long length) { throw null; }
-        public System.Buffers.ReadOnlySequence<T> Slice(System.SequencePosition start, System.SequencePosition end) { throw null; }
-        public override string ToString() { throw null; }
-        public bool TryGet(ref System.SequencePosition position, out System.ReadOnlyMemory<T> memory, bool advance = true) { throw null; }
-        public partial struct Enumerator
-        {
-            private object _dummy;
-            private int _dummyPrimitive;
-            public Enumerator(in System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
-            public System.ReadOnlyMemory<T> Current { get { throw null; } }
-            public bool MoveNext() { throw null; }
-        }
-    }
-    public static partial class SequenceReaderExtensions
-    {
-        public static bool TryReadBigEndian(this ref System.Buffers.SequenceReader<byte> reader, out short value) { throw null; }
-        public static bool TryReadBigEndian(this ref System.Buffers.SequenceReader<byte> reader, out int value) { throw null; }
-        public static bool TryReadBigEndian(this ref System.Buffers.SequenceReader<byte> reader, out long value) { throw null; }
-        public static bool TryReadLittleEndian(this ref System.Buffers.SequenceReader<byte> reader, out short value) { throw null; }
-        public static bool TryReadLittleEndian(this ref System.Buffers.SequenceReader<byte> reader, out int value) { throw null; }
-        public static bool TryReadLittleEndian(this ref System.Buffers.SequenceReader<byte> reader, out long value) { throw null; }
-    }
-    public ref partial struct SequenceReader<T> where T : unmanaged, System.IEquatable<T>
-    {
-        private object _dummy;
-        private int _dummyPrimitive;
-        public SequenceReader(System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
-        public readonly long Consumed { get { throw null; } }
-        public readonly System.ReadOnlySpan<T> CurrentSpan { get { throw null; } }
-        public readonly int CurrentSpanIndex { get { throw null; } }
-        public readonly bool End { get { throw null; } }
-        public readonly long Length { get { throw null; } }
-        public readonly System.SequencePosition Position { get { throw null; } }
-        public readonly long Remaining { get { throw null; } }
-        public readonly System.Buffers.ReadOnlySequence<T> Sequence { get { throw null; } }
-        public readonly System.Buffers.ReadOnlySequence<T> UnreadSequence { get { throw null; } }
-        public readonly System.ReadOnlySpan<T> UnreadSpan { get { throw null; } }
-        public void Advance(long count) { }
-        public long AdvancePast(T value) { throw null; }
-        public long AdvancePastAny(scoped System.ReadOnlySpan<T> values) { throw null; }
-        public long AdvancePastAny(T value0, T value1) { throw null; }
-        public long AdvancePastAny(T value0, T value1, T value2) { throw null; }
-        public long AdvancePastAny(T value0, T value1, T value2, T value3) { throw null; }
-        public void AdvanceToEnd() { throw null; }
-        public bool IsNext(scoped System.ReadOnlySpan<T> next, bool advancePast = false) { throw null; }
-        public bool IsNext(T next, bool advancePast = false) { throw null; }
-        public void Rewind(long count) { }
-        public bool TryAdvanceTo(T delimiter, bool advancePastDelimiter = true) { throw null; }
-        public bool TryAdvanceToAny(scoped System.ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) { throw null; }
-        public readonly bool TryCopyTo(System.Span<T> destination) { throw null; }
-        public readonly bool TryPeek(out T value) { throw null; }
-        public readonly bool TryPeek(long offset, out T value) { throw null; }
-        public bool TryRead(out T value) { throw null; }
-        public bool TryReadTo(out System.Buffers.ReadOnlySequence<T> sequence, scoped System.ReadOnlySpan<T> delimiter, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadTo(out System.Buffers.ReadOnlySequence<T> sequence, T delimiter, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadTo(out System.Buffers.ReadOnlySequence<T> sequence, T delimiter, T delimiterEscape, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadTo(out System.ReadOnlySpan<T> span, scoped System.ReadOnlySpan<T> delimiter, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadTo(out System.ReadOnlySpan<T> span, T delimiter, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadTo(out System.ReadOnlySpan<T> span, T delimiter, T delimiterEscape, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadToAny(out System.Buffers.ReadOnlySequence<T> sequence, scoped System.ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadToAny(out System.ReadOnlySpan<T> span, scoped System.ReadOnlySpan<T> delimiters, bool advancePastDelimiter = true) { throw null; }
-        public bool TryReadExact(int count, out System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
-    }
     public readonly partial struct StandardFormat : System.IEquatable<System.Buffers.StandardFormat>
     {
         private readonly int _dummyPrimitive;
@@ -521,7 +557,6 @@ namespace System.Buffers.Text
         public static bool TryParse(System.ReadOnlySpan<byte> source, out ulong value, out int bytesConsumed, char standardFormat = '\0') { throw null; }
     }
 }
-
 namespace System.Runtime.InteropServices
 {
     public static partial class MemoryMarshal
@@ -554,31 +589,9 @@ namespace System.Runtime.InteropServices
         public static bool TryWrite<T>(System.Span<byte> destination, ref T value) where T : struct { throw null; }
         public static void Write<T>(System.Span<byte> destination, ref T value) where T : struct { }
     }
-    public static partial class SequenceMarshal
-    {
-        public static bool TryGetArray<T>(System.Buffers.ReadOnlySequence<T> sequence, out System.ArraySegment<T> segment) { throw null; }
-        public static bool TryGetReadOnlyMemory<T>(System.Buffers.ReadOnlySequence<T> sequence, out System.ReadOnlyMemory<T> memory) { throw null; }
-        public static bool TryGetReadOnlySequenceSegment<T>(System.Buffers.ReadOnlySequence<T> sequence, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Buffers.ReadOnlySequenceSegment<T>? startSegment, out int startIndex, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Buffers.ReadOnlySequenceSegment<T>? endSegment, out int endIndex) { throw null; }
-        public static bool TryRead<T>(ref System.Buffers.SequenceReader<byte> reader, out T value) where T : unmanaged { throw null; }
-    }
 }
 namespace System.Text
 {
-    public static partial class EncodingExtensions
-    {
-        public static void Convert(this System.Text.Decoder decoder, in System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer, bool flush, out long charsUsed, out bool completed) { throw null; }
-        public static void Convert(this System.Text.Decoder decoder, System.ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer, bool flush, out long charsUsed, out bool completed) { throw null; }
-        public static void Convert(this System.Text.Encoder encoder, in System.Buffers.ReadOnlySequence<char> chars, System.Buffers.IBufferWriter<byte> writer, bool flush, out long bytesUsed, out bool completed) { throw null; }
-        public static void Convert(this System.Text.Encoder encoder, System.ReadOnlySpan<char> chars, System.Buffers.IBufferWriter<byte> writer, bool flush, out long bytesUsed, out bool completed) { throw null; }
-        public static byte[] GetBytes(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<char> chars) { throw null; }
-        public static long GetBytes(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<char> chars, System.Buffers.IBufferWriter<byte> writer) { throw null; }
-        public static int GetBytes(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<char> chars, System.Span<byte> bytes) { throw null; }
-        public static long GetBytes(this System.Text.Encoding encoding, System.ReadOnlySpan<char> chars, System.Buffers.IBufferWriter<byte> writer) { throw null; }
-        public static long GetChars(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, System.Buffers.IBufferWriter<char> writer) { throw null; }
-        public static int GetChars(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes, System.Span<char> chars) { throw null; }
-        public static long GetChars(this System.Text.Encoding encoding, System.ReadOnlySpan<byte> bytes, System.Buffers.IBufferWriter<char> writer) { throw null; }
-        public static string GetString(this System.Text.Encoding encoding, in System.Buffers.ReadOnlySequence<byte> bytes) { throw null; }
-    }
     public ref partial struct SpanLineEnumerator
     {
         private object _dummy;
index a250bb2..6124942 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
     <!-- ArrayBufferWriter is publicly exposed from the System.Memory ref and only it should define this constant as true.  -->
     <DefineConstants>$(DefineConstants);MAKE_ABW_PUBLIC</DefineConstants>
diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.cs b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.cs
new file mode 100644 (file)
index 0000000..84e99da
--- /dev/null
@@ -0,0 +1,39 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// NOTE: Types/members which are not publicly exposed in System.Runtime.dll but still used internally by libraries.
+//       Manually maintained, keep in sync with System.Private.CoreLib.ExtraApis.txt
+
+namespace System.Runtime.Serialization
+{
+    public readonly partial struct DeserializationToken : System.IDisposable
+    {
+        private readonly object _dummy;
+        private readonly int _dummyPrimitive;
+        internal DeserializationToken(object tracker) { }
+        public void Dispose() { }
+    }
+    public sealed partial class SerializationInfo
+    {
+        public static System.Runtime.Serialization.DeserializationToken StartDeserialization() { throw null; }
+    }
+}
+namespace System.Diagnostics
+{
+    public partial class DebugProvider
+    {
+        public DebugProvider() { }
+        [System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute]
+        public virtual void Fail(string? message, string? detailMessage) { throw null; }
+        public static void FailCore(string stackTrace, string? message, string? detailMessage, string errorSource) { }
+        public virtual void OnIndentLevelChanged(int indentLevel) { }
+        public virtual void OnIndentSizeChanged(int indentSize) { }
+        public virtual void Write(string? message) { }
+        public static void WriteCore(string message) { }
+        public virtual void WriteLine(string? message) { }
+    }
+    public static partial class Debug
+    {
+        public static System.Diagnostics.DebugProvider SetProvider(System.Diagnostics.DebugProvider provider) { throw null; }
+    }
+}
diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.txt b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ExtraApis.txt
new file mode 100644 (file)
index 0000000..0babd81
--- /dev/null
@@ -0,0 +1,7 @@
+# NOTE: Types/members which are not publicly exposed in System.Runtime.dll but still used internally by libraries.
+#       Manually maintained, keep in sync with System.Private.CoreLib.cs
+
+T:System.Runtime.Serialization.DeserializationToken
+M:System.Runtime.Serialization.SerializationInfo.StartDeserialization
+T:System.Diagnostics.DebugProvider
+M:System.Diagnostics.Debug.SetProvider(System.Diagnostics.DebugProvider)
diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.ManualShimTypeForwards.cs
new file mode 100644 (file)
index 0000000..504e689
--- /dev/null
@@ -0,0 +1,153 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// NOTE: Types/members which are not publicly exposed in System.Runtime.dll but are forwarded from the mscorlib.dll shim.
+//       Manually maintained.
+
+namespace System
+{
+    public sealed partial class CultureAwareComparer : System.StringComparer, System.Runtime.Serialization.ISerializable
+    {
+        internal CultureAwareComparer() { }
+        public override int Compare(string? x, string? y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override bool Equals(string? x, string? y) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode(string obj) { throw null; }
+        public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
+    public partial class OrdinalComparer : System.StringComparer
+    {
+        internal OrdinalComparer() { }
+        public override int Compare(string? x, string? y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override bool Equals(string? x, string? y) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode(string obj) { throw null; }
+    }
+    public sealed partial class UnitySerializationHolder : System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable
+    {
+        public UnitySerializationHolder(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public object GetRealObject(System.Runtime.Serialization.StreamingContext context) { throw null; }
+    }
+}
+namespace System.Collections
+{
+    public partial class ListDictionaryInternal : System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable
+    {
+        public ListDictionaryInternal() { }
+        public int Count { get { throw null; } }
+        public bool IsFixedSize { get { throw null; } }
+        public bool IsReadOnly { get { throw null; } }
+        public bool IsSynchronized { get { throw null; } }
+        public object? this[object key] { get { throw null; } set { } }
+        public System.Collections.ICollection Keys { get { throw null; } }
+        public object SyncRoot { get { throw null; } }
+        public System.Collections.ICollection Values { get { throw null; } }
+        public void Add(object key, object? value) { }
+        public void Clear() { }
+        public bool Contains(object key) { throw null; }
+        public void CopyTo(System.Array array, int index) { }
+        public System.Collections.IDictionaryEnumerator GetEnumerator() { throw null; }
+        public void Remove(object key) { }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+    }
+}
+namespace System.Collections.Generic
+{
+    public sealed partial class ByteEqualityComparer : System.Collections.Generic.EqualityComparer<byte>
+    {
+        public ByteEqualityComparer() { }
+        public override bool Equals(byte x, byte y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode(byte b) { throw null; }
+    }
+    public sealed partial class EnumEqualityComparer<T> : System.Collections.Generic.EqualityComparer<T>, System.Runtime.Serialization.ISerializable where T : struct
+    {
+        public EnumEqualityComparer() { }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override bool Equals(T x, T y) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode(T obj) { throw null; }
+        public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
+    public sealed partial class GenericComparer<T> : System.Collections.Generic.Comparer<T> where T : System.IComparable<T>
+    {
+        public GenericComparer() { }
+        public override int Compare(T? x, T? y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+    }
+    public sealed partial class GenericEqualityComparer<T> : System.Collections.Generic.EqualityComparer<T> where T : System.IEquatable<T>
+    {
+        public GenericEqualityComparer() { }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override bool Equals(T? x, T? y) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode([System.Diagnostics.CodeAnalysis.DisallowNullAttribute] T obj) { throw null; }
+    }
+    public partial class NonRandomizedStringEqualityComparer : System.Collections.Generic.IEqualityComparer<string?>, System.Runtime.Serialization.ISerializable
+    {
+        protected NonRandomizedStringEqualityComparer(System.Runtime.Serialization.SerializationInfo information, System.Runtime.Serialization.StreamingContext context) { }
+        public virtual bool Equals(string? x, string? y) { throw null; }
+        public virtual int GetHashCode(string? obj) { throw null; }
+        public static System.Collections.Generic.IEqualityComparer<string>? GetStringComparer(object? comparer) { throw null; }
+        public virtual System.Collections.Generic.IEqualityComparer<string?> GetUnderlyingEqualityComparer() { throw null; }
+        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
+    public sealed partial class NullableComparer<T> : System.Collections.Generic.Comparer<T?>, System.Runtime.Serialization.ISerializable where T : struct
+    {
+        public NullableComparer() { }
+        public override int Compare(T? x, T? y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
+    public sealed partial class NullableEqualityComparer<T> : System.Collections.Generic.EqualityComparer<T?>, System.Runtime.Serialization.ISerializable where T : struct
+    {
+        public NullableEqualityComparer() { }
+        public override bool Equals(T? x, T? y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode(T? obj) { throw null; }
+        public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
+    public sealed partial class ObjectComparer<T> : System.Collections.Generic.Comparer<T>
+    {
+        public ObjectComparer() { }
+        public override int Compare(T? x, T? y) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+    }
+    public sealed partial class ObjectEqualityComparer<T> : System.Collections.Generic.EqualityComparer<T>
+    {
+        public ObjectEqualityComparer() { }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public override bool Equals(T? x, T? y) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override int GetHashCode([System.Diagnostics.CodeAnalysis.DisallowNullAttribute] T obj) { throw null; }
+    }
+}
+namespace System.Diagnostics.Contracts
+{
+    public sealed partial class ContractException : System.Exception
+    {
+        public ContractException(System.Diagnostics.Contracts.ContractFailureKind kind, string? failure, string? userMessage, string? condition, System.Exception? innerException) { }
+        public string? Condition { get { throw null; } }
+        public string Failure { get { throw null; } }
+        public System.Diagnostics.Contracts.ContractFailureKind Kind { get { throw null; } }
+        public string? UserMessage { get { throw null; } }
+        public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+    }
+}
+namespace System.Reflection.Emit
+{
+    public enum PEFileKinds
+    {
+        Dll = 1,
+        ConsoleApplication = 2,
+        WindowApplication = 3,
+    }
+}
diff --git a/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.csproj b/src/libraries/System.Private.CoreLib/ref/System.Private.CoreLib.csproj
new file mode 100644 (file)
index 0000000..4130263
--- /dev/null
@@ -0,0 +1,54 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <!-- It is a core assembly because it defines System.Object so we need to pass RuntimeMetadataVersion to the compiler -->
+    <RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
+    <!-- disable warnings about obsolete APIs,
+        Remove warning disable when nullable attributes are respected,
+        Type has no accessible constructors which use only CLS-compliant types -->
+    <NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
+    <StrongNameKeyId>SilverlightPlatform</StrongNameKeyId>
+    <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
+    <FeatureWasmPerfTracing Condition="'$(WasmEnableThreads)' == 'true' or '$(WasmEnablePerfTracing)' == 'true'">true</FeatureWasmPerfTracing>
+    <FeatureWasmThreads Condition="'$(WasmEnableThreads)' == 'true'">true</FeatureWasmThreads>
+    <DefineConstants Condition="'$(FeatureWasmPerfTracing)' == 'true'">$(DefineConstants);FEATURE_WASM_PERFTRACING</DefineConstants>
+    <DefineConstants Condition="'$(FeatureWasmThreads)' == 'true'">$(DefineConstants);FEATURE_WASM_THREADS</DefineConstants>
+    <DefineConstants>$(DefineConstants);BUILDING_CORELIB_REFERENCE</DefineConstants>
+    <!-- Disable binplacing since the System.Private.CoreLib reference assembly is internal to our build and shouldn't be exposed anywhere -->
+    <EnableBinPlacing>false</EnableBinPlacing>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- contracts where all types were moved to CoreLib, these are used both here and in the contract assemblies and are generated -->
+    <Compile Include="..\..\Microsoft.Win32.Primitives\ref\Microsoft.Win32.Primitives.cs" />
+    <Compile Include="..\..\System.Diagnostics.Contracts\ref\System.Diagnostics.Contracts.cs" />
+    <Compile Include="..\..\System.Diagnostics.Tracing\ref\System.Diagnostics.Tracing.cs" />
+    <Compile Include="..\..\System.Diagnostics.Tracing\ref\System.Diagnostics.Tracing.Counters.cs" />
+    <Compile Include="..\..\System.Numerics.Vectors\ref\System.Numerics.Vectors.cs" />
+    <Compile Include="..\..\System.Reflection.Emit.ILGeneration\ref\System.Reflection.Emit.ILGeneration.cs" />
+    <Compile Include="..\..\System.Reflection.Emit.Lightweight\ref\System.Reflection.Emit.Lightweight.cs" />
+    <Compile Include="..\..\System.Reflection.Emit\ref\System.Reflection.Emit.cs" />
+    <Compile Include="..\..\System.Reflection.Primitives\ref\System.Reflection.Primitives.cs" />
+    <Compile Include="..\..\System.Runtime.Intrinsics\ref\System.Runtime.Intrinsics.cs" />
+    <Compile Include="..\..\System.Runtime.Loader\ref\System.Runtime.Loader.cs" />
+    <Compile Include="..\..\System.Runtime\ref\System.Runtime.cs" />
+    <Compile Include="..\..\System.Text.Encoding.Extensions\ref\System.Text.Encoding.Extensions.cs" />
+    <Compile Include="..\..\System.Threading.Overlapped\ref\System.Threading.Overlapped.cs" />
+    <Compile Include="..\..\System.Threading.ThreadPool\ref\System.Threading.ThreadPool.cs" />
+    <Compile Include="..\..\System.Threading.Thread\ref\System.Threading.Thread.cs" />
+  
+    <!-- contracts where types were partially moved to CoreLib, these are used both here and in the contract assemblies and are generated -->
+    <Compile Include="..\..\System.Collections.Concurrent\ref\System.Collections.Concurrent.cs" />
+    <Compile Include="..\..\System.Collections\ref\System.Collections.cs" />
+    <Compile Include="..\..\System.Diagnostics.StackTrace\ref\System.Diagnostics.StackTrace.cs" />
+    <Compile Include="..\..\System.Memory\ref\System.Memory.cs" />
+    <Compile Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.cs" />
+    <Compile Include="..\..\System.Threading\ref\System.Threading.cs" />
+
+    <!-- types only exposed through CoreLib, this is manually maintained -->
+    <Compile Include="System.Private.CoreLib.ExtraApis.cs" />
+
+    <!-- types not exposed in contracts but forwarded from the mscorlib shim, this is manually maintained -->
+    <Compile Include="System.Private.CoreLib.ManualShimTypeForwards.cs" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
index f248899..703738e 100644 (file)
@@ -7,6 +7,11 @@ using System.Threading;
 
 namespace System.Diagnostics.Tracing
 {
+#if !ES_BUILD_STANDALONE
+#if !FEATURE_WASM_PERFTRACING
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+#endif
+#endif
     internal sealed class CounterGroup
     {
         private readonly EventSource _eventSource;
index ee61216..3bbb7ec 100644 (file)
@@ -12,6 +12,11 @@ namespace System.Diagnostics.Tracing
     /// DiagnosticCounter is an abstract class that serves as the parent class for various Counter* classes,
     /// namely EventCounter, PollingCounter, IncrementingEventCounter, and IncrementingPollingCounter.
     /// </summary>
+#if !ES_BUILD_STANDALONE
+#if !FEATURE_WASM_PERFTRACING
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+#endif
+#endif
     public abstract class DiagnosticCounter : IDisposable
     {
         /// <summary>
index e21891c..1a46384 100644 (file)
@@ -16,6 +16,11 @@ namespace System.Diagnostics.Tracing
     /// See https://github.com/dotnet/runtime/blob/main/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs
     /// which shows tests, which are also useful in seeing actual use.
     /// </summary>
+#if !ES_BUILD_STANDALONE
+#if !FEATURE_WASM_PERFTRACING
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+#endif
+#endif
     public partial class EventCounter : DiagnosticCounter
     {
         /// <summary>
index 426b7df..3779b26 100644 (file)
@@ -12,6 +12,11 @@ namespace System.Diagnostics.Tracing
     /// It does not calculate statistics like mean, standard deviation, etc. because it only accumulates
     /// the counter value.
     /// </summary>
+#if !ES_BUILD_STANDALONE
+#if !FEATURE_WASM_PERFTRACING
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+#endif
+#endif
     public partial class IncrementingEventCounter : DiagnosticCounter
     {
         /// <summary>
index 78763d5..bc952ce 100644 (file)
@@ -14,6 +14,11 @@ namespace System.Diagnostics.Tracing
     /// Unlike IncrementingEventCounter, this takes in a polling callback that it can call to update
     /// its own metric periodically.
     /// </summary>
+#if !ES_BUILD_STANDALONE
+#if !FEATURE_WASM_PERFTRACING
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+#endif
+#endif
     public partial class IncrementingPollingCounter : DiagnosticCounter
     {
         /// <summary>
index 0763f48..450f47a 100644 (file)
@@ -13,6 +13,11 @@ namespace System.Diagnostics.Tracing
     /// function to collect metrics on its own rather than the user having to call WriteMetric()
     /// every time.
     /// </summary>
+#if !ES_BUILD_STANDALONE
+#if !FEATURE_WASM_PERFTRACING
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+#endif
+#endif
     public partial class PollingCounter : DiagnosticCounter
     {
         /// <summary>
index de31539..05de84a 100644 (file)
@@ -10,6 +10,9 @@ namespace System.Threading
     /// <summary>
     /// An object representing the registration of a <see cref="WaitHandle"/> via <see cref="ThreadPool.RegisterWaitForSingleObject"/>.
     /// </summary>
+#if !FEATURE_WASM_THREADS
+    [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
     public sealed partial class RegisteredWaitHandle : MarshalByRefObject
     {
         internal RegisteredWaitHandle(WaitHandle waitHandle, _ThreadPoolWaitOrTimerCallback callbackHelper,
index 20f5ddf..a27ced3 100644 (file)
@@ -154,12 +154,15 @@ namespace System.Threading
         }
 
 #if !TARGET_BROWSER || FEATURE_WASM_THREADS
+        [UnsupportedOSPlatformGuard("browser")]
         internal static bool IsThreadStartSupported => true;
         internal static bool IsInternalThreadStartSupported => true;
 #elif FEATURE_WASM_PERFTRACING
+        [UnsupportedOSPlatformGuard("browser")]
         internal static bool IsThreadStartSupported => false;
         internal static bool IsInternalThreadStartSupported => true;
 #else
+        [UnsupportedOSPlatformGuard("browser")]
         internal static bool IsThreadStartSupported => false;
         internal static bool IsInternalThreadStartSupported => false;
 #endif
@@ -178,6 +181,9 @@ namespace System.Threading
         /// <exception cref="ThreadStateException">The thread has already been started.</exception>
         /// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception>
         /// <exception cref="InvalidOperationException">This thread was created using a <see cref="ThreadStart"/> delegate instead of a <see cref="ParameterizedThreadStart"/> delegate.</exception>
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public void Start(object? parameter) => Start(parameter, captureContext: true);
 
         /// <summary>Causes the operating system to change the state of the current instance to <see cref="ThreadState.Running"/>, and optionally supplies an object containing data to be used by the method the thread executes.</summary>
@@ -189,6 +195,9 @@ namespace System.Threading
         /// Unlike <see cref="Start"/>, which captures the current <see cref="ExecutionContext"/> and uses that context to invoke the thread's delegate,
         /// <see cref="UnsafeStart"/> explicitly avoids capturing the current context and flowing it to the invocation.
         /// </remarks>
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public void UnsafeStart(object? parameter) => Start(parameter, captureContext: false);
 
         private void Start(object? parameter, bool captureContext, bool internalThread = false)
@@ -217,6 +226,9 @@ namespace System.Threading
         /// <summary>Causes the operating system to change the state of the current instance to <see cref="ThreadState.Running"/>.</summary>
         /// <exception cref="ThreadStateException">The thread has already been started.</exception>
         /// <exception cref="OutOfMemoryException">There is not enough memory available to start this thread.</exception>
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public void Start() => Start(captureContext: true);
 
         /// <summary>Causes the operating system to change the state of the current instance to <see cref="ThreadState.Running"/>.</summary>
@@ -226,6 +238,9 @@ namespace System.Threading
         /// Unlike <see cref="Start"/>, which captures the current <see cref="ExecutionContext"/> and uses that context to invoke the thread's delegate,
         /// <see cref="UnsafeStart"/> explicitly avoids capturing the current context and flowing it to the invocation.
         /// </remarks>
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public void UnsafeStart() => Start(captureContext: false);
 
         internal void InternalUnsafeStart() => Start(captureContext: false, internalThread: true);
index 0fc0630..55e6fca 100644 (file)
@@ -1373,6 +1373,9 @@ namespace System.Threading
 
         internal static bool EnableWorkerTracking => IsWorkerTrackingEnabledInConfig && EventSource.IsSupported;
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         [CLSCompliant(false)]
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
              WaitHandle waitObject,
@@ -1387,6 +1390,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, millisecondsTimeOutInterval, executeOnlyOnce, true);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         [CLSCompliant(false)]
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
              WaitHandle waitObject,
@@ -1401,6 +1407,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, millisecondsTimeOutInterval, executeOnlyOnce, false);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
              WaitHandle waitObject,
              WaitOrTimerCallback callBack,
@@ -1414,6 +1423,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, (uint)millisecondsTimeOutInterval, executeOnlyOnce, true);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
              WaitHandle waitObject,
              WaitOrTimerCallback callBack,
@@ -1427,6 +1439,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, (uint)millisecondsTimeOutInterval, executeOnlyOnce, false);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
             WaitHandle waitObject,
             WaitOrTimerCallback callBack,
@@ -1442,6 +1457,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, (uint)millisecondsTimeOutInterval, executeOnlyOnce, true);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
             WaitHandle waitObject,
             WaitOrTimerCallback callBack,
@@ -1457,6 +1475,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, (uint)millisecondsTimeOutInterval, executeOnlyOnce, false);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public static RegisteredWaitHandle RegisterWaitForSingleObject(
                           WaitHandle waitObject,
                           WaitOrTimerCallback callBack,
@@ -1473,6 +1494,9 @@ namespace System.Threading
             return RegisterWaitForSingleObject(waitObject, callBack, state, (uint)tm, executeOnlyOnce, true);
         }
 
+#if !FEATURE_WASM_THREADS
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
         public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(
                           WaitHandle waitObject,
                           WaitOrTimerCallback callBack,
index ff32d10..b5a7b20 100644 (file)
@@ -4,6 +4,336 @@
 // Changes to this file must follow the https://aka.ms/api-review process.
 // ------------------------------------------------------------------------------
 
+#if !BUILDING_CORELIB_REFERENCE
+namespace System.Runtime.CompilerServices
+{
+    [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
+    [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter, Inherited=false)]
+    public sealed partial class IDispatchConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute
+    {
+        public IDispatchConstantAttribute() { }
+        public override object Value { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter, Inherited=false)]
+    public sealed partial class IUnknownConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute
+    {
+        public IUnknownConstantAttribute() { }
+        public override object Value { get { throw null; } }
+    }
+}
+namespace System.Runtime.InteropServices
+{
+    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Interface, Inherited=false)]
+    public sealed partial class AutomationProxyAttribute : System.Attribute
+    {
+        public AutomationProxyAttribute(bool val) { }
+        public bool Value { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)]
+    public sealed partial class ComAliasNameAttribute : System.Attribute
+    {
+        public ComAliasNameAttribute(string alias) { }
+        public string Value { get { throw null; } }
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    public partial class ComAwareEventInfo : System.Reflection.EventInfo
+    {
+        public ComAwareEventInfo([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicEvents)] System.Type type, string eventName) { }
+        public override System.Reflection.EventAttributes Attributes { get { throw null; } }
+        public override System.Type? DeclaringType { get { throw null; } }
+        public override int MetadataToken { get { throw null; } }
+        public override System.Reflection.Module Module { get { throw null; } }
+        public override string Name { get { throw null; } }
+        public override System.Type? ReflectedType { get { throw null; } }
+        [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
+        public override void AddEventHandler(object target, System.Delegate handler) { }
+        public override System.Reflection.MethodInfo? GetAddMethod(bool nonPublic) { throw null; }
+        public override object[] GetCustomAttributes(bool inherit) { throw null; }
+        public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw null; }
+        public override System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData() { throw null; }
+        public override System.Reflection.MethodInfo[] GetOtherMethods(bool nonPublic) { throw null; }
+        public override System.Reflection.MethodInfo? GetRaiseMethod(bool nonPublic) { throw null; }
+        public override System.Reflection.MethodInfo? GetRemoveMethod(bool nonPublic) { throw null; }
+        public override bool IsDefined(System.Type attributeType, bool inherit) { throw null; }
+        [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
+        public override void RemoveEventHandler(object target, System.Delegate handler) { }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
+    public sealed partial class ComCompatibleVersionAttribute : System.Attribute
+    {
+        public ComCompatibleVersionAttribute(int major, int minor, int build, int revision) { }
+        public int BuildNumber { get { throw null; } }
+        public int MajorVersion { get { throw null; } }
+        public int MinorVersion { get { throw null; } }
+        public int RevisionNumber { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.All, Inherited=false)]
+    public sealed partial class ComConversionLossAttribute : System.Attribute
+    {
+        public ComConversionLossAttribute() { }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)]
+    public sealed partial class ComRegisterFunctionAttribute : System.Attribute
+    {
+        public ComRegisterFunctionAttribute() { }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)]
+    public sealed partial class ComUnregisterFunctionAttribute : System.Attribute
+    {
+        public ComUnregisterFunctionAttribute() { }
+    }
+    public sealed partial class HandleCollector
+    {
+        public HandleCollector(string? name, int initialThreshold) { }
+        public HandleCollector(string? name, int initialThreshold, int maximumThreshold) { }
+        public int Count { get { throw null; } }
+        public int InitialThreshold { get { throw null; } }
+        public int MaximumThreshold { get { throw null; } }
+        public string Name { get { throw null; } }
+        public void Add() { }
+        public void Remove() { }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
+    public sealed partial class ImportedFromTypeLibAttribute : System.Attribute
+    {
+        public ImportedFromTypeLibAttribute(string tlbFile) { }
+        public string Value { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false, AllowMultiple=false)]
+    public sealed partial class ManagedToNativeComInteropStubAttribute : System.Attribute
+    {
+        public ManagedToNativeComInteropStubAttribute(System.Type classType, string methodName) { }
+        public System.Type ClassType { get { throw null; } }
+        public string MethodName { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false, AllowMultiple=true)]
+    public sealed partial class PrimaryInteropAssemblyAttribute : System.Attribute
+    {
+        public PrimaryInteropAssemblyAttribute(int major, int minor) { }
+        public int MajorVersion { get { throw null; } }
+        public int MinorVersion { get { throw null; } }
+    }
+    public static partial class RuntimeEnvironment
+    {
+        [System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+        public static string SystemConfigurationFile { get { throw null; } }
+        public static bool FromGlobalAccessCache(System.Reflection.Assembly a) { throw null; }
+        public static string GetRuntimeDirectory() { throw null; }
+        [System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+        public static System.IntPtr GetRuntimeInterfaceAsIntPtr(System.Guid clsid, System.Guid riid) { throw null; }
+        [System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+        public static object GetRuntimeInterfaceAsObject(System.Guid clsid, System.Guid riid) { throw null; }
+        public static string GetSystemVersion() { throw null; }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)]
+    public sealed partial class TypeLibFuncAttribute : System.Attribute
+    {
+        public TypeLibFuncAttribute(short flags) { }
+        public TypeLibFuncAttribute(System.Runtime.InteropServices.TypeLibFuncFlags flags) { }
+        public System.Runtime.InteropServices.TypeLibFuncFlags Value { get { throw null; } }
+    }
+    [System.FlagsAttribute]
+    public enum TypeLibFuncFlags
+    {
+        FRestricted = 1,
+        FSource = 2,
+        FBindable = 4,
+        FRequestEdit = 8,
+        FDisplayBind = 16,
+        FDefaultBind = 32,
+        FHidden = 64,
+        FUsesGetLastError = 128,
+        FDefaultCollelem = 256,
+        FUiDefault = 512,
+        FNonBrowsable = 1024,
+        FReplaceable = 2048,
+        FImmediateBind = 4096,
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Interface, Inherited=false)]
+    public sealed partial class TypeLibImportClassAttribute : System.Attribute
+    {
+        public TypeLibImportClassAttribute(System.Type importClass) { }
+        public string Value { get { throw null; } }
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, Inherited=false)]
+    public sealed partial class TypeLibTypeAttribute : System.Attribute
+    {
+        public TypeLibTypeAttribute(short flags) { }
+        public TypeLibTypeAttribute(System.Runtime.InteropServices.TypeLibTypeFlags flags) { }
+        public System.Runtime.InteropServices.TypeLibTypeFlags Value { get { throw null; } }
+    }
+    [System.FlagsAttribute]
+    public enum TypeLibTypeFlags
+    {
+        FAppObject = 1,
+        FCanCreate = 2,
+        FLicensed = 4,
+        FPreDeclId = 8,
+        FHidden = 16,
+        FControl = 32,
+        FDual = 64,
+        FNonExtensible = 128,
+        FOleAutomation = 256,
+        FRestricted = 512,
+        FAggregatable = 1024,
+        FReplaceable = 2048,
+        FDispatchable = 4096,
+        FReverseBind = 8192,
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited=false)]
+    public sealed partial class TypeLibVarAttribute : System.Attribute
+    {
+        public TypeLibVarAttribute(short flags) { }
+        public TypeLibVarAttribute(System.Runtime.InteropServices.TypeLibVarFlags flags) { }
+        public System.Runtime.InteropServices.TypeLibVarFlags Value { get { throw null; } }
+    }
+    [System.FlagsAttribute]
+    public enum TypeLibVarFlags
+    {
+        FReadOnly = 1,
+        FSource = 2,
+        FBindable = 4,
+        FRequestEdit = 8,
+        FDisplayBind = 16,
+        FDefaultBind = 32,
+        FHidden = 64,
+        FRestricted = 128,
+        FDefaultCollelem = 256,
+        FUiDefault = 512,
+        FNonBrowsable = 1024,
+        FReplaceable = 2048,
+        FImmediateBind = 4096,
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
+    public sealed partial class TypeLibVersionAttribute : System.Attribute
+    {
+        public TypeLibVersionAttribute(int major, int minor) { }
+        public int MajorVersion { get { throw null; } }
+        public int MinorVersion { get { throw null; } }
+    }
+}
+namespace System.Runtime.InteropServices.ComTypes
+{
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.FlagsAttribute]
+    public enum ADVF
+    {
+        ADVF_NODATA = 1,
+        ADVF_PRIMEFIRST = 2,
+        ADVF_ONLYONCE = 4,
+        ADVFCACHE_NOHANDLER = 8,
+        ADVFCACHE_FORCEBUILTIN = 16,
+        ADVFCACHE_ONSAVE = 32,
+        ADVF_DATAONSTOP = 64,
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    public enum DATADIR
+    {
+        DATADIR_GET = 1,
+        DATADIR_SET = 2,
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.FlagsAttribute]
+    public enum DVASPECT
+    {
+        DVASPECT_CONTENT = 1,
+        DVASPECT_THUMBNAIL = 2,
+        DVASPECT_ICON = 4,
+        DVASPECT_DOCPRINT = 8,
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public partial struct FORMATETC
+    {
+        public short cfFormat;
+        public System.Runtime.InteropServices.ComTypes.DVASPECT dwAspect;
+        public int lindex;
+        public System.IntPtr ptd;
+        public System.Runtime.InteropServices.ComTypes.TYMED tymed;
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
+    public partial interface IAdviseSink
+    {
+        void OnClose();
+        void OnDataChange(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM stgmedium);
+        void OnRename(System.Runtime.InteropServices.ComTypes.IMoniker moniker);
+        void OnSave();
+        void OnViewChange(int aspect, int index);
+    }
+    [System.CLSCompliantAttribute(false)]
+    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
+    public partial interface IDataObject
+    {
+        int DAdvise(ref System.Runtime.InteropServices.ComTypes.FORMATETC pFormatetc, System.Runtime.InteropServices.ComTypes.ADVF advf, System.Runtime.InteropServices.ComTypes.IAdviseSink adviseSink, out int connection);
+        void DUnadvise(int connection);
+        int EnumDAdvise(out System.Runtime.InteropServices.ComTypes.IEnumSTATDATA? enumAdvise);
+        System.Runtime.InteropServices.ComTypes.IEnumFORMATETC EnumFormatEtc(System.Runtime.InteropServices.ComTypes.DATADIR direction);
+        int GetCanonicalFormatEtc(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, out System.Runtime.InteropServices.ComTypes.FORMATETC formatOut);
+        void GetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, out System.Runtime.InteropServices.ComTypes.STGMEDIUM medium);
+        void GetDataHere(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium);
+        int QueryGetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC format);
+        void SetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium, bool release);
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
+    public partial interface IEnumFORMATETC
+    {
+        void Clone(out System.Runtime.InteropServices.ComTypes.IEnumFORMATETC newEnum);
+        int Next(int celt, System.Runtime.InteropServices.ComTypes.FORMATETC[] rgelt, int[] pceltFetched);
+        int Reset();
+        int Skip(int celt);
+    }
+    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
+    public partial interface IEnumSTATDATA
+    {
+        void Clone(out System.Runtime.InteropServices.ComTypes.IEnumSTATDATA newEnum);
+        int Next(int celt, System.Runtime.InteropServices.ComTypes.STATDATA[] rgelt, int[] pceltFetched);
+        int Reset();
+        int Skip(int celt);
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public partial struct STATDATA
+    {
+        public System.Runtime.InteropServices.ComTypes.ADVF advf;
+        public System.Runtime.InteropServices.ComTypes.IAdviseSink advSink;
+        public int connection;
+        public System.Runtime.InteropServices.ComTypes.FORMATETC formatetc;
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+    public partial struct STGMEDIUM
+    {
+        public object? pUnkForRelease;
+        public System.Runtime.InteropServices.ComTypes.TYMED tymed;
+        public System.IntPtr unionmember;
+    }
+    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+    [System.FlagsAttribute]
+    public enum TYMED
+    {
+        TYMED_NULL = 0,
+        TYMED_HGLOBAL = 1,
+        TYMED_FILE = 2,
+        TYMED_ISTREAM = 4,
+        TYMED_ISTORAGE = 8,
+        TYMED_GDI = 16,
+        TYMED_MFPICT = 32,
+        TYMED_ENHMF = 64,
+    }
+}
+namespace System.Security
+{
+    public static partial class SecureStringMarshal
+    {
+        public static System.IntPtr SecureStringToCoTaskMemAnsi(System.Security.SecureString s) { throw null; }
+        public static System.IntPtr SecureStringToCoTaskMemUnicode(System.Security.SecureString s) { throw null; }
+        public static System.IntPtr SecureStringToGlobalAllocAnsi(System.Security.SecureString s) { throw null; }
+        public static System.IntPtr SecureStringToGlobalAllocUnicode(System.Security.SecureString s) { throw null; }
+    }
+}
+#endif // !BUILDING_CORELIB_REFERENCE
 namespace System
 {
     public sealed partial class DataMisalignedException : System.SystemException
@@ -74,22 +404,6 @@ namespace System.IO
         public void Write<T>(long position, ref T structure) where T : struct { }
     }
 }
-namespace System.Runtime.CompilerServices
-{
-    [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
-    [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter, Inherited=false)]
-    public sealed partial class IDispatchConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute
-    {
-        public IDispatchConstantAttribute() { }
-        public override object Value { get { throw null; } }
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter, Inherited=false)]
-    public sealed partial class IUnknownConstantAttribute : System.Runtime.CompilerServices.CustomConstantAttribute
-    {
-        public IUnknownConstantAttribute() { }
-        public override object Value { get { throw null; } }
-    }
-}
 namespace System.Runtime.InteropServices
 {
     [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
@@ -111,12 +425,6 @@ namespace System.Runtime.InteropServices
         public static bool operator ==(System.Runtime.InteropServices.ArrayWithOffset a, System.Runtime.InteropServices.ArrayWithOffset b) { throw null; }
         public static bool operator !=(System.Runtime.InteropServices.ArrayWithOffset a, System.Runtime.InteropServices.ArrayWithOffset b) { throw null; }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Interface, Inherited=false)]
-    public sealed partial class AutomationProxyAttribute : System.Attribute
-    {
-        public AutomationProxyAttribute(bool val) { }
-        public bool Value { get { throw null; } }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Interface | System.AttributeTargets.Struct, Inherited=false)]
     public sealed partial class BestFitMappingAttribute : System.Attribute
     {
@@ -176,49 +484,6 @@ namespace System.Runtime.InteropServices
         public static ref TValue GetValueRefOrNullRef<TKey, TValue>(System.Collections.Generic.Dictionary<TKey, TValue> dictionary, TKey key) where TKey : notnull { throw null; }
         public static ref TValue? GetValueRefOrAddDefault<TKey, TValue>(System.Collections.Generic.Dictionary<TKey, TValue> dictionary, TKey key, out bool exists) where TKey : notnull { throw null; }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue, Inherited=false)]
-    public sealed partial class ComAliasNameAttribute : System.Attribute
-    {
-        public ComAliasNameAttribute(string alias) { }
-        public string Value { get { throw null; } }
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    public partial class ComAwareEventInfo : System.Reflection.EventInfo
-    {
-        public ComAwareEventInfo([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicEvents)] System.Type type, string eventName) { }
-        public override System.Reflection.EventAttributes Attributes { get { throw null; } }
-        public override System.Type? DeclaringType { get { throw null; } }
-        public override int MetadataToken { get { throw null; } }
-        public override System.Reflection.Module Module { get { throw null; } }
-        public override string Name { get { throw null; } }
-        public override System.Type? ReflectedType { get { throw null; } }
-        [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
-        public override void AddEventHandler(object target, System.Delegate handler) { }
-        public override System.Reflection.MethodInfo? GetAddMethod(bool nonPublic) { throw null; }
-        public override object[] GetCustomAttributes(bool inherit) { throw null; }
-        public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw null; }
-        public override System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData() { throw null; }
-        public override System.Reflection.MethodInfo[] GetOtherMethods(bool nonPublic) { throw null; }
-        public override System.Reflection.MethodInfo? GetRaiseMethod(bool nonPublic) { throw null; }
-        public override System.Reflection.MethodInfo? GetRemoveMethod(bool nonPublic) { throw null; }
-        public override bool IsDefined(System.Type attributeType, bool inherit) { throw null; }
-        [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
-        public override void RemoveEventHandler(object target, System.Delegate handler) { }
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
-    public sealed partial class ComCompatibleVersionAttribute : System.Attribute
-    {
-        public ComCompatibleVersionAttribute(int major, int minor, int build, int revision) { }
-        public int BuildNumber { get { throw null; } }
-        public int MajorVersion { get { throw null; } }
-        public int MinorVersion { get { throw null; } }
-        public int RevisionNumber { get { throw null; } }
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.All, Inherited=false)]
-    public sealed partial class ComConversionLossAttribute : System.Attribute
-    {
-        public ComConversionLossAttribute() { }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Class, Inherited=false)]
     public sealed partial class ComDefaultInterfaceAttribute : System.Attribute
     {
@@ -269,11 +534,6 @@ namespace System.Runtime.InteropServices
         PropGet = 1,
         PropSet = 2,
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)]
-    public sealed partial class ComRegisterFunctionAttribute : System.Attribute
-    {
-        public ComRegisterFunctionAttribute() { }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Class, Inherited=true)]
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     public sealed partial class ComSourceInterfacesAttribute : System.Attribute
@@ -285,10 +545,50 @@ namespace System.Runtime.InteropServices
         public ComSourceInterfacesAttribute(System.Type sourceInterface1, System.Type sourceInterface2, System.Type sourceInterface3, System.Type sourceInterface4) { }
         public string Value { get { throw null; } }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)]
-    public sealed partial class ComUnregisterFunctionAttribute : System.Attribute
+    [System.Runtime.Versioning.UnsupportedOSPlatform("android")]
+    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
+    [System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
+    [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
+    [System.CLSCompliantAttribute(false)]
+    public abstract class ComWrappers
     {
-        public ComUnregisterFunctionAttribute() { }
+        public struct ComInterfaceEntry
+        {
+            public System.Guid IID;
+            public System.IntPtr Vtable;
+        }
+        public struct ComInterfaceDispatch
+        {
+            public System.IntPtr Vtable;
+            public unsafe static T GetInstance<T>(ComInterfaceDispatch* dispatchPtr) where T : class { throw null; }
+        }
+        public System.IntPtr GetOrCreateComInterfaceForObject(object instance, CreateComInterfaceFlags flags) { throw null; }
+        protected unsafe abstract ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count);
+        public object GetOrCreateObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags) { throw null; }
+        protected abstract object? CreateObject(System.IntPtr externalComObject, CreateObjectFlags flags);
+        public object GetOrRegisterObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags, object wrapper) { throw null; }
+        public object GetOrRegisterObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags, object wrapper, System.IntPtr inner) { throw null; }
+        protected abstract void ReleaseObjects(System.Collections.IEnumerable objects);
+        public static void RegisterForTrackerSupport(ComWrappers instance) { }
+        [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
+        public static void RegisterForMarshalling(ComWrappers instance) { }
+        protected static void GetIUnknownImpl(out System.IntPtr fpQueryInterface, out System.IntPtr fpAddRef, out System.IntPtr fpRelease) { throw null; }
+    }
+    [System.FlagsAttribute]
+    public enum CreateComInterfaceFlags
+    {
+        None = 0,
+        CallerDefinedIUnknown = 1,
+        TrackerSupport = 2,
+    }
+    [System.FlagsAttribute]
+    public enum CreateObjectFlags
+    {
+        None = 0,
+        TrackerObject = 1,
+        UniqueInstance = 2,
+        Aggregation = 4,
+        Unwrap = 8,
     }
     [System.CLSCompliantAttribute(false)]
     public readonly partial struct CULong : System.IEquatable<System.Runtime.InteropServices.CULong>
@@ -399,17 +699,6 @@ namespace System.Runtime.InteropServices
         public GuidAttribute(string guid) { }
         public string Value { get { throw null; } }
     }
-    public sealed partial class HandleCollector
-    {
-        public HandleCollector(string? name, int initialThreshold) { }
-        public HandleCollector(string? name, int initialThreshold, int maximumThreshold) { }
-        public int Count { get { throw null; } }
-        public int InitialThreshold { get { throw null; } }
-        public int MaximumThreshold { get { throw null; } }
-        public string Name { get { throw null; } }
-        public void Add() { }
-        public void Remove() { }
-    }
     public readonly partial struct HandleRef
     {
         private readonly object _dummy;
@@ -447,12 +736,6 @@ namespace System.Runtime.InteropServices
         bool IsInterfaceImplemented(System.RuntimeTypeHandle interfaceType, bool throwIfNotImplemented);
         System.RuntimeTypeHandle GetInterfaceImplementation(System.RuntimeTypeHandle interfaceType);
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
-    public sealed partial class ImportedFromTypeLibAttribute : System.Attribute
-    {
-        public ImportedFromTypeLibAttribute(string tlbFile) { }
-        public string Value { get { throw null; } }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Interface, Inherited=false)]
     public sealed partial class InterfaceTypeAttribute : System.Attribute
     {
@@ -490,13 +773,6 @@ namespace System.Runtime.InteropServices
         public System.Runtime.InteropServices.StringMarshalling StringMarshalling { get { throw null; } set { } }
         public System.Type? StringMarshallingCustomType { get { throw null; } set { } }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false, AllowMultiple=false)]
-    public sealed partial class ManagedToNativeComInteropStubAttribute : System.Attribute
-    {
-        public ManagedToNativeComInteropStubAttribute(System.Type classType, string methodName) { }
-        public System.Type ClassType { get { throw null; } }
-        public string MethodName { get { throw null; } }
-    }
     public static partial class Marshal
     {
         public static readonly int SystemDefaultCharSize;
@@ -1105,156 +1381,51 @@ namespace System.Runtime.InteropServices
     {
         public PreserveSigAttribute() { }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false, AllowMultiple=true)]
-    public sealed partial class PrimaryInteropAssemblyAttribute : System.Attribute
-    {
-        public PrimaryInteropAssemblyAttribute(int major, int minor) { }
-        public int MajorVersion { get { throw null; } }
-        public int MinorVersion { get { throw null; } }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Class, Inherited=false)]
     public sealed partial class ProgIdAttribute : System.Attribute
     {
         public ProgIdAttribute(string progId) { }
         public string Value { get { throw null; } }
     }
-    public static partial class RuntimeEnvironment
-    {
-        [System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
-        public static string SystemConfigurationFile { get { throw null; } }
-        public static bool FromGlobalAccessCache(System.Reflection.Assembly a) { throw null; }
-        public static string GetRuntimeDirectory() { throw null; }
-        [System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
-        public static System.IntPtr GetRuntimeInterfaceAsIntPtr(System.Guid clsid, System.Guid riid) { throw null; }
-        [System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
-        public static object GetRuntimeInterfaceAsObject(System.Guid clsid, System.Guid riid) { throw null; }
-        public static string GetSystemVersion() { throw null; }
-    }
     public partial class SafeArrayRankMismatchException : System.SystemException
     {
         public SafeArrayRankMismatchException() { }
         protected SafeArrayRankMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
         public SafeArrayRankMismatchException(string? message) { }
-        public SafeArrayRankMismatchException(string? message, System.Exception? inner) { }
-    }
-    public partial class SafeArrayTypeMismatchException : System.SystemException
-    {
-        public SafeArrayTypeMismatchException() { }
-        protected SafeArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public SafeArrayTypeMismatchException(string? message) { }
-        public SafeArrayTypeMismatchException(string? message, System.Exception? inner) { }
-    }
-    public partial class SEHException : System.Runtime.InteropServices.ExternalException
-    {
-        public SEHException() { }
-        protected SEHException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public SEHException(string? message) { }
-        public SEHException(string? message, System.Exception? inner) { }
-        public virtual bool CanResume() { throw null; }
-    }
-    public partial class StandardOleMarshalObject : System.MarshalByRefObject
-    {
-        protected StandardOleMarshalObject() { }
-    }
-    public enum StringMarshalling
-    {
-        Custom = 0,
-        Utf8 = 1,
-        Utf16 = 2,
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
-    public sealed partial class TypeIdentifierAttribute : System.Attribute
-    {
-        public TypeIdentifierAttribute() { }
-        public TypeIdentifierAttribute(string? scope, string? identifier) { }
-        public string? Identifier { get { throw null; } }
-        public string? Scope { get { throw null; } }
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=false)]
-    public sealed partial class TypeLibFuncAttribute : System.Attribute
-    {
-        public TypeLibFuncAttribute(short flags) { }
-        public TypeLibFuncAttribute(System.Runtime.InteropServices.TypeLibFuncFlags flags) { }
-        public System.Runtime.InteropServices.TypeLibFuncFlags Value { get { throw null; } }
-    }
-    [System.FlagsAttribute]
-    public enum TypeLibFuncFlags
-    {
-        FRestricted = 1,
-        FSource = 2,
-        FBindable = 4,
-        FRequestEdit = 8,
-        FDisplayBind = 16,
-        FDefaultBind = 32,
-        FHidden = 64,
-        FUsesGetLastError = 128,
-        FDefaultCollelem = 256,
-        FUiDefault = 512,
-        FNonBrowsable = 1024,
-        FReplaceable = 2048,
-        FImmediateBind = 4096,
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Interface, Inherited=false)]
-    public sealed partial class TypeLibImportClassAttribute : System.Attribute
-    {
-        public TypeLibImportClassAttribute(System.Type importClass) { }
-        public string Value { get { throw null; } }
+        public SafeArrayRankMismatchException(string? message, System.Exception? inner) { }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, Inherited=false)]
-    public sealed partial class TypeLibTypeAttribute : System.Attribute
+    public partial class SafeArrayTypeMismatchException : System.SystemException
     {
-        public TypeLibTypeAttribute(short flags) { }
-        public TypeLibTypeAttribute(System.Runtime.InteropServices.TypeLibTypeFlags flags) { }
-        public System.Runtime.InteropServices.TypeLibTypeFlags Value { get { throw null; } }
+        public SafeArrayTypeMismatchException() { }
+        protected SafeArrayTypeMismatchException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public SafeArrayTypeMismatchException(string? message) { }
+        public SafeArrayTypeMismatchException(string? message, System.Exception? inner) { }
     }
-    [System.FlagsAttribute]
-    public enum TypeLibTypeFlags
+    public partial class SEHException : System.Runtime.InteropServices.ExternalException
     {
-        FAppObject = 1,
-        FCanCreate = 2,
-        FLicensed = 4,
-        FPreDeclId = 8,
-        FHidden = 16,
-        FControl = 32,
-        FDual = 64,
-        FNonExtensible = 128,
-        FOleAutomation = 256,
-        FRestricted = 512,
-        FAggregatable = 1024,
-        FReplaceable = 2048,
-        FDispatchable = 4096,
-        FReverseBind = 8192,
+        public SEHException() { }
+        protected SEHException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public SEHException(string? message) { }
+        public SEHException(string? message, System.Exception? inner) { }
+        public virtual bool CanResume() { throw null; }
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited=false)]
-    public sealed partial class TypeLibVarAttribute : System.Attribute
+    public partial class StandardOleMarshalObject : System.MarshalByRefObject
     {
-        public TypeLibVarAttribute(short flags) { }
-        public TypeLibVarAttribute(System.Runtime.InteropServices.TypeLibVarFlags flags) { }
-        public System.Runtime.InteropServices.TypeLibVarFlags Value { get { throw null; } }
+        protected StandardOleMarshalObject() { }
     }
-    [System.FlagsAttribute]
-    public enum TypeLibVarFlags
+    public enum StringMarshalling
     {
-        FReadOnly = 1,
-        FSource = 2,
-        FBindable = 4,
-        FRequestEdit = 8,
-        FDisplayBind = 16,
-        FDefaultBind = 32,
-        FHidden = 64,
-        FRestricted = 128,
-        FDefaultCollelem = 256,
-        FUiDefault = 512,
-        FNonBrowsable = 1024,
-        FReplaceable = 2048,
-        FImmediateBind = 4096,
+        Custom = 0,
+        Utf8 = 1,
+        Utf16 = 2,
     }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
-    public sealed partial class TypeLibVersionAttribute : System.Attribute
+    [System.AttributeUsageAttribute(System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Interface | System.AttributeTargets.Struct, AllowMultiple=false, Inherited=false)]
+    public sealed partial class TypeIdentifierAttribute : System.Attribute
     {
-        public TypeLibVersionAttribute(int major, int minor) { }
-        public int MajorVersion { get { throw null; } }
-        public int MinorVersion { get { throw null; } }
+        public TypeIdentifierAttribute() { }
+        public TypeIdentifierAttribute(string? scope, string? identifier) { }
+        public string? Identifier { get { throw null; } }
+        public string? Scope { get { throw null; } }
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     public sealed partial class UnknownWrapper
@@ -1262,6 +1433,19 @@ namespace System.Runtime.InteropServices
         public UnknownWrapper(object? obj) { }
         public object? WrappedObject { get { throw null; } }
     }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
+    public sealed class UnmanagedCallConvAttribute : System.Attribute
+    {
+        public UnmanagedCallConvAttribute() { }
+        public System.Type[]? CallConvs;
+    }
+    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited = false)]
+    public sealed class UnmanagedCallersOnlyAttribute : System.Attribute
+    {
+        public UnmanagedCallersOnlyAttribute() { }
+        public System.Type[]? CallConvs;
+        public string? EntryPoint;
+    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Delegate, AllowMultiple=false, Inherited=false)]
     public sealed partial class UnmanagedFunctionPointerAttribute : System.Attribute
     {
@@ -1326,80 +1510,10 @@ namespace System.Runtime.InteropServices
         public VariantWrapper(object? obj) { }
         public object? WrappedObject { get { throw null; } }
     }
-    [System.FlagsAttribute]
-    public enum CreateComInterfaceFlags
-    {
-        None = 0,
-        CallerDefinedIUnknown = 1,
-        TrackerSupport = 2,
-    }
-    [System.FlagsAttribute]
-    public enum CreateObjectFlags
-    {
-        None = 0,
-        TrackerObject = 1,
-        UniqueInstance = 2,
-        Aggregation = 4,
-        Unwrap = 8,
-    }
-    [System.Runtime.Versioning.UnsupportedOSPlatform("android")]
-    [System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
-    [System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
-    [System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
-    [System.CLSCompliantAttribute(false)]
-    public abstract class ComWrappers
-    {
-        public struct ComInterfaceEntry
-        {
-            public System.Guid IID;
-            public System.IntPtr Vtable;
-        }
-        public struct ComInterfaceDispatch
-        {
-            public System.IntPtr Vtable;
-            public unsafe static T GetInstance<T>(ComInterfaceDispatch* dispatchPtr) where T : class { throw null; }
-        }
-        public System.IntPtr GetOrCreateComInterfaceForObject(object instance, CreateComInterfaceFlags flags) { throw null; }
-        protected unsafe abstract ComInterfaceEntry* ComputeVtables(object obj, CreateComInterfaceFlags flags, out int count);
-        public object GetOrCreateObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags) { throw null; }
-        protected abstract object? CreateObject(System.IntPtr externalComObject, CreateObjectFlags flags);
-        public object GetOrRegisterObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags, object wrapper) { throw null; }
-        public object GetOrRegisterObjectForComInstance(System.IntPtr externalComObject, CreateObjectFlags flags, object wrapper, System.IntPtr inner) { throw null; }
-        protected abstract void ReleaseObjects(System.Collections.IEnumerable objects);
-        public static void RegisterForTrackerSupport(ComWrappers instance) { }
-        [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
-        public static void RegisterForMarshalling(ComWrappers instance) { }
-        protected static void GetIUnknownImpl(out System.IntPtr fpQueryInterface, out System.IntPtr fpAddRef, out System.IntPtr fpRelease) { throw null; }
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
-    public sealed class UnmanagedCallConvAttribute : System.Attribute
-    {
-        public UnmanagedCallConvAttribute() { }
-        public System.Type[]? CallConvs;
-    }
-    [System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited = false)]
-    public sealed class UnmanagedCallersOnlyAttribute : System.Attribute
-    {
-        public UnmanagedCallersOnlyAttribute() { }
-        public System.Type[]? CallConvs;
-        public string? EntryPoint;
-    }
 }
 namespace System.Runtime.InteropServices.ComTypes
 {
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.FlagsAttribute]
-    public enum ADVF
-    {
-        ADVF_NODATA = 1,
-        ADVF_PRIMEFIRST = 2,
-        ADVF_ONLYONCE = 4,
-        ADVFCACHE_NOHANDLER = 8,
-        ADVFCACHE_FORCEBUILTIN = 16,
-        ADVFCACHE_ONSAVE = 32,
-        ADVF_DATAONSTOP = 64,
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Explicit)]
     public partial struct BINDPTR
     {
@@ -1441,12 +1555,6 @@ namespace System.Runtime.InteropServices.ComTypes
         public object pUnk;
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    public enum DATADIR
-    {
-        DATADIR_GET = 1,
-        DATADIR_SET = 2,
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     public enum DESCKIND
     {
         DESCKIND_NONE = 0,
@@ -1466,15 +1574,6 @@ namespace System.Runtime.InteropServices.ComTypes
         public System.IntPtr rgvarg;
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.FlagsAttribute]
-    public enum DVASPECT
-    {
-        DVASPECT_CONTENT = 1,
-        DVASPECT_THUMBNAIL = 2,
-        DVASPECT_ICON = 4,
-        DVASPECT_DOCPRINT = 8,
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
     public partial struct ELEMDESC
     {
@@ -1512,16 +1611,6 @@ namespace System.Runtime.InteropServices.ComTypes
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-    public partial struct FORMATETC
-    {
-        public short cfFormat;
-        public System.Runtime.InteropServices.ComTypes.DVASPECT dwAspect;
-        public int lindex;
-        public System.IntPtr ptd;
-        public System.Runtime.InteropServices.ComTypes.TYMED tymed;
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
     public partial struct FUNCDESC
     {
         public System.Runtime.InteropServices.ComTypes.CALLCONV callconv;
@@ -1566,16 +1655,6 @@ namespace System.Runtime.InteropServices.ComTypes
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
-    public partial interface IAdviseSink
-    {
-        void OnClose();
-        void OnDataChange(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM stgmedium);
-        void OnRename(System.Runtime.InteropServices.ComTypes.IMoniker moniker);
-        void OnSave();
-        void OnViewChange(int aspect, int index);
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
     public partial interface IBindCtx
     {
         void EnumObjectParam(out System.Runtime.InteropServices.ComTypes.IEnumString? ppenum);
@@ -1606,20 +1685,6 @@ namespace System.Runtime.InteropServices.ComTypes
         void EnumConnectionPoints(out System.Runtime.InteropServices.ComTypes.IEnumConnectionPoints ppEnum);
         void FindConnectionPoint(ref System.Guid riid, out System.Runtime.InteropServices.ComTypes.IConnectionPoint? ppCP);
     }
-    [System.CLSCompliantAttribute(false)]
-    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
-    public partial interface IDataObject
-    {
-        int DAdvise(ref System.Runtime.InteropServices.ComTypes.FORMATETC pFormatetc, System.Runtime.InteropServices.ComTypes.ADVF advf, System.Runtime.InteropServices.ComTypes.IAdviseSink adviseSink, out int connection);
-        void DUnadvise(int connection);
-        int EnumDAdvise(out System.Runtime.InteropServices.ComTypes.IEnumSTATDATA? enumAdvise);
-        System.Runtime.InteropServices.ComTypes.IEnumFORMATETC EnumFormatEtc(System.Runtime.InteropServices.ComTypes.DATADIR direction);
-        int GetCanonicalFormatEtc(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, out System.Runtime.InteropServices.ComTypes.FORMATETC formatOut);
-        void GetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, out System.Runtime.InteropServices.ComTypes.STGMEDIUM medium);
-        void GetDataHere(ref System.Runtime.InteropServices.ComTypes.FORMATETC format, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium);
-        int QueryGetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC format);
-        void SetData(ref System.Runtime.InteropServices.ComTypes.FORMATETC formatIn, ref System.Runtime.InteropServices.ComTypes.STGMEDIUM medium, bool release);
-    }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
     public partial struct IDLDESC
@@ -1657,15 +1722,6 @@ namespace System.Runtime.InteropServices.ComTypes
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
-    public partial interface IEnumFORMATETC
-    {
-        void Clone(out System.Runtime.InteropServices.ComTypes.IEnumFORMATETC newEnum);
-        int Next(int celt, System.Runtime.InteropServices.ComTypes.FORMATETC[] rgelt, int[] pceltFetched);
-        int Reset();
-        int Skip(int celt);
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
     public partial interface IEnumMoniker
     {
         void Clone(out System.Runtime.InteropServices.ComTypes.IEnumMoniker ppenum);
@@ -1673,14 +1729,6 @@ namespace System.Runtime.InteropServices.ComTypes
         void Reset();
         int Skip(int celt);
     }
-    [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
-    public partial interface IEnumSTATDATA
-    {
-        void Clone(out System.Runtime.InteropServices.ComTypes.IEnumSTATDATA newEnum);
-        int Next(int celt, System.Runtime.InteropServices.ComTypes.STATDATA[] rgelt, int[] pceltFetched);
-        int Reset();
-        int Skip(int celt);
-    }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
     public partial interface IEnumString
@@ -1916,15 +1964,6 @@ namespace System.Runtime.InteropServices.ComTypes
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-    public partial struct STATDATA
-    {
-        public System.Runtime.InteropServices.ComTypes.ADVF advf;
-        public System.Runtime.InteropServices.ComTypes.IAdviseSink advSink;
-        public int connection;
-        public System.Runtime.InteropServices.ComTypes.FORMATETC formatetc;
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
     public partial struct STATSTG
     {
         public System.Runtime.InteropServices.ComTypes.FILETIME atime;
@@ -1940,14 +1979,6 @@ namespace System.Runtime.InteropServices.ComTypes
         public int type;
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
-    public partial struct STGMEDIUM
-    {
-        public object? pUnkForRelease;
-        public System.Runtime.InteropServices.ComTypes.TYMED tymed;
-        public System.IntPtr unionmember;
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     public enum SYSKIND
     {
         SYS_WIN16 = 0,
@@ -1956,19 +1987,6 @@ namespace System.Runtime.InteropServices.ComTypes
         SYS_WIN64 = 3,
     }
     [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
-    [System.FlagsAttribute]
-    public enum TYMED
-    {
-        TYMED_NULL = 0,
-        TYMED_HGLOBAL = 1,
-        TYMED_FILE = 2,
-        TYMED_ISTREAM = 4,
-        TYMED_ISTORAGE = 8,
-        TYMED_GDI = 16,
-        TYMED_MFPICT = 32,
-        TYMED_ENHMF = 64,
-    }
-    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
     public partial struct TYPEATTR
     {
@@ -2300,11 +2318,4 @@ namespace System.Security
         public void RemoveAt(int index) { }
         public void SetAt(int index, char c) { }
     }
-    public static partial class SecureStringMarshal
-    {
-        public static System.IntPtr SecureStringToCoTaskMemAnsi(System.Security.SecureString s) { throw null; }
-        public static System.IntPtr SecureStringToCoTaskMemUnicode(System.Security.SecureString s) { throw null; }
-        public static System.IntPtr SecureStringToGlobalAllocAnsi(System.Security.SecureString s) { throw null; }
-        public static System.IntPtr SecureStringToGlobalAllocUnicode(System.Security.SecureString s) { throw null; }
-    }
 }
index 3038ea2..ad86c57 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
   </PropertyGroup>
 
   <ItemGroup>
index 1c4378e..82b94e8 100644 (file)
@@ -2516,10 +2516,6 @@ namespace System
         public FieldAccessException(string? message) { }
         public FieldAccessException(string? message, System.Exception? inner) { }
     }
-    public partial class FileStyleUriParser : System.UriParser
-    {
-        public FileStyleUriParser() { }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Enum, Inherited=false)]
     public partial class FlagsAttribute : System.Attribute
     {
@@ -2546,10 +2542,6 @@ namespace System
         public override string ToString() { throw null; }
         public abstract string ToString(System.IFormatProvider? formatProvider);
     }
-    public partial class FtpStyleUriParser : System.UriParser
-    {
-        public FtpStyleUriParser() { }
-    }
     public delegate TResult Func<out TResult>();
     public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9);
     public delegate TResult Func<in T1, in T2, in T3, in T4, in T5, in T6, in T7, in T8, in T9, in T10, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10);
@@ -2670,30 +2662,6 @@ namespace System
         Timeout = 3,
         NotApplicable = 4,
     }
-    public partial class GenericUriParser : System.UriParser
-    {
-        public GenericUriParser(System.GenericUriParserOptions options) { }
-    }
-    [System.FlagsAttribute]
-    public enum GenericUriParserOptions
-    {
-        Default = 0,
-        GenericAuthority = 1,
-        AllowEmptyAuthority = 2,
-        NoUserInfo = 4,
-        NoPort = 8,
-        NoQuery = 16,
-        NoFragment = 32,
-        DontConvertPathBackslashes = 64,
-        DontCompressPath = 128,
-        DontUnescapePathDotsAndSlashes = 256,
-        Idn = 512,
-        IriParsing = 1024,
-    }
-    public partial class GopherStyleUriParser : System.UriParser
-    {
-        public GopherStyleUriParser() { }
-    }
     public readonly partial struct Guid : System.IComparable, System.IComparable<System.Guid>, System.IEquatable<System.Guid>, System.IFormattable, System.IParsable<System.Guid>, System.ISpanFormattable, System.ISpanParsable<System.Guid>
     {
         private readonly int _dummyPrimitive;
@@ -2983,10 +2951,6 @@ namespace System
         public override int GetHashCode() { throw null; }
         public int ToHashCode() { throw null; }
     }
-    public partial class HttpStyleUriParser : System.UriParser
-    {
-        public HttpStyleUriParser() { }
-    }
     public partial interface IAsyncDisposable
     {
         System.Threading.Tasks.ValueTask DisposeAsync();
@@ -3873,10 +3837,6 @@ namespace System
         public Lazy(TMetadata metadata, System.Threading.LazyThreadSafetyMode mode) { }
         public TMetadata Metadata { get { throw null; } }
     }
-    public partial class LdapStyleUriParser : System.UriParser
-    {
-        public LdapStyleUriParser() { }
-    }
     public enum LoaderOptimization
     {
         NotSpecified = 0,
@@ -4235,18 +4195,6 @@ namespace System
         public MulticastNotSupportedException(string? message) { }
         public MulticastNotSupportedException(string? message, System.Exception? inner) { }
     }
-    public partial class NetPipeStyleUriParser : System.UriParser
-    {
-        public NetPipeStyleUriParser() { }
-    }
-    public partial class NetTcpStyleUriParser : System.UriParser
-    {
-        public NetTcpStyleUriParser() { }
-    }
-    public partial class NewsStyleUriParser : System.UriParser
-    {
-        public NewsStyleUriParser() { }
-    }
     [System.AttributeUsageAttribute(System.AttributeTargets.Field, Inherited=false)]
     public sealed partial class NonSerializedAttribute : System.Attribute
     {
@@ -6820,210 +6768,6 @@ namespace System
         public bool IsTerminating { get { throw null; } }
     }
     public delegate void UnhandledExceptionEventHandler(object sender, System.UnhandledExceptionEventArgs e);
-    public partial class Uri : System.Runtime.Serialization.ISerializable
-    {
-        public static readonly string SchemeDelimiter;
-        public static readonly string UriSchemeFile;
-        public static readonly string UriSchemeFtp;
-        public static readonly string UriSchemeFtps;
-        public static readonly string UriSchemeGopher;
-        public static readonly string UriSchemeHttp;
-        public static readonly string UriSchemeHttps;
-        public static readonly string UriSchemeMailto;
-        public static readonly string UriSchemeNetPipe;
-        public static readonly string UriSchemeNetTcp;
-        public static readonly string UriSchemeNews;
-        public static readonly string UriSchemeNntp;
-        public static readonly string UriSchemeSftp;
-        public static readonly string UriSchemeSsh;
-        public static readonly string UriSchemeTelnet;
-        public static readonly string UriSchemeWs;
-        public static readonly string UriSchemeWss;
-        protected Uri(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uriString) { }
-        [System.ObsoleteAttribute("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(string) instead.")]
-        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")]string uriString, bool dontEscape) { }
-        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")]string uriString, in System.UriCreationOptions creationOptions) { }
-        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri", "uriKind")] string uriString, System.UriKind uriKind) { }
-        public Uri(System.Uri baseUri, string? relativeUri) { }
-        [System.ObsoleteAttribute("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(Uri, string) instead.")]
-        public Uri(System.Uri baseUri, string? relativeUri, bool dontEscape) { }
-        public Uri(System.Uri baseUri, System.Uri relativeUri) { }
-        public string AbsolutePath { get { throw null; } }
-        public string AbsoluteUri { get { throw null; } }
-        public string Authority { get { throw null; } }
-        public string DnsSafeHost { get { throw null; } }
-        public string Fragment { get { throw null; } }
-        public string Host { get { throw null; } }
-        public System.UriHostNameType HostNameType { get { throw null; } }
-        public string IdnHost { get { throw null; } }
-        public bool IsAbsoluteUri { get { throw null; } }
-        public bool IsDefaultPort { get { throw null; } }
-        public bool IsFile { get { throw null; } }
-        public bool IsLoopback { get { throw null; } }
-        public bool IsUnc { get { throw null; } }
-        public string LocalPath { get { throw null; } }
-        public string OriginalString { get { throw null; } }
-        public string PathAndQuery { get { throw null; } }
-        public int Port { get { throw null; } }
-        public string Query { get { throw null; } }
-        public string Scheme { get { throw null; } }
-        public string[] Segments { get { throw null; } }
-        public bool UserEscaped { get { throw null; } }
-        public string UserInfo { get { throw null; } }
-        [System.ObsoleteAttribute("Uri.Canonicalize has been deprecated and is not supported.")]
-        protected virtual void Canonicalize() { }
-        public static System.UriHostNameType CheckHostName(string? name) { throw null; }
-        public static bool CheckSchemeName([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? schemeName) { throw null; }
-        [System.ObsoleteAttribute("Uri.CheckSecurity has been deprecated and is not supported.")]
-        protected virtual void CheckSecurity() { }
-        public static int Compare(System.Uri? uri1, System.Uri? uri2, System.UriComponents partsToCompare, System.UriFormat compareFormat, System.StringComparison comparisonType) { throw null; }
-        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? comparand) { throw null; }
-        [System.ObsoleteAttribute("Uri.Escape has been deprecated and is not supported.")]
-        protected virtual void Escape() { }
-        public static string EscapeDataString(string stringToEscape) { throw null; }
-        [System.ObsoleteAttribute("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")]
-        protected static string EscapeString(string? str) { throw null; }
-        [System.ObsoleteAttribute("Uri.EscapeUriString can corrupt the Uri string in some cases. Consider using Uri.EscapeDataString for query string components instead.", DiagnosticId = "SYSLIB0013", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
-        public static string EscapeUriString(string stringToEscape) { throw null; }
-        public static int FromHex(char digit) { throw null; }
-        public string GetComponents(System.UriComponents components, System.UriFormat format) { throw null; }
-        public override int GetHashCode() { throw null; }
-        public string GetLeftPart(System.UriPartial part) { throw null; }
-        protected void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-        public static string HexEscape(char character) { throw null; }
-        public static char HexUnescape(string pattern, ref int index) { throw null; }
-        [System.ObsoleteAttribute("Uri.IsBadFileSystemCharacter has been deprecated and is not supported.")]
-        protected virtual bool IsBadFileSystemCharacter(char character) { throw null; }
-        public bool IsBaseOf(System.Uri uri) { throw null; }
-        [System.ObsoleteAttribute("Uri.IsExcludedCharacter has been deprecated and is not supported.")]
-        protected static bool IsExcludedCharacter(char character) { throw null; }
-        public static bool IsHexDigit(char character) { throw null; }
-        public static bool IsHexEncoding(string pattern, int index) { throw null; }
-        [System.ObsoleteAttribute("Uri.IsReservedCharacter has been deprecated and is not supported.")]
-        protected virtual bool IsReservedCharacter(char character) { throw null; }
-        public bool IsWellFormedOriginalString() { throw null; }
-        public static bool IsWellFormedUriString([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true), System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri", "uriKind")] string? uriString, System.UriKind uriKind) { throw null; }
-        [System.ObsoleteAttribute("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri) instead.")]
-        public string MakeRelative(System.Uri toUri) { throw null; }
-        public System.Uri MakeRelativeUri(System.Uri uri) { throw null; }
-        public static bool operator ==(System.Uri? uri1, System.Uri? uri2) { throw null; }
-        public static bool operator !=(System.Uri? uri1, System.Uri? uri2) { throw null; }
-        [System.ObsoleteAttribute("Uri.Parse has been deprecated and is not supported.")]
-        protected virtual void Parse() { }
-        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-        public override string ToString() { throw null; }
-        public static bool TryCreate([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true), System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? uriString, in System.UriCreationOptions creationOptions, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
-        public static bool TryCreate([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true), System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri", "uriKind")] string? uriString, System.UriKind uriKind, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
-        public static bool TryCreate(System.Uri? baseUri, string? relativeUri, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
-        public static bool TryCreate(System.Uri? baseUri, System.Uri? relativeUri, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
-        [System.ObsoleteAttribute("Uri.Unescape has been deprecated. Use GetComponents() or Uri.UnescapeDataString() to unescape a Uri component or a string.")]
-        protected virtual string Unescape(string path) { throw null; }
-        public static string UnescapeDataString(string stringToUnescape) { throw null; }
-    }
-    public partial class UriBuilder
-    {
-        public UriBuilder() { }
-        public UriBuilder([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uri) { }
-        public UriBuilder(string? schemeName, string? hostName) { }
-        public UriBuilder(string? scheme, string? host, int portNumber) { }
-        public UriBuilder(string? scheme, string? host, int port, string? pathValue) { }
-        public UriBuilder(string? scheme, string? host, int port, string? path, string? extraValue) { }
-        public UriBuilder(System.Uri uri) { }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string Fragment { get { throw null; } set { } }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string Host { get { throw null; } set { } }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string Password { get { throw null; } set { } }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string Path { get { throw null; } set { } }
-        public int Port { get { throw null; } set { } }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string Query { get { throw null; } set { } }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string Scheme { get { throw null; } set { } }
-        public System.Uri Uri { get { throw null; } }
-        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
-        public string UserName { get { throw null; } set { } }
-        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? rparam) { throw null; }
-        public override int GetHashCode() { throw null; }
-        public override string ToString() { throw null; }
-    }
-    [System.FlagsAttribute]
-    public enum UriComponents
-    {
-        SerializationInfoString = -2147483648,
-        Scheme = 1,
-        UserInfo = 2,
-        Host = 4,
-        Port = 8,
-        SchemeAndServer = 13,
-        Path = 16,
-        Query = 32,
-        PathAndQuery = 48,
-        HttpRequestUrl = 61,
-        Fragment = 64,
-        AbsoluteUri = 127,
-        StrongPort = 128,
-        HostAndPort = 132,
-        StrongAuthority = 134,
-        NormalizedHost = 256,
-        KeepDelimiter = 1073741824,
-    }
-    public partial struct UriCreationOptions
-    {
-        private int _dummyPrimitive;
-        public bool DangerousDisablePathAndQueryCanonicalization { readonly get { throw null; } set { } }
-    }
-    public enum UriFormat
-    {
-        UriEscaped = 1,
-        Unescaped = 2,
-        SafeUnescaped = 3,
-    }
-    public partial class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable
-    {
-        public UriFormatException() { }
-        protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-        public UriFormatException(string? textString) { }
-        public UriFormatException(string? textString, System.Exception? e) { }
-        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-    }
-    public enum UriHostNameType
-    {
-        Unknown = 0,
-        Basic = 1,
-        Dns = 2,
-        IPv4 = 3,
-        IPv6 = 4,
-    }
-    public enum UriKind
-    {
-        RelativeOrAbsolute = 0,
-        Absolute = 1,
-        Relative = 2,
-    }
-    public abstract partial class UriParser
-    {
-        protected UriParser() { }
-        protected virtual string GetComponents(System.Uri uri, System.UriComponents components, System.UriFormat format) { throw null; }
-        protected virtual void InitializeAndValidate(System.Uri uri, out System.UriFormatException? parsingError) { throw null; }
-        protected virtual bool IsBaseOf(System.Uri baseUri, System.Uri relativeUri) { throw null; }
-        public static bool IsKnownScheme(string schemeName) { throw null; }
-        protected virtual bool IsWellFormedOriginalString(System.Uri uri) { throw null; }
-        protected virtual System.UriParser OnNewUri() { throw null; }
-        protected virtual void OnRegister(string schemeName, int defaultPort) { }
-        public static void Register(System.UriParser uriParser, string schemeName, int defaultPort) { }
-        protected virtual string? Resolve(System.Uri baseUri, System.Uri? relativeUri, out System.UriFormatException? parsingError) { throw null; }
-    }
-    public enum UriPartial
-    {
-        Scheme = 0,
-        Authority = 1,
-        Path = 2,
-        Query = 3,
-    }
     public partial struct ValueTuple : System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.IComparable, System.IComparable<System.ValueTuple>, System.IEquatable<System.ValueTuple>, System.Runtime.CompilerServices.ITuple
     {
         object? System.Runtime.CompilerServices.ITuple.this[int index] { get { throw null; } }
@@ -15115,3 +14859,264 @@ namespace System.Threading.Tasks.Sources
         Canceled = 3,
     }
 }
+#if !BUILDING_CORELIB_REFERENCE
+namespace System
+{
+    public partial class FileStyleUriParser : System.UriParser
+    {
+        public FileStyleUriParser() { }
+    }
+    public partial class FtpStyleUriParser : System.UriParser
+    {
+        public FtpStyleUriParser() { }
+    }
+    public partial class GenericUriParser : System.UriParser
+    {
+        public GenericUriParser(System.GenericUriParserOptions options) { }
+    }
+    [System.FlagsAttribute]
+    public enum GenericUriParserOptions
+    {
+        Default = 0,
+        GenericAuthority = 1,
+        AllowEmptyAuthority = 2,
+        NoUserInfo = 4,
+        NoPort = 8,
+        NoQuery = 16,
+        NoFragment = 32,
+        DontConvertPathBackslashes = 64,
+        DontCompressPath = 128,
+        DontUnescapePathDotsAndSlashes = 256,
+        Idn = 512,
+        IriParsing = 1024,
+    }
+    public partial class GopherStyleUriParser : System.UriParser
+    {
+        public GopherStyleUriParser() { }
+    }
+    public partial class HttpStyleUriParser : System.UriParser
+    {
+        public HttpStyleUriParser() { }
+    }
+    public partial class LdapStyleUriParser : System.UriParser
+    {
+        public LdapStyleUriParser() { }
+    }
+    public partial class NetPipeStyleUriParser : System.UriParser
+    {
+        public NetPipeStyleUriParser() { }
+    }
+    public partial class NetTcpStyleUriParser : System.UriParser
+    {
+        public NetTcpStyleUriParser() { }
+    }
+    public partial class NewsStyleUriParser : System.UriParser
+    {
+        public NewsStyleUriParser() { }
+    }
+    public partial class Uri : System.Runtime.Serialization.ISerializable
+    {
+        public static readonly string SchemeDelimiter;
+        public static readonly string UriSchemeFile;
+        public static readonly string UriSchemeFtp;
+        public static readonly string UriSchemeFtps;
+        public static readonly string UriSchemeGopher;
+        public static readonly string UriSchemeHttp;
+        public static readonly string UriSchemeHttps;
+        public static readonly string UriSchemeMailto;
+        public static readonly string UriSchemeNetPipe;
+        public static readonly string UriSchemeNetTcp;
+        public static readonly string UriSchemeNews;
+        public static readonly string UriSchemeNntp;
+        public static readonly string UriSchemeSftp;
+        public static readonly string UriSchemeSsh;
+        public static readonly string UriSchemeTelnet;
+        public static readonly string UriSchemeWs;
+        public static readonly string UriSchemeWss;
+        protected Uri(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
+        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uriString) { }
+        [System.ObsoleteAttribute("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(string) instead.")]
+        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")]string uriString, bool dontEscape) { }
+        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")]string uriString, in System.UriCreationOptions creationOptions) { }
+        public Uri([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri", "uriKind")] string uriString, System.UriKind uriKind) { }
+        public Uri(System.Uri baseUri, string? relativeUri) { }
+        [System.ObsoleteAttribute("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(Uri, string) instead.")]
+        public Uri(System.Uri baseUri, string? relativeUri, bool dontEscape) { }
+        public Uri(System.Uri baseUri, System.Uri relativeUri) { }
+        public string AbsolutePath { get { throw null; } }
+        public string AbsoluteUri { get { throw null; } }
+        public string Authority { get { throw null; } }
+        public string DnsSafeHost { get { throw null; } }
+        public string Fragment { get { throw null; } }
+        public string Host { get { throw null; } }
+        public System.UriHostNameType HostNameType { get { throw null; } }
+        public string IdnHost { get { throw null; } }
+        public bool IsAbsoluteUri { get { throw null; } }
+        public bool IsDefaultPort { get { throw null; } }
+        public bool IsFile { get { throw null; } }
+        public bool IsLoopback { get { throw null; } }
+        public bool IsUnc { get { throw null; } }
+        public string LocalPath { get { throw null; } }
+        public string OriginalString { get { throw null; } }
+        public string PathAndQuery { get { throw null; } }
+        public int Port { get { throw null; } }
+        public string Query { get { throw null; } }
+        public string Scheme { get { throw null; } }
+        public string[] Segments { get { throw null; } }
+        public bool UserEscaped { get { throw null; } }
+        public string UserInfo { get { throw null; } }
+        [System.ObsoleteAttribute("Uri.Canonicalize has been deprecated and is not supported.")]
+        protected virtual void Canonicalize() { }
+        public static System.UriHostNameType CheckHostName(string? name) { throw null; }
+        public static bool CheckSchemeName([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? schemeName) { throw null; }
+        [System.ObsoleteAttribute("Uri.CheckSecurity has been deprecated and is not supported.")]
+        protected virtual void CheckSecurity() { }
+        public static int Compare(System.Uri? uri1, System.Uri? uri2, System.UriComponents partsToCompare, System.UriFormat compareFormat, System.StringComparison comparisonType) { throw null; }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? comparand) { throw null; }
+        [System.ObsoleteAttribute("Uri.Escape has been deprecated and is not supported.")]
+        protected virtual void Escape() { }
+        public static string EscapeDataString(string stringToEscape) { throw null; }
+        [System.ObsoleteAttribute("Uri.EscapeString has been deprecated. Use GetComponents() or Uri.EscapeDataString to escape a Uri component or a string.")]
+        protected static string EscapeString(string? str) { throw null; }
+        [System.ObsoleteAttribute("Uri.EscapeUriString can corrupt the Uri string in some cases. Consider using Uri.EscapeDataString for query string components instead.", DiagnosticId = "SYSLIB0013", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+        public static string EscapeUriString(string stringToEscape) { throw null; }
+        public static int FromHex(char digit) { throw null; }
+        public string GetComponents(System.UriComponents components, System.UriFormat format) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public string GetLeftPart(System.UriPartial part) { throw null; }
+        protected void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
+        public static string HexEscape(char character) { throw null; }
+        public static char HexUnescape(string pattern, ref int index) { throw null; }
+        [System.ObsoleteAttribute("Uri.IsBadFileSystemCharacter has been deprecated and is not supported.")]
+        protected virtual bool IsBadFileSystemCharacter(char character) { throw null; }
+        public bool IsBaseOf(System.Uri uri) { throw null; }
+        [System.ObsoleteAttribute("Uri.IsExcludedCharacter has been deprecated and is not supported.")]
+        protected static bool IsExcludedCharacter(char character) { throw null; }
+        public static bool IsHexDigit(char character) { throw null; }
+        public static bool IsHexEncoding(string pattern, int index) { throw null; }
+        [System.ObsoleteAttribute("Uri.IsReservedCharacter has been deprecated and is not supported.")]
+        protected virtual bool IsReservedCharacter(char character) { throw null; }
+        public bool IsWellFormedOriginalString() { throw null; }
+        public static bool IsWellFormedUriString([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true), System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri", "uriKind")] string? uriString, System.UriKind uriKind) { throw null; }
+        [System.ObsoleteAttribute("Uri.MakeRelative has been deprecated. Use MakeRelativeUri(Uri uri) instead.")]
+        public string MakeRelative(System.Uri toUri) { throw null; }
+        public System.Uri MakeRelativeUri(System.Uri uri) { throw null; }
+        public static bool operator ==(System.Uri? uri1, System.Uri? uri2) { throw null; }
+        public static bool operator !=(System.Uri? uri1, System.Uri? uri2) { throw null; }
+        [System.ObsoleteAttribute("Uri.Parse has been deprecated and is not supported.")]
+        protected virtual void Parse() { }
+        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
+        public override string ToString() { throw null; }
+        public static bool TryCreate([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true), System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string? uriString, in System.UriCreationOptions creationOptions, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
+        public static bool TryCreate([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true), System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri", "uriKind")] string? uriString, System.UriKind uriKind, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
+        public static bool TryCreate(System.Uri? baseUri, string? relativeUri, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
+        public static bool TryCreate(System.Uri? baseUri, System.Uri? relativeUri, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Uri? result) { throw null; }
+        [System.ObsoleteAttribute("Uri.Unescape has been deprecated. Use GetComponents() or Uri.UnescapeDataString() to unescape a Uri component or a string.")]
+        protected virtual string Unescape(string path) { throw null; }
+        public static string UnescapeDataString(string stringToUnescape) { throw null; }
+    }
+    public partial class UriBuilder
+    {
+        public UriBuilder() { }
+        public UriBuilder([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("Uri")] string uri) { }
+        public UriBuilder(string? schemeName, string? hostName) { }
+        public UriBuilder(string? scheme, string? host, int portNumber) { }
+        public UriBuilder(string? scheme, string? host, int port, string? pathValue) { }
+        public UriBuilder(string? scheme, string? host, int port, string? path, string? extraValue) { }
+        public UriBuilder(System.Uri uri) { }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string Fragment { get { throw null; } set { } }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string Host { get { throw null; } set { } }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string Password { get { throw null; } set { } }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string Path { get { throw null; } set { } }
+        public int Port { get { throw null; } set { } }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string Query { get { throw null; } set { } }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string Scheme { get { throw null; } set { } }
+        public System.Uri Uri { get { throw null; } }
+        [System.Diagnostics.CodeAnalysis.AllowNullAttribute]
+        public string UserName { get { throw null; } set { } }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? rparam) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public override string ToString() { throw null; }
+    }
+    [System.FlagsAttribute]
+    public enum UriComponents
+    {
+        SerializationInfoString = -2147483648,
+        Scheme = 1,
+        UserInfo = 2,
+        Host = 4,
+        Port = 8,
+        SchemeAndServer = 13,
+        Path = 16,
+        Query = 32,
+        PathAndQuery = 48,
+        HttpRequestUrl = 61,
+        Fragment = 64,
+        AbsoluteUri = 127,
+        StrongPort = 128,
+        HostAndPort = 132,
+        StrongAuthority = 134,
+        NormalizedHost = 256,
+        KeepDelimiter = 1073741824,
+    }
+    public partial struct UriCreationOptions
+    {
+        private int _dummyPrimitive;
+        public bool DangerousDisablePathAndQueryCanonicalization { readonly get { throw null; } set { } }
+    }
+    public enum UriFormat
+    {
+        UriEscaped = 1,
+        Unescaped = 2,
+        SafeUnescaped = 3,
+    }
+    public partial class UriFormatException : System.FormatException, System.Runtime.Serialization.ISerializable
+    {
+        public UriFormatException() { }
+        protected UriFormatException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
+        public UriFormatException(string? textString) { }
+        public UriFormatException(string? textString, System.Exception? e) { }
+        void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
+    }
+    public enum UriHostNameType
+    {
+        Unknown = 0,
+        Basic = 1,
+        Dns = 2,
+        IPv4 = 3,
+        IPv6 = 4,
+    }
+    public enum UriKind
+    {
+        RelativeOrAbsolute = 0,
+        Absolute = 1,
+        Relative = 2,
+    }
+    public abstract partial class UriParser
+    {
+        protected UriParser() { }
+        protected virtual string GetComponents(System.Uri uri, System.UriComponents components, System.UriFormat format) { throw null; }
+        protected virtual void InitializeAndValidate(System.Uri uri, out System.UriFormatException? parsingError) { throw null; }
+        protected virtual bool IsBaseOf(System.Uri baseUri, System.Uri relativeUri) { throw null; }
+        public static bool IsKnownScheme(string schemeName) { throw null; }
+        protected virtual bool IsWellFormedOriginalString(System.Uri uri) { throw null; }
+        protected virtual System.UriParser OnNewUri() { throw null; }
+        protected virtual void OnRegister(string schemeName, int defaultPort) { }
+        public static void Register(System.UriParser uriParser, string schemeName, int defaultPort) { }
+        protected virtual string? Resolve(System.Uri baseUri, System.Uri? relativeUri, out System.UriFormatException? parsingError) { throw null; }
+    }
+    public enum UriPartial
+    {
+        Scheme = 0,
+        Authority = 1,
+        Path = 2,
+        Query = 3,
+    }
+}
+#endif // !BUILDING_CORELIB_REFERENCE
index a1f033a..c8fb3fb 100644 (file)
@@ -3,6 +3,13 @@
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
   </PropertyGroup>
+  <PropertyGroup>
+    <!-- the System.Runtime project is special, we need to be able to hide the System.Private.Uri types for the generated ref .cs so we can include it in the System.Private.CoreLib ref .cs -->
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
+    <ProjectForGenAPIDocIdGeneration>$(UriProject)</ProjectForGenAPIDocIdGeneration>
+    <SymbolForGenAPIConditionalTypeLists>!BUILDING_CORELIB_REFERENCE</SymbolForGenAPIConditionalTypeLists>
+    <GenAPIExcludeApiList>$(CoreLibRefDir)System.Private.CoreLib.ExtraApis.txt</GenAPIExcludeApiList>
+  </PropertyGroup>
   <ItemGroup>
     <!-- Compiler throws error if you try to use System.Void and instructs you to use void keyword instead. So we have manually added a typeforward for this type. -->
     <GenFacadesOmitType Include="System.Void" />
@@ -12,6 +19,6 @@
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="$(CoreLibProject)" />
-    <ProjectReference Include="$(LibrariesProjectRoot)System.Private.Uri\src\System.Private.Uri.csproj" />
+    <ProjectReference Include="$(UriProject)" />
   </ItemGroup>
 </Project>
diff --git a/src/libraries/System.Threading.Thread/src/ApiCompatBaseline.txt b/src/libraries/System.Threading.Thread/src/ApiCompatBaseline.txt
deleted file mode 100644 (file)
index 33ad3c9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-Compat issues with assembly System.Threading.Thread:
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.Thread.Start()' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.Thread.Start(System.Object)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.Thread.UnsafeStart()' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.Thread.UnsafeStart(System.Object)' in the contract but not the implementation.
-Total Issues: 4
index 319f6f5..57a6f7f 100644 (file)
@@ -7,4 +7,10 @@
   <ItemGroup>
     <ProjectReference Include="$(CoreLibProject)" />
   </ItemGroup>
+  <ItemGroup Condition="'$(WasmEnableThreads)' == 'true'">
+    <!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
+         but this contract still does since we only expose the wasm threading through System.Diagnostics.Threading.Thread.WebAssembly.Threading
+         so we need to baseline the ApiCompat errors related to that -->
+    <ApiCompatBaselineFile Include="ApiCompatBaseline.Threading.txt" />
+  </ItemGroup>
 </Project>
diff --git a/src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.txt b/src/libraries/System.Threading.ThreadPool/src/ApiCompatBaseline.txt
deleted file mode 100644 (file)
index 3dfbafe..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Compat issues with assembly System.Threading.ThreadPool:
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.RegisteredWaitHandle' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.Int32, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.Int64, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.TimeSpan, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.RegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.UInt32, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.Int32, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.Int64, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.TimeSpan, System.Boolean)' in the contract but not the implementation.
-CannotRemoveAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' exists on 'System.Threading.ThreadPool.UnsafeRegisterWaitForSingleObject(System.Threading.WaitHandle, System.Threading.WaitOrTimerCallback, System.Object, System.UInt32, System.Boolean)' in the contract but not the implementation.
-Total Issues: 9
index 49a3f30..bda5561 100644 (file)
@@ -6,4 +6,10 @@
   <ItemGroup>
     <ProjectReference Include="$(CoreLibProject)" />
   </ItemGroup>
+  <ItemGroup Condition="'$(WasmEnableThreads)' == 'true'">
+    <!-- when wasm threading is enabled the implementation in CoreLib won't have the UnsupportedOSAttribute for browser,
+         but this contract still does since we only expose the wasm threading through System.Diagnostics.Threading.ThreadPool.WebAssembly.Threading
+         so we need to baseline the ApiCompat errors related to that -->
+    <ApiCompatBaselineFile Include="ApiCompatBaseline.Threading.txt" />
+  </ItemGroup>
 </Project>
\ No newline at end of file
index 1415f8c..2963a3a 100644 (file)
@@ -4,52 +4,9 @@
 // Changes to this file must follow the https://aka.ms/api-review process.
 // ------------------------------------------------------------------------------
 
+#if !BUILDING_CORELIB_REFERENCE
 namespace System.Threading
 {
-    public partial class AbandonedMutexException : System.SystemException
-    {
-        public AbandonedMutexException() { }
-        public AbandonedMutexException(int location, System.Threading.WaitHandle? handle) { }
-        protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-        public AbandonedMutexException(string? message) { }
-        public AbandonedMutexException(string? message, System.Exception? inner) { }
-        public AbandonedMutexException(string? message, System.Exception? inner, int location, System.Threading.WaitHandle? handle) { }
-        public AbandonedMutexException(string? message, int location, System.Threading.WaitHandle? handle) { }
-        public System.Threading.Mutex? Mutex { get { throw null; } }
-        public int MutexIndex { get { throw null; } }
-    }
-    public partial struct AsyncFlowControl : System.IEquatable<AsyncFlowControl>, System.IDisposable
-    {
-        private object _dummy;
-        private int _dummyPrimitive;
-        public void Dispose() { }
-        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
-        public bool Equals(System.Threading.AsyncFlowControl obj) { throw null; }
-        public override int GetHashCode() { throw null; }
-        public static bool operator ==(System.Threading.AsyncFlowControl a, System.Threading.AsyncFlowControl b) { throw null; }
-        public static bool operator !=(System.Threading.AsyncFlowControl a, System.Threading.AsyncFlowControl b) { throw null; }
-        public void Undo() { }
-    }
-    public readonly partial struct AsyncLocalValueChangedArgs<T>
-    {
-        private readonly T _PreviousValue_k__BackingField;
-        private readonly T _CurrentValue_k__BackingField;
-        private readonly int _dummyPrimitive;
-        public T? CurrentValue { get { throw null; } }
-        public T? PreviousValue { get { throw null; } }
-        public bool ThreadContextChanged { get { throw null; } }
-    }
-    public sealed partial class AsyncLocal<T>
-    {
-        public AsyncLocal() { }
-        public AsyncLocal(System.Action<System.Threading.AsyncLocalValueChangedArgs<T>>? valueChangedHandler) { }
-        [System.Diagnostics.CodeAnalysis.MaybeNullAttribute]
-        public T Value { get { throw null; } set { } }
-    }
-    public sealed partial class AutoResetEvent : System.Threading.EventWaitHandle
-    {
-        public AutoResetEvent(bool initialState) : base (default(bool), default(System.Threading.EventResetMode)) { }
-    }
     public partial class Barrier : System.IDisposable
     {
         public Barrier(int participantCount) { }
@@ -86,7 +43,6 @@ namespace System.Threading
         public BarrierPostPhaseException(string? message) { }
         public BarrierPostPhaseException(string? message, System.Exception? innerException) { }
     }
-    public delegate void ContextCallback(object? state);
     public partial class CountdownEvent : System.IDisposable
     {
         public CountdownEvent(int initialCount) { }
@@ -117,6 +73,104 @@ namespace System.Threading
         [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
         public bool Wait(System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken) { throw null; }
     }
+    public partial class HostExecutionContext : System.IDisposable
+    {
+        public HostExecutionContext() { }
+        public HostExecutionContext(object? state) { }
+        protected internal object? State { get { throw null; } set { } }
+        public virtual System.Threading.HostExecutionContext CreateCopy() { throw null; }
+        public void Dispose() { }
+        public virtual void Dispose(bool disposing) { }
+    }
+    public partial class HostExecutionContextManager
+    {
+        public HostExecutionContextManager() { }
+        public virtual System.Threading.HostExecutionContext? Capture() { throw null; }
+        public virtual void Revert(object previousState) { }
+        public virtual object SetHostExecutionContext(System.Threading.HostExecutionContext hostExecutionContext) { throw null; }
+    }
+    public partial struct LockCookie : System.IEquatable<System.Threading.LockCookie>
+    {
+        private int _dummyPrimitive;
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public bool Equals(System.Threading.LockCookie obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public static bool operator ==(System.Threading.LockCookie a, System.Threading.LockCookie b) { throw null; }
+        public static bool operator !=(System.Threading.LockCookie a, System.Threading.LockCookie b) { throw null; }
+    }
+    public sealed partial class ReaderWriterLock : System.Runtime.ConstrainedExecution.CriticalFinalizerObject
+    {
+        public ReaderWriterLock() { }
+        public bool IsReaderLockHeld { get { throw null; } }
+        public bool IsWriterLockHeld { get { throw null; } }
+        public int WriterSeqNum { get { throw null; } }
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+        public void AcquireReaderLock(int millisecondsTimeout) { }
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+        public void AcquireReaderLock(System.TimeSpan timeout) { }
+        public void AcquireWriterLock(int millisecondsTimeout) { }
+        public void AcquireWriterLock(System.TimeSpan timeout) { }
+        public bool AnyWritersSince(int seqNum) { throw null; }
+        public void DowngradeFromWriterLock(ref System.Threading.LockCookie lockCookie) { }
+        public System.Threading.LockCookie ReleaseLock() { throw null; }
+        public void ReleaseReaderLock() { }
+        public void ReleaseWriterLock() { }
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+        public void RestoreLock(ref System.Threading.LockCookie lockCookie) { }
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+        public System.Threading.LockCookie UpgradeToWriterLock(int millisecondsTimeout) { throw null; }
+        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+        public System.Threading.LockCookie UpgradeToWriterLock(System.TimeSpan timeout) { throw null; }
+    }
+}
+#endif // !BUILDING_CORELIB_REFERENCE
+namespace System.Threading
+{
+    public partial class AbandonedMutexException : System.SystemException
+    {
+        public AbandonedMutexException() { }
+        public AbandonedMutexException(int location, System.Threading.WaitHandle? handle) { }
+        protected AbandonedMutexException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
+        public AbandonedMutexException(string? message) { }
+        public AbandonedMutexException(string? message, System.Exception? inner) { }
+        public AbandonedMutexException(string? message, System.Exception? inner, int location, System.Threading.WaitHandle? handle) { }
+        public AbandonedMutexException(string? message, int location, System.Threading.WaitHandle? handle) { }
+        public System.Threading.Mutex? Mutex { get { throw null; } }
+        public int MutexIndex { get { throw null; } }
+    }
+    public partial struct AsyncFlowControl : System.IEquatable<AsyncFlowControl>, System.IDisposable
+    {
+        private object _dummy;
+        private int _dummyPrimitive;
+        public void Dispose() { }
+        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
+        public bool Equals(System.Threading.AsyncFlowControl obj) { throw null; }
+        public override int GetHashCode() { throw null; }
+        public static bool operator ==(System.Threading.AsyncFlowControl a, System.Threading.AsyncFlowControl b) { throw null; }
+        public static bool operator !=(System.Threading.AsyncFlowControl a, System.Threading.AsyncFlowControl b) { throw null; }
+        public void Undo() { }
+    }
+    public readonly partial struct AsyncLocalValueChangedArgs<T>
+    {
+        private readonly T _PreviousValue_k__BackingField;
+        private readonly T _CurrentValue_k__BackingField;
+        private readonly int _dummyPrimitive;
+        public T? CurrentValue { get { throw null; } }
+        public T? PreviousValue { get { throw null; } }
+        public bool ThreadContextChanged { get { throw null; } }
+    }
+    public sealed partial class AsyncLocal<T>
+    {
+        public AsyncLocal() { }
+        public AsyncLocal(System.Action<System.Threading.AsyncLocalValueChangedArgs<T>>? valueChangedHandler) { }
+        [System.Diagnostics.CodeAnalysis.MaybeNullAttribute]
+        public T Value { get { throw null; } set { } }
+    }
+    public sealed partial class AutoResetEvent : System.Threading.EventWaitHandle
+    {
+        public AutoResetEvent(bool initialState) : base (default(bool), default(System.Threading.EventResetMode)) { }
+    }
+    public delegate void ContextCallback(object? state);
     public enum EventResetMode
     {
         AutoReset = 0,
@@ -147,22 +201,6 @@ namespace System.Threading
         public static void Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object? state) { }
         public static System.Threading.AsyncFlowControl SuppressFlow() { throw null; }
     }
-    public partial class HostExecutionContext : System.IDisposable
-    {
-        public HostExecutionContext() { }
-        public HostExecutionContext(object? state) { }
-        protected internal object? State { get { throw null; } set { } }
-        public virtual System.Threading.HostExecutionContext CreateCopy() { throw null; }
-        public void Dispose() { }
-        public virtual void Dispose(bool disposing) { }
-    }
-    public partial class HostExecutionContextManager
-    {
-        public HostExecutionContextManager() { }
-        public virtual System.Threading.HostExecutionContext? Capture() { throw null; }
-        public virtual void Revert(object previousState) { }
-        public virtual object SetHostExecutionContext(System.Threading.HostExecutionContext hostExecutionContext) { throw null; }
-    }
     public static partial class Interlocked
     {
         public static int Add(ref int location1, int value) { throw null; }
@@ -239,15 +277,6 @@ namespace System.Threading
         public static T EnsureInitialized<T>([System.Diagnostics.CodeAnalysis.NotNullAttribute] ref T? target, System.Func<T> valueFactory) where T : class { throw null; }
         public static T EnsureInitialized<T>([System.Diagnostics.CodeAnalysis.NotNullAttribute] ref T? target, [System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("syncLock")] ref object? syncLock, System.Func<T> valueFactory) where T : class { throw null; }
     }
-    public partial struct LockCookie : System.IEquatable<System.Threading.LockCookie>
-    {
-        private int _dummyPrimitive;
-        public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; }
-        public bool Equals(System.Threading.LockCookie obj) { throw null; }
-        public override int GetHashCode() { throw null; }
-        public static bool operator ==(System.Threading.LockCookie a, System.Threading.LockCookie b) { throw null; }
-        public static bool operator !=(System.Threading.LockCookie a, System.Threading.LockCookie b) { throw null; }
-    }
     public partial class LockRecursionException : System.Exception
     {
         public LockRecursionException() { }
@@ -325,30 +354,6 @@ namespace System.Threading
         public void ReleaseMutex() { }
         public static bool TryOpenExisting(string name, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out System.Threading.Mutex? result) { throw null; }
     }
-    public sealed partial class ReaderWriterLock : System.Runtime.ConstrainedExecution.CriticalFinalizerObject
-    {
-        public ReaderWriterLock() { }
-        public bool IsReaderLockHeld { get { throw null; } }
-        public bool IsWriterLockHeld { get { throw null; } }
-        public int WriterSeqNum { get { throw null; } }
-        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
-        public void AcquireReaderLock(int millisecondsTimeout) { }
-        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
-        public void AcquireReaderLock(System.TimeSpan timeout) { }
-        public void AcquireWriterLock(int millisecondsTimeout) { }
-        public void AcquireWriterLock(System.TimeSpan timeout) { }
-        public bool AnyWritersSince(int seqNum) { throw null; }
-        public void DowngradeFromWriterLock(ref System.Threading.LockCookie lockCookie) { }
-        public System.Threading.LockCookie ReleaseLock() { throw null; }
-        public void ReleaseReaderLock() { }
-        public void ReleaseWriterLock() { }
-        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
-        public void RestoreLock(ref System.Threading.LockCookie lockCookie) { }
-        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
-        public System.Threading.LockCookie UpgradeToWriterLock(int millisecondsTimeout) { throw null; }
-        [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
-        public System.Threading.LockCookie UpgradeToWriterLock(System.TimeSpan timeout) { throw null; }
-    }
     public partial class ReaderWriterLockSlim : System.IDisposable
     {
         public ReaderWriterLockSlim() { }
index 2057065..929c5cb 100644 (file)
@@ -2,6 +2,7 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
+    <ContractTypesPartiallyMoved>true</ContractTypesPartiallyMoved>
     <TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
   </PropertyGroup>
   <ItemGroup>
diff --git a/src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt b/src/mono/System.Private.CoreLib/MatchingRefApiCompatBaseline.txt
new file mode 100644 (file)
index 0000000..baf962e
--- /dev/null
@@ -0,0 +1,29 @@
+Compat issues with assembly System.Private.CoreLib:
+TypesMustExist : Type 'Internal.Console' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'Internal.Runtime.InteropServices.ComponentActivator' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.add_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_ProcessExit(System.EventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.AppContext.remove_UnhandledException(System.UnhandledExceptionEventHandler)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Environment.FailFast(System.String, System.Exception, System.String)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected void System.Diagnostics.Tracing.EventCounter.Flush()' does not exist in the reference but it does exist in the implementation.
+CannotMakeTypeAbstract : Type 'System.Diagnostics.Tracing.EventListener' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener..ctor()' is 'protected' in the reference but 'public' in the implementation.
+CannotMakeMoreVisible : Visibility of member 'System.Diagnostics.Tracing.EventListener.EventSourceIndex(System.Diagnostics.Tracing.EventSource)' is 'protected' in the reference but 'public' in the implementation.
+TypesMustExist : Type 'System.Diagnostics.Tracing.TraceLoggingEventTypes' does not exist in the reference but it does exist in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.Boolean System.IO.FileSystemInfo.Exists.get()' is abstract in the reference but is not abstract in the implementation.
+CannotMakeMemberAbstract : Member 'public System.String System.IO.FileSystemInfo.Name.get()' is abstract in the reference but is not abstract in the implementation.
+MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Module.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.ModuleHandle System.Reflection.Emit.ModuleBuilder.GetModuleHandleImpl()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.String System.String System.Resources.ResourceManager.BaseNameField' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'protected System.Resources.IResourceReader System.Resources.IResourceReader System.Resources.ResourceSet.Reader' does not exist in the reference but it does exist in the implementation.
+TypesMustExist : Type 'System.Runtime.CompilerServices.ICastable' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute..ctor()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public System.Boolean System.Runtime.Serialization.SerializationInfo.DeserializationInProgress.get()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress()' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.ThrowIfDeserializationInProgress(System.String, System.Int32)' does not exist in the reference but it does exist in the implementation.
+MembersMustExist : Member 'public void System.Runtime.Serialization.SerializationInfo.UpdateValue(System.String, System.Object, System.Type)' does not exist in the reference but it does exist in the implementation.
index e9ffd3d..87a37c5 100644 (file)
     </ItemGroup>
   </Target>
 
+  <!-- Import refererence assembly and ApiCompat logic -->
+  <PropertyGroup>
+    <IsSourceProject>true</IsSourceProject>
+    <ApiCompatValidateBaseline>true</ApiCompatValidateBaseline>
+  </PropertyGroup>
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.props" />
+  <Import Project="$(RepositoryEngineeringDir)resolveContract.targets" />
+
 </Project>
index 4887cf2..c8e04b4 100644 (file)
@@ -11,7 +11,9 @@ using Microsoft.Win32.SafeHandles;
 
 namespace System.Threading
 {
-    [UnsupportedOSPlatform("browser")]
+#if !FEATURE_WASM_THREADS
+    [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
+#endif
     public sealed class RegisteredWaitHandle : MarshalByRefObject
     {
         internal RegisteredWaitHandle()