diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index c1ed1cec76..6780aef125 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -167,6 +167,7 @@ The runtime library (`WinRT.Runtime.dll`) provides all common infrastructure for
- **Warnings as errors**: release only. `EnforceCodeStyleInBuild` enabled, `AnalysisLevelStyle` = `latest-all`.
- **Strong-name signed** with `key.snk`
- **AOT compatible**: `IsAotCompatible = true`
+- **Reference assembly**: the project is built twice for NuGet packaging. With `CsWinRTBuildReferenceAssembly=true`, it produces a reference assembly (for `ref\net10.0\` in the NuGet) that strips all private implementation detail types and members via `#if !REFERENCE_ASSEMBLY`. The normal build produces the full implementation assembly (for `lib\net10.0\`). This replaces the previous approach of marking implementation details with `[Obsolete]` and `[EditorBrowsable(Never)]` attributes.
**Directory structure:**
@@ -506,7 +507,7 @@ The MSBuild integration is orchestrated through several `.props` and `.targets`
- **Compiler strict mode**: `strict` in all projects
- **XML documentation**: generated for all projects
- **`SkipLocalsInit`**: enabled in runtime and build tools for performance
-- **Suppressed warnings**: `CS8500` (ref safety in unsafe contexts), `AD0001` (analyzer crashes), `CSWINRT3001` (obsolete internal members)
+- **Suppressed warnings**: `CS8500` (ref safety in unsafe contexts), `AD0001` (analyzer crashes)
- **Strong-name signing**: all assemblies signed with `src/WinRT.Runtime2/key.snk`
### C++ project (cswinrt)
@@ -548,7 +549,6 @@ All three .NET build tools (`cswinrtimplgen`, `cswinrtprojectiongen`, `cswinrtin
| Impl Generator | `CSWINRTIMPLGENxxxx` | `0001`–`0010`, `9999` |
| Projection Generator | `CSWINRTPROJECTIONGENxxxx` | `0001`–`0008`, `9999` |
| Interop Generator | `CSWINRTINTEROPGENxxxx` | Various, `9999` |
-| Runtime (obsolete markers) | `CSWINRT3xxx` | `CSWINRT3001` |
---
diff --git a/.github/skills/interop-generator/SKILL.md b/.github/skills/interop-generator/SKILL.md
index 22a4ec56c9..bb9bb90365 100644
--- a/.github/skills/interop-generator/SKILL.md
+++ b/.github/skills/interop-generator/SKILL.md
@@ -32,7 +32,24 @@ The `WinRT.Interop.dll` assembly is produced by `cswinrtinteropgen`, which is a
- If a project **does not** reference CsWinRT, then `cswinrtinteropgen` is loaded from the Windows SDK projections targeting pack.
- If CsWinRT **is** referenced (directly or transitively), then `cswinrtinteropgen` is loaded from that package, but only if the `WinRT.Runtime.dll` binary from that package has a higher version than the one in the Windows SDK projections package being referenced. This correctly handles cases where a dependent project might have a reference to an outdated CsWinRT package.
-This version matching is critical because `cswinrtinteropgen` relies on "implementation details only" APIs in `WinRT.Runtime.dll` — APIs which are public, hidden, and marked as `[Obsolete]`, and which are exclusively meant to be consumed by generated code produced by `cswinrtinteropgen`. These APIs might change at any time without following semantic versioning for CsWinRT. For instance, they are crucial to support marshalling generic Windows Runtime collection interfaces, and the code in `WinRT.Interop.dll` makes heavy use of them in this scenario.
+This version matching is critical because `cswinrtinteropgen` relies on internal implementation detail APIs in `WinRT.Runtime.dll` — APIs which are public in the implementation assembly but excluded from the reference assembly (via `#if !REFERENCE_ASSEMBLY`), and which are exclusively meant to be consumed by generated code produced by `cswinrtinteropgen`. These APIs might change at any time without following semantic versioning for CsWinRT. For instance, they are crucial to support marshalling generic Windows Runtime collection interfaces, and the code in `WinRT.Interop.dll` makes heavy use of them in this scenario.
+
+### Private implementation detail APIs
+
+`WinRT.Runtime.dll` is shipped as two assemblies in the CsWinRT NuGet package: a **reference assembly** (in `ref\net10.0\`) that exposes only the versioned public API surface, and an **implementation assembly** (in `lib\net10.0\`) that contains the full set of types and members. Many types in the implementation assembly are "public" only because generated code in other assemblies (produced by `cswinrt.exe` and `cswinrtinteropgen`) needs to call them — they are not part of the stable API contract. These types are stripped from the reference assembly via `#if !REFERENCE_ASSEMBLY`, so consumers never see them.
+
+The interop generator receives a reference to the **implementation** `WinRT.Runtime.dll` (not the reference assembly) so that it can resolve and emit calls to these internal APIs. Examples of private implementation detail types that the interop generator uses heavily include:
+
+- **Vtable structs** (`IVectorVftbl`, `IMapVftbl`, `IIterableVftbl`, etc.) — the interop generator emits static readonly vtable fields for each projected interface, populated with function pointers to marshalling stubs.
+- **Collection adapters and methods** (`IListAdapter`, `IDictionaryMethods`, `IEnumerableMethods`, etc.) — generated native object wrappers delegate collection operations to these adapter types.
+- **Marshalling infrastructure** (`WindowsRuntimeObjectMarshaller`, `HStringMarshaller`, `WindowsRuntimeInterfaceMarshaller`, array marshallers, etc.) — generated marshalling stubs call these to convert between managed and native representations.
+- **Object reference types** (`WindowsRuntimeObjectReference`, `WindowsRuntimeObjectReferenceValue`, `CreateObjectReferenceMarshalingType`) — generated code uses these for COM pointer lifecycle management.
+- **ComWrappers callbacks** (`IWindowsRuntimeObjectComWrappersCallback`, `WindowsRuntimeComWrappersMarshal`) — generated CCW vtable entries and type map registrations use these.
+- **Type map groups** (`WindowsRuntimeComWrappersTypeMapGroup`, `WindowsRuntimeMetadataTypeMapGroup`, `DynamicInterfaceCastableImplementationTypeMapGroup`) — generated type map registrations target these groups.
+- **Projection implementations** (`IPropertyValueImpl`, `IStringableImpl`, `IMarshalImpl`, etc.) — generated code wires up these implementations in CCW vtables.
+- **ABI types** (under `ABI.*` namespaces) — per-type marshalling definitions and event source types.
+
+All of these types are referenced extensively throughout the interop generator's builder and factory classes (in `Builders/` and `Factories/`). When modifying these types in `WinRT.Runtime`, the corresponding interop generator code must be updated in lockstep — which is why the version matching described above is essential.
## Project settings
diff --git a/.github/skills/update-copilot-instructions/SKILL.md b/.github/skills/update-copilot-instructions/SKILL.md
index 210142edd0..86254ee632 100644
--- a/.github/skills/update-copilot-instructions/SKILL.md
+++ b/.github/skills/update-copilot-instructions/SKILL.md
@@ -26,6 +26,7 @@ Launch parallel explore agents for each of the 8 CsWinRT 3.0 projects listed in
- Key types listed still exist and have the described purposes
- T4 templates (`.tt` files) are accurately listed
- Project settings (TFM, language version, nullable, unsafe, etc.) are current
+ - Reference assembly build setup (`CsWinRTBuildReferenceAssembly`, `#if !REFERENCE_ASSEMBLY`) is accurately described
- Namespace organization matches
2. **WinRT.SourceGenerator2 (`src/Authoring/WinRT.SourceGenerator2/`)**
diff --git a/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml b/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml
index 82ba90240f..29b69242d0 100644
--- a/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-Build-Steps.yml
@@ -251,6 +251,25 @@ steps:
WinRT.Runtime.xml
TargetFolder: $(StagingFolder)\net10.0
+ # Build WinRT.Runtime reference assembly with implementation detail types stripped out
+ - task: VSBuild@1
+ displayName: Build WinRT.Runtime reference assembly
+ condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
+ inputs:
+ solution: $(Build.SourcesDirectory)\src\WinRT.Runtime2\WinRT.Runtime.csproj
+ msbuildArgs: /p:VersionNumber=$(VersionNumber),VersionString=$(Build.BuildNumber),AssemblyVersionNumber=$(WinRT.Runtime.AssemblyVersion),CsWinRTBuildReferenceAssembly=true,ContinuousIntegrationBuild=true
+ platform: $(BuildPlatform)
+ configuration: $(BuildConfiguration)
+
+ # Stage WinRT.Runtime reference assembly
+ - task: CopyFiles@2
+ displayName: Stage WinRT.Runtime reference assembly
+ condition: and(succeeded(), eq(variables['BuildPlatform'], 'x86'), eq(variables['BuildConfiguration'], 'release'))
+ inputs:
+ SourceFolder: $(Build.SourcesDirectory)\src\WinRT.Runtime2\obj\$(BuildPlatform)\$(BuildConfiguration)\net10.0\ref
+ Contents: WinRT.Runtime.dll
+ TargetFolder: $(StagingFolder)\net10.0\ref
+
# Stage WinRT.Host.Shim
- task: CopyFiles@2
displayName: Stage WinRT.Host.Shim
diff --git a/build/AzurePipelineTemplates/CsWinRT-PublishToNuGet-Steps.yml b/build/AzurePipelineTemplates/CsWinRT-PublishToNuGet-Steps.yml
index 977daf1475..cba3d02954 100644
--- a/build/AzurePipelineTemplates/CsWinRT-PublishToNuGet-Steps.yml
+++ b/build/AzurePipelineTemplates/CsWinRT-PublishToNuGet-Steps.yml
@@ -95,7 +95,7 @@ steps:
command: pack
searchPatternPack: nuget/Microsoft.Windows.CsWinRT.nuspec
configurationToPack: Release
- buildProperties: cswinrt_nuget_version=$(NugetVersion);cswinrt_exe=$(Build.SourcesDirectory)\release_x86\native\cswinrt.exe;interop_winmd=$(Build.SourcesDirectory)\release_x86\native\WindowsRuntime.Internal.winmd;net10_runtime=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.Runtime.dll;net10_runtime_xml=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.Runtime.xml;source_generator=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.SourceGenerator.dll;winrt_shim=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.Host.Shim.dll;winrt_host_x86=$(Build.SourcesDirectory)\release_x86\native\WinRT.Host.dll;winrt_host_x64=$(Build.SourcesDirectory)\release_x64\native\WinRT.Host.dll;winrt_host_arm64=$(Build.SourcesDirectory)\release_arm64\native\WinRT.Host.dll;winrt_host_resource_x86=$(Build.SourcesDirectory)\release_x86\native\WinRT.Host.dll.mui;winrt_host_resource_x64=$(Build.SourcesDirectory)\release_x64\native\WinRT.Host.dll.mui;winrt_host_resource_arm64=$(Build.SourcesDirectory)\release_arm64\native\WinRT.Host.dll.mui;cswinrtinteropgen_x64=$(Build.SourcesDirectory)\release_x64\net10.0\native\cswinrtinteropgen.exe;cswinrtinteropgen_arm64=$(Build.SourcesDirectory)\release_arm64\net10.0\native\cswinrtinteropgen.exe;cswinrtimplgen_x64=$(Build.SourcesDirectory)\release_x64\net10.0\native\cswinrtimplgen.exe;cswinrtimplgen_arm64=$(Build.SourcesDirectory)\release_arm64\net10.0\native\cswinrtimplgen.exe;cswinrtprojectiongen_x64=$(Build.SourcesDirectory)\release_x64\net10.0\native\cswinrtprojectiongen.exe;cswinrtprojectiongen_arm64=$(Build.SourcesDirectory)\release_arm64\net10.0\native\cswinrtprojectiongen.exe;run_cswinrt_generator_task=$(Build.SourcesDirectory)\release_x86\netstandard2.0\WinRT.Generator.Tasks.dll;branch=$(Build.SourceBranchName);commit=$(Build.SourceVersion)
+ buildProperties: cswinrt_nuget_version=$(NugetVersion);cswinrt_exe=$(Build.SourcesDirectory)\release_x86\native\cswinrt.exe;interop_winmd=$(Build.SourcesDirectory)\release_x86\native\WindowsRuntime.Internal.winmd;net10_runtime=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.Runtime.dll;net10_runtime_xml=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.Runtime.xml;net10_runtime_ref=$(Build.SourcesDirectory)\release_x86\net10.0\ref\WinRT.Runtime.dll;source_generator=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.SourceGenerator.dll;winrt_shim=$(Build.SourcesDirectory)\release_x86\net10.0\WinRT.Host.Shim.dll;winrt_host_x86=$(Build.SourcesDirectory)\release_x86\native\WinRT.Host.dll;winrt_host_x64=$(Build.SourcesDirectory)\release_x64\native\WinRT.Host.dll;winrt_host_arm64=$(Build.SourcesDirectory)\release_arm64\native\WinRT.Host.dll;winrt_host_resource_x86=$(Build.SourcesDirectory)\release_x86\native\WinRT.Host.dll.mui;winrt_host_resource_x64=$(Build.SourcesDirectory)\release_x64\native\WinRT.Host.dll.mui;winrt_host_resource_arm64=$(Build.SourcesDirectory)\release_arm64\native\WinRT.Host.dll.mui;cswinrtinteropgen_x64=$(Build.SourcesDirectory)\release_x64\net10.0\native\cswinrtinteropgen.exe;cswinrtinteropgen_arm64=$(Build.SourcesDirectory)\release_arm64\net10.0\native\cswinrtinteropgen.exe;cswinrtimplgen_x64=$(Build.SourcesDirectory)\release_x64\net10.0\native\cswinrtimplgen.exe;cswinrtimplgen_arm64=$(Build.SourcesDirectory)\release_arm64\net10.0\native\cswinrtimplgen.exe;cswinrtprojectiongen_x64=$(Build.SourcesDirectory)\release_x64\net10.0\native\cswinrtprojectiongen.exe;cswinrtprojectiongen_arm64=$(Build.SourcesDirectory)\release_arm64\net10.0\native\cswinrtprojectiongen.exe;run_cswinrt_generator_task=$(Build.SourcesDirectory)\release_x86\netstandard2.0\WinRT.Generator.Tasks.dll;branch=$(Build.SourceBranchName);commit=$(Build.SourceVersion)
packDestination: $(ob_outputDirectory)\packages
- task: NuGetCommand@2
diff --git a/docs/diagnostics/cswinrt30001.md b/docs/diagnostics/cswinrt30001.md
deleted file mode 100644
index c9877706fe..0000000000
--- a/docs/diagnostics/cswinrt30001.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# CsWinRT warning CSWINRT3001
-
-This type or method is a private implementation detail, and it's only meant to be consumed by generated projections (produced by 'cswinrt.exe') and by generated interop code (produced by 'cswinrtinteropgen.exe'). Private implementation detail types are not considered part of the versioned API surface, and they are ignored when determining the assembly version following semantic versioning. Types might be modified or removed across any version change for 'WinRT.Runtime.dll', and using them in user code is undefined behavior and not supported.
-
-For instance, the following sample generates CSWINRT3001:
-
-```csharp
-using Microsoft.UI.Xaml;
-using WindowsRuntime.InteropServices;
-
-namespace MyProgram;
-
-Window window = Window.Current;
-
-// CSWINRT3001: 'GetObjectReferenceForInterface' is a private implementation detail API
-WindowsRuntimeObjectReference objectReference = window.GetObjectReferenceForInterface(typeof(object).TypeHandle);
-```
-
-Using any private implementation detail API is not supported, and should be considered undefined behavior.
-
-## Additional resources
-
-`CSWINRT30001` is emitted when user code tries to reference a type that is marked as a **private implementation detail** within `WinRT.Runtime.dll` or the generated `WinRT.Interop.dll`. These private implementation detail types exist solely to support the marshalling pipeline that CsWinRT and the .NET SDK generate at build time. They are not part of the public, versioned API surface, and consuming them from application code is unsupported.
-
-While all of these types are public (as they are used across assembglies), they are intentionally hidden from IntelliSense and decorated with `[Obsolete]` (with `CSWINRT3001` as the diagnostic id) to warn when they are referenced. Their names often include `Impl`, `Helpers`, or other internal wording, and their diagnostic message explicitly states that they are private implementation details. During a build, `cswinrt.exe` produces projections and `cswinrtinteropgen.exe` produces `WinRT.Interop.dll`. The generated code inside these tools uses private implementation detail types to perform marshalling work. See `docs/winrt-interop-dll-spec.md` for a description of the generated interop assembly. Because the tooling controls all references to these types, their shape can change whenever needed without breaking consumers. This flexibility is what allows performance and reliability improvements across releases.
-
-## Recommended action
-
-- Remove all references to any private implementation detail types.
-- Look for supported alternatives in `WinRT.Runtime.dll`, the Windows SDK projections, or your own code.
-- If you are authoring source generators or tooling, never take a dependency on private implementation detail types.
-- When in doubt, file an issue describing the scenario so the CsWinRT team can help identify a stable API or consider exposing a supported helper.
-
-Keeping private implementation detail types exclusive to generated code is what allows CsWinRT to deliver fast, safe interop while evolving rapidly. Respecting the diagnostic ensures your applications remain stable across updates (and also avoids accidentally breaking builds when updating the CsWinRT version).
diff --git a/nuget/Microsoft.Windows.CsWinRT.nuspec b/nuget/Microsoft.Windows.CsWinRT.nuspec
index 1b9f18d74a..77baea4dca 100644
--- a/nuget/Microsoft.Windows.CsWinRT.nuspec
+++ b/nuget/Microsoft.Windows.CsWinRT.nuspec
@@ -33,6 +33,7 @@
+
diff --git a/src/WinRT.Runtime2/ABI/System/Boolean.cs b/src/WinRT.Runtime2/ABI/System/Boolean.cs
index 6c668aa2c1..cb3f115560 100644
--- a/src/WinRT.Runtime2/ABI/System/Boolean.cs
+++ b/src/WinRT.Runtime2/ABI/System/Boolean.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class BooleanMarshaller
{
///
@@ -288,4 +284,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Byte.cs b/src/WinRT.Runtime2/ABI/System/Byte.cs
index 4cbe373176..e49061a4df 100644
--- a/src/WinRT.Runtime2/ABI/System/Byte.cs
+++ b/src/WinRT.Runtime2/ABI/System/Byte.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class ByteMarshaller
{
///
@@ -456,4 +452,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Char.cs b/src/WinRT.Runtime2/ABI/System/Char.cs
index 9161ddd52d..325ee50339 100644
--- a/src/WinRT.Runtime2/ABI/System/Char.cs
+++ b/src/WinRT.Runtime2/ABI/System/Char.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class CharMarshaller
{
///
@@ -288,4 +284,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs
index 7c1601d3de..e303303c6a 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerable.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -23,10 +23,6 @@ namespace ABI.System.Collections;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IEnumerableMarshaller
{
///
@@ -87,10 +83,6 @@ public static unsafe object CreateObject(void* value, out CreatedWrapperFlags wr
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class IEnumerableComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -108,10 +100,6 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumerableMethods
{
///
@@ -124,10 +112,6 @@ public static IEnumerator GetEnumerator(WindowsRuntimeObjectReference thisRefere
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IEnumerableImpl
{
///
@@ -206,3 +190,4 @@ IEnumerator IEnumerable.GetEnumerator()
return global::WindowsRuntime.InteropServices.IEnumerableMethods.GetEnumerator(interfaceReference);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs
index b6138a3353..8d9890ac31 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/IEnumerator.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -23,10 +23,6 @@ namespace ABI.System.Collections;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IEnumeratorMarshaller
{
///
@@ -87,10 +83,6 @@ public static unsafe object CreateObject(void* value, out CreatedWrapperFlags wr
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class IEnumeratorComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -108,10 +100,6 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorMethods
{
///
@@ -131,10 +119,6 @@ public static bool MoveNext(WindowsRuntimeObjectReference thisReference)
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IEnumeratorImpl
{
///
@@ -275,4 +259,5 @@ void IEnumerator.Reset()
{
throw new NotSupportedException();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IList.cs b/src/WinRT.Runtime2/ABI/System/Collections/IList.cs
index 87fea7a820..41ced68434 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/IList.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/IList.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -27,10 +27,6 @@ namespace ABI.System.Collections;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IListMarshaller
{
///
@@ -91,10 +87,6 @@ public static unsafe object CreateObject(void* value, out CreatedWrapperFlags wr
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class IListComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -112,10 +104,6 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListMethods
{
///
@@ -188,10 +176,6 @@ public static void Clear(WindowsRuntimeObjectReference thisReference)
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IListImpl
{
///
@@ -551,4 +535,5 @@ void ICollection.CopyTo(Array array, int index)
BindableIListMethods.CopyTo(thisReference, array, index);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs b/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs
index fce2dcfe05..5ac68ea4ab 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/IReadOnlyList.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.InteropServices;
using WindowsRuntime;
using WindowsRuntime.InteropServices;
@@ -22,10 +21,6 @@ namespace ABI.System.Collections;
/// type will be generated at compile time, as its runtime class name will depend on the XAML configuration being used.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class IReadOnlyListComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -38,4 +33,5 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return new WindowsRuntimeReadOnlyList(valueReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs
index cb4bd9c62d..7327bfc4e0 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/INotifyCollectionChanged.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Specialized;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
@@ -20,10 +20,6 @@ namespace ABI.System.Collections.Specialized;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyCollectionChangedMarshaller
{
///
@@ -44,10 +40,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(INotifyColle
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class INotifyCollectionChangedMethods
{
///
@@ -99,10 +91,6 @@ internal unsafe struct INotifyCollectionChangedVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyCollectionChangedImpl
{
///
@@ -193,4 +181,5 @@ private static HRESULT remove_CollectionChanged(void* thisPtr, EventRegistration
return e.HResult;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs
index 21ee72f226..b82f3f4e83 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedAction.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Specialized;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -18,10 +17,6 @@ namespace ABI.System.Collections.Specialized;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class NotifyCollectionChangedActionMarshaller
{
///
@@ -90,10 +85,6 @@ static NotifyCollectionChangedActionInterfaceEntriesImpl()
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class NotifyCollectionChangedActionComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -117,4 +108,5 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownXamlInterfaceIIDs.IID_IReferenceOfNotifyCollectionChangedAction);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs
index c63bfeebb1..eb360b9cd1 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventArgs.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Specialized;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -17,10 +16,6 @@ namespace ABI.System.Collections.Specialized;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class NotifyCollectionChangedEventArgsMarshaller
{
///
@@ -151,10 +146,6 @@ static int GetOldStartingIndex(void* value)
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class NotifyCollectionChangedEventArgsComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -236,4 +227,5 @@ file static unsafe class NotifyCollectionChangedEventArgsRuntimeClassFactory
return defaultInterface;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs
index 9dcfdef519..c6049acb2c 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandler.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Specialized;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -19,10 +19,6 @@ namespace ABI.System.Collections.Specialized;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class NotifyCollectionChangedEventHandlerMarshaller
{
///
@@ -146,10 +142,6 @@ static NotifyCollectionChangedEventHandlerInterfaceEntriesImpl()
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class NotifyCollectionChangedEventHandlerComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -307,4 +299,5 @@ private static HRESULT get_Value(void* thisPtr, void** result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs
index f763851ff2..b25e1295c5 100644
--- a/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs
+++ b/src/WinRT.Runtime2/ABI/System/Collections/Specialized/NotifyCollectionChangedEventHandlerEventSource.cs
@@ -1,10 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.Collections.Specialized;
-using System.ComponentModel;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
namespace ABI.System.Collections.Specialized;
@@ -12,10 +10,6 @@ namespace ABI.System.Collections.Specialized;
///
/// An implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class NotifyCollectionChangedEventHandlerEventSource : EventSource
{
///
@@ -53,4 +47,5 @@ protected override NotifyCollectionChangedEventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs
index 3583b0b1c9..782ea89e3d 100644
--- a/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs
+++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/DataErrorsChangedEventArgs.cs
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -35,10 +35,6 @@ namespace ABI.System.ComponentModel;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class DataErrorsChangedEventArgsMarshaller
{
///
@@ -135,4 +131,5 @@ file static unsafe class DataErrorsChangedEventArgsRuntimeClassFactory
return defaultInterface;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs
index 2eb948f3a2..3860fc9a72 100644
--- a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs
+++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyDataErrorInfo.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
@@ -44,10 +45,6 @@ namespace ABI.System.ComponentModel;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyDataErrorInfoMarshaller
{
///
@@ -68,10 +65,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(global::Syst
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyDataErrorInfoMethods
{
///
@@ -174,10 +167,6 @@ internal unsafe struct INotifyDataErrorInfoVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyDataErrorInfoImpl
{
///
@@ -370,4 +359,5 @@ static extern WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(
return INotifyDataErrorInfoMethods.GetErrors(thisReference, propertyName);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs
index 1b80d25526..5e226c2cec 100644
--- a/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs
+++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/INotifyPropertyChanged.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
@@ -19,10 +20,6 @@ namespace ABI.System.ComponentModel;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyPropertyChangedMarshaller
{
///
@@ -43,10 +40,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(INotifyPrope
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class INotifyPropertyChangedMethods
{
///
@@ -98,10 +91,6 @@ internal unsafe struct INotifyPropertyChangedVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class INotifyPropertyChangedImpl
{
///
@@ -194,4 +183,5 @@ private static HRESULT remove_PropertyChanged(void* thisPtr, EventRegistrationTo
return e.HResult;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs
index 6574166cc8..267d0449e2 100644
--- a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs
+++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventArgs.cs
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -14,10 +13,6 @@ namespace ABI.System.ComponentModel;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class PropertyChangedEventArgsMarshaller
{
///
@@ -55,10 +50,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(PropertyChan
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class PropertyChangedEventArgsComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -121,4 +112,5 @@ file static unsafe class PropertyChangedEventArgsRuntimeClassFactory
return defaultInterface;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs
index d457f3e19d..0c0fc8f07f 100644
--- a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs
+++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandler.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
@@ -18,10 +19,6 @@ namespace ABI.System.ComponentModel;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class PropertyChangedEventHandlerMarshaller
{
///
@@ -145,10 +142,6 @@ static PropertyChangedEventHandlerInterfaceEntriesImpl()
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class PropertyChangedEventHandlerComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -306,4 +299,5 @@ private static HRESULT get_Value(void* thisPtr, void** result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs
index 23ce3bda8e..a04e65b27b 100644
--- a/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs
+++ b/src/WinRT.Runtime2/ABI/System/ComponentModel/PropertyChangedEventHandlerEventSource.cs
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.ComponentModel;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
namespace ABI.System.ComponentModel;
@@ -11,10 +10,6 @@ namespace ABI.System.ComponentModel;
///
/// An implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class PropertyChangedEventHandlerEventSource : EventSource
{
///
@@ -52,4 +47,5 @@ protected override PropertyChangedEventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs b/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs
index e0e9ff87bd..466a3c17d5 100644
--- a/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs
+++ b/src/WinRT.Runtime2/ABI/System/DateTimeOffset.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -39,10 +39,6 @@ namespace ABI.System;
[WindowsRuntimeMappedType(typeof(global::System.DateTimeOffset))]
[WindowsRuntimeReferenceType(typeof(global::System.DateTimeOffset?))]
[DateTimeOffsetComWrappersMarshaller]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public struct DateTimeOffset
{
///
@@ -55,10 +51,6 @@ public struct DateTimeOffset
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class DateTimeOffsetMarshaller
{
///
@@ -335,4 +327,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Double.cs b/src/WinRT.Runtime2/ABI/System/Double.cs
index 3cb89fb29f..6d93a7830c 100644
--- a/src/WinRT.Runtime2/ABI/System/Double.cs
+++ b/src/WinRT.Runtime2/ABI/System/Double.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class DoubleMarshaller
{
///
@@ -512,4 +508,5 @@ private static HRESULT GetSingle(void* thisPtr, float* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/EventHandler.cs b/src/WinRT.Runtime2/ABI/System/EventHandler.cs
index 84568d3760..e64c2642ba 100644
--- a/src/WinRT.Runtime2/ABI/System/EventHandler.cs
+++ b/src/WinRT.Runtime2/ABI/System/EventHandler.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -46,10 +46,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class EventHandlerMarshaller
{
///
@@ -314,4 +310,5 @@ private static HRESULT get_Value(void* thisPtr, void** result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Exception.cs b/src/WinRT.Runtime2/ABI/System/Exception.cs
index f7910c85e3..58cde5cd9e 100644
--- a/src/WinRT.Runtime2/ABI/System/Exception.cs
+++ b/src/WinRT.Runtime2/ABI/System/Exception.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -38,10 +38,6 @@ namespace ABI.System;
[WindowsRuntimeMetadataTypeName("Windows.Foundation.HResult")]
[WindowsRuntimeMappedType(typeof(global::System.Exception))]
[ExceptionComWrappersMarshaller]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public struct Exception
{
///
@@ -55,10 +51,6 @@ public struct Exception
/// Marshaller for .
///
/// This marshaller is backed by the infrastructure provided by .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class ExceptionMarshaller
{
///
@@ -246,4 +238,5 @@ private static HRESULT get_Value(void* thisPtr, Exception* result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Guid.cs b/src/WinRT.Runtime2/ABI/System/Guid.cs
index 726a873554..e9b59b222f 100644
--- a/src/WinRT.Runtime2/ABI/System/Guid.cs
+++ b/src/WinRT.Runtime2/ABI/System/Guid.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class GuidMarshaller
{
///
@@ -317,4 +313,5 @@ private static HRESULT GetString(void* thisPtr, HSTRING* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/IDisposable.cs b/src/WinRT.Runtime2/ABI/System/IDisposable.cs
index fc1b2fdb40..46a047ad1a 100644
--- a/src/WinRT.Runtime2/ABI/System/IDisposable.cs
+++ b/src/WinRT.Runtime2/ABI/System/IDisposable.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -41,10 +41,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IDisposableMarshaller
{
///
@@ -63,10 +59,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(global::Syst
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IDisposableMethods
{
///
@@ -99,10 +91,6 @@ internal unsafe struct IDisposableVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IDisposableImpl
{
///
@@ -161,4 +149,5 @@ private static HRESULT Close(void* thisPtr)
IDisposableMethods.Dispose(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs b/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs
index d963e7d0a2..ff7a709e7d 100644
--- a/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs
+++ b/src/WinRT.Runtime2/ABI/System/IServiceProvider.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -41,10 +41,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IServiceProviderMarshaller
{
///
@@ -63,10 +59,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(global::Syst
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IServiceProviderMethods
{
///
@@ -114,10 +106,6 @@ internal unsafe struct IServiceProviderVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IServiceProviderImpl
{
///
@@ -193,4 +181,5 @@ private static HRESULT GetService(void* thisPtr, Type serviceType, void** result
return IServiceProviderMethods.GetService(thisReference, serviceType);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Int16.cs b/src/WinRT.Runtime2/ABI/System/Int16.cs
index 737f8f0b24..40a56890b6 100644
--- a/src/WinRT.Runtime2/ABI/System/Int16.cs
+++ b/src/WinRT.Runtime2/ABI/System/Int16.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Int16Marshaller
{
///
@@ -484,4 +480,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Int32.cs b/src/WinRT.Runtime2/ABI/System/Int32.cs
index 8027851cbf..bcbf350496 100644
--- a/src/WinRT.Runtime2/ABI/System/Int32.cs
+++ b/src/WinRT.Runtime2/ABI/System/Int32.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Int32Marshaller
{
///
@@ -491,4 +487,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Int64.cs b/src/WinRT.Runtime2/ABI/System/Int64.cs
index 16e56d3333..1282d29afe 100644
--- a/src/WinRT.Runtime2/ABI/System/Int64.cs
+++ b/src/WinRT.Runtime2/ABI/System/Int64.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Int64Marshaller
{
///
@@ -498,4 +494,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs
index 749ddbf800..6f11b0a16a 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix3x2.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Matrix3x2Marshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Matrix3x
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs
index 9f94ecaf3f..9898293e0a 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Matrix4x4.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Matrix4x4Marshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Matrix4x
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs
index fe5ff53236..5bbf498964 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Plane.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class PlaneMarshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Plane* r
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs
index dced508efd..9d87da4884 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Quaternion.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class QuaternionMarshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Quaterni
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs
index dabd87f769..114243ba0f 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Vector2.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Vector2Marshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Vector2*
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs
index e463900f31..b757727e7f 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Vector3.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Vector3Marshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Vector3*
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs b/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs
index 8368e3f2a1..d2d9f3c450 100644
--- a/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs
+++ b/src/WinRT.Runtime2/ABI/System/Numerics/Vector4.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,10 +45,6 @@ namespace ABI.System.Numerics;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class Vector4Marshaller
{
///
@@ -207,4 +203,5 @@ private static HRESULT get_Value(void* thisPtr, global::System.Numerics.Vector4*
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Object.cs b/src/WinRT.Runtime2/ABI/System/Object.cs
index ecfd3b21e4..448961cac6 100644
--- a/src/WinRT.Runtime2/ABI/System/Object.cs
+++ b/src/WinRT.Runtime2/ABI/System/Object.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using WindowsRuntime;
@@ -91,4 +92,5 @@ static ObjectInterfaceEntriesImpl()
}
// Marshalling 'object' instances is not supported, and it should just never happen
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Single.cs b/src/WinRT.Runtime2/ABI/System/Single.cs
index a051b2ee1a..a5cf9c473d 100644
--- a/src/WinRT.Runtime2/ABI/System/Single.cs
+++ b/src/WinRT.Runtime2/ABI/System/Single.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class SingleMarshaller
{
///
@@ -505,4 +501,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/String.cs b/src/WinRT.Runtime2/ABI/System/String.cs
index 0ae612ae65..ebf7aafae4 100644
--- a/src/WinRT.Runtime2/ABI/System/String.cs
+++ b/src/WinRT.Runtime2/ABI/System/String.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class StringMarshaller
{
///
@@ -443,4 +439,5 @@ private static HRESULT GetNumeric(void* thisPtr, T* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/TimeSpan.cs b/src/WinRT.Runtime2/ABI/System/TimeSpan.cs
index 27fb0b68c9..8118463204 100644
--- a/src/WinRT.Runtime2/ABI/System/TimeSpan.cs
+++ b/src/WinRT.Runtime2/ABI/System/TimeSpan.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -39,10 +39,6 @@ namespace ABI.System;
[WindowsRuntimeMappedType(typeof(global::System.TimeSpan))]
[WindowsRuntimeReferenceType(typeof(global::System.TimeSpan?))]
[TimeSpanComWrappersMarshaller]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public struct TimeSpan
{
///
@@ -55,10 +51,6 @@ public struct TimeSpan
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class TimeSpanMarshaller
{
///
@@ -326,4 +318,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Type.cs b/src/WinRT.Runtime2/ABI/System/Type.cs
index ca235d753c..3dd5f38067 100644
--- a/src/WinRT.Runtime2/ABI/System/Type.cs
+++ b/src/WinRT.Runtime2/ABI/System/Type.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
@@ -45,10 +45,6 @@ namespace ABI.System;
[WindowsRuntimeMetadataTypeName("Windows.UI.Xaml.Interop.TypeName")]
[WindowsRuntimeMappedType(typeof(global::System.Type))]
[TypeComWrappersMarshaller]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe struct Type
{
///
@@ -67,10 +63,6 @@ public unsafe struct Type
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class TypeMarshaller
{
///
@@ -1027,4 +1019,5 @@ public override int GetHashCode()
{
return _fullName.GetHashCode();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/UInt16.cs b/src/WinRT.Runtime2/ABI/System/UInt16.cs
index 236f032b35..a19d588e74 100644
--- a/src/WinRT.Runtime2/ABI/System/UInt16.cs
+++ b/src/WinRT.Runtime2/ABI/System/UInt16.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class UInt16Marshaller
{
///
@@ -470,4 +466,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/UInt32.cs b/src/WinRT.Runtime2/ABI/System/UInt32.cs
index 1789d62bf1..71600803b0 100644
--- a/src/WinRT.Runtime2/ABI/System/UInt32.cs
+++ b/src/WinRT.Runtime2/ABI/System/UInt32.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class UInt32Marshaller
{
///
@@ -484,4 +480,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/UInt64.cs b/src/WinRT.Runtime2/ABI/System/UInt64.cs
index 66bff493e2..9411a8dd78 100644
--- a/src/WinRT.Runtime2/ABI/System/UInt64.cs
+++ b/src/WinRT.Runtime2/ABI/System/UInt64.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -43,10 +43,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class UInt64Marshaller
{
///
@@ -498,4 +494,5 @@ private static HRESULT GetDouble(void* thisPtr, double* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Uri.cs b/src/WinRT.Runtime2/ABI/System/Uri.cs
index 9917d2fed9..4d5990bb19 100644
--- a/src/WinRT.Runtime2/ABI/System/Uri.cs
+++ b/src/WinRT.Runtime2/ABI/System/Uri.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using WindowsRuntime;
@@ -35,10 +35,6 @@ namespace ABI.System;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class UriMarshaller
{
///
@@ -130,4 +126,5 @@ file static unsafe class UriRuntimeClassFactory
return defaultInterface;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs b/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs
index faf4ce3941..84bed1e6d7 100644
--- a/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs
+++ b/src/WinRT.Runtime2/ABI/System/Windows.Input/ICommand.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
@@ -20,10 +20,6 @@ namespace ABI.System.Windows.Input;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class ICommandMarshaller
{
///
@@ -44,10 +40,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(ICommand? va
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class ICommandMethods
{
///
@@ -128,10 +120,6 @@ internal unsafe struct ICommandVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class ICommandImpl
{
///
@@ -270,4 +258,5 @@ private static HRESULT Execute(void* thisPtr, void* parameter)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs
index 1b28d99b7e..5ee2d04a1d 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncActionCompletedHandler.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -30,10 +30,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class AsyncActionCompletedHandlerMarshaller
{
///
@@ -316,4 +312,5 @@ private static HRESULT get_Value(void* thisPtr, void** result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs
index a48763a1bd..7605b8ec65 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/AsyncStatus.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class AsyncStatusMarshaller
{
///
@@ -125,4 +120,5 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfAsyncStatus);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs
index 7528ac0295..6f2243fd5d 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/CollectionChange.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation.Collections;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Foundation.Collections;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class CollectionChangeMarshaller
{
///
@@ -125,4 +120,5 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfCollectionChange);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs
index 2743c2f97f..e4b2b197ff 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/IVectorChangedEventArgs.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -30,10 +30,6 @@ namespace ABI.Windows.Foundation.Collections;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IVectorChangedEventArgsMarshaller
{
///
@@ -54,10 +50,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(IVectorChang
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IVectorChangedEventArgsMethods
{
///
@@ -108,10 +100,6 @@ internal unsafe struct IVectorChangedEventArgsVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IVectorChangedEventArgsImpl
{
///
@@ -205,4 +193,5 @@ uint IVectorChangedEventArgs.Index
return IVectorChangedEventArgsMethods.Index(thisReference);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs
index 41c44d3626..ccc3f071bc 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/MapChangedEventHandlerEventSource{K, V}.cs
@@ -1,10 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using Windows.Foundation.Collections;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
namespace ABI.Windows.Foundation.Collections;
@@ -14,10 +12,6 @@ namespace ABI.Windows.Foundation.Collections;
///
/// The type of keys in the observable map.
/// The type of values in the observable map.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class MapChangedEventHandlerEventSource : EventSource>
{
///
@@ -49,4 +43,5 @@ protected override MapChangedEventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs
index 0068c00e37..f55bcb0dba 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Collections/VectorChangedEventHandlerEventSource{T}.cs
@@ -1,10 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using Windows.Foundation.Collections;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
namespace ABI.Windows.Foundation.Collections;
@@ -13,10 +11,6 @@ namespace ABI.Windows.Foundation.Collections;
/// An implementation for .
///
/// The type of elements in the observable vector.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class VectorChangedEventHandlerEventSource : EventSource>
{
///
@@ -48,4 +42,5 @@ protected override VectorChangedEventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs
index f24d87c628..830a994b08 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncAction.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -30,10 +30,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncActionMarshaller
{
///
@@ -95,10 +91,6 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncActionMethods
{
///
@@ -172,10 +164,6 @@ internal unsafe struct IAsyncActionVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncActionImpl
{
///
@@ -296,4 +284,5 @@ void IAsyncAction.GetResults()
IAsyncActionMethods.GetResults(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs
index b4d0ab9899..4719d69e8b 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IAsyncInfo.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -29,10 +29,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncInfoMarshaller
{
///
@@ -51,10 +47,6 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(IAsyncInfo?
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncInfoMethods
{
///
@@ -154,10 +146,6 @@ internal unsafe struct IAsyncInfoVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncInfoImpl
{
///
@@ -350,4 +338,5 @@ void IAsyncInfo.Close()
IAsyncInfoMethods.Close(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs
index 516a30a0f6..199964403d 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IMemoryBufferReference.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -31,10 +31,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IMemoryBufferReferenceMarshaller
{
///
@@ -96,10 +92,6 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IMemoryBufferReferenceMethods
{
///
@@ -172,10 +164,6 @@ internal unsafe struct IMemoryBufferReferenceVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IMemoryBufferReferenceImpl
{
///
@@ -333,4 +321,5 @@ event EventHandler? IMemoryBufferReference.Close
IMemoryBufferReferenceMethods.Closed(thisObject, thisReference).Unsubscribe(value);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs
index 22ac08de74..9cf3db7be9 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/IStringable.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -42,10 +42,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IStringableMarshaller
{
///
@@ -129,10 +125,6 @@ public WindowsRuntimeStringable(WindowsRuntimeObjectReference nativeObjectRefere
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -148,10 +140,6 @@ public override string ToString()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
@@ -161,10 +149,6 @@ protected override bool IsOverridableInterface(in Guid iid)
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IStringableMethods
{
///
@@ -208,10 +192,6 @@ internal unsafe struct IStringableVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IStringableImpl
{
///
@@ -277,4 +257,5 @@ private static HRESULT ToString(void* thisPtr, HSTRING* result)
return IStringableMethods.ToString(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs
index f6877757a4..34548334c1 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Point.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class PointMarshaller
{
///
@@ -275,4 +270,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs
index 8982afa5aa..cf4eb10bf2 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/PropertyType.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class PropertyTypeMarshaller
{
///
@@ -125,4 +120,5 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfPropertyType);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs
index 49de7b2656..e08efa7d35 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Rect.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class RectMarshaller
{
///
@@ -275,4 +270,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs b/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs
index 3e502df0aa..bc761e4f1e 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Foundation/Size.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Foundation;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class SizeMarshaller
{
///
@@ -275,4 +270,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs
index 00e6a0ef5f..72692972af 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IBuffer.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -31,10 +31,6 @@ namespace ABI.Windows.Storage.Streams;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IBufferMarshaller
{
///
@@ -96,10 +92,6 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IBufferMethods
{
///
@@ -168,10 +160,6 @@ internal unsafe struct IBufferVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IBufferImpl
{
///
@@ -300,4 +288,5 @@ uint IBuffer.Length
IBufferMethods.Length(thisReference, value);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs
index 7e979c347a..07495bb00a 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IInputStream.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -31,10 +31,6 @@ namespace ABI.Windows.Storage.Streams;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IInputStreamMarshaller
{
///
@@ -96,10 +92,6 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IInputStreamMethods
{
///
@@ -159,10 +151,6 @@ internal unsafe struct IInputStreamVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IInputStreamImpl
{
///
@@ -238,4 +226,5 @@ IAsyncOperationWithProgress IInputStream.ReadAsync(IBuffer buffer
return IInputStreamMethods.ReadAsync(thisReference, buffer, count, options);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs
index f87d69866a..a0b705662b 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IOutputStream.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -31,10 +31,6 @@ namespace ABI.Windows.Storage.Streams;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IOutputStreamMarshaller
{
///
@@ -96,10 +92,6 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IOutputStreamMethods
{
///
@@ -182,10 +174,6 @@ internal unsafe struct IOutputStreamVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IOutputStreamImpl
{
///
@@ -297,4 +285,5 @@ IAsyncOperation IOutputStream.FlushAsync()
return IOutputStreamMethods.FlushAsync(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs
index ebea98f5b0..60848dbb18 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/IRandomAccessStream.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -31,10 +31,6 @@ namespace ABI.Windows.Storage.Streams;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IRandomAccessStreamMarshaller
{
///
@@ -96,10 +92,6 @@ public static object CreateObject(void* value, out CreatedWrapperFlags wrapperFl
///
/// Interop methods for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IRandomAccessStreamMethods
{
///
@@ -294,10 +286,6 @@ internal unsafe struct IRandomAccessStreamVftbl
///
/// The implementation.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IRandomAccessStreamImpl
{
///
@@ -625,4 +613,5 @@ IRandomAccessStream IRandomAccessStream.CloneStream()
return IRandomAccessStreamMethods.CloneStream(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs
index fdb05a299d..284b1eca13 100644
--- a/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs
+++ b/src/WinRT.Runtime2/ABI/Windows.Storage.Streams/InputStreamOptions.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Storage.Streams;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -30,10 +29,6 @@ namespace ABI.Windows.Storage.Streams;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class InputStreamOptionsMarshaller
{
///
@@ -125,4 +120,5 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return WindowsRuntimeValueTypeMarshaller.UnboxToManagedUnsafe(value, in WellKnownWindowsInterfaceIIDs.IID_IReferenceOfInputStreamOptions);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs
index 7a0bbee795..03fcab12bf 100644
--- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs
+++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Bindables/BindableIReadOnlyListAdapter.cs
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -87,10 +86,6 @@ static BindableIReadOnlyListAdapterInterfaceEntriesImpl()
///
/// A custom implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class BindableIReadOnlyListAdapterComWrappersMarshallerAttribute : WindowsRuntimeComWrappersMarshallerAttribute
{
///
@@ -212,4 +207,5 @@ private static HRESULT IndexOf(void* thisPtr, void* value, uint* index, bool* re
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs
index 1c74cedf9c..abf0989bc5 100644
--- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs
+++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -147,4 +148,5 @@ private static HRESULT Buffer(void* thisPtr, byte** value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs
index 7021ebf14a..e9e34a7081 100644
--- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs
+++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -149,4 +150,5 @@ private static HRESULT Buffer(void* thisPtr, byte** value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs
index 5c66cb7e4e..64ebdbca66 100644
--- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs
+++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -148,3 +149,4 @@ private static HRESULT Buffer(void* thisPtr, byte** value)
}
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Dispatching/DispatcherQueueProxyHandler.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Dispatching/DispatcherQueueProxyHandler.cs
index 3ca2f30cca..69b378540b 100644
--- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Dispatching/DispatcherQueueProxyHandler.cs
+++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/Dispatching/DispatcherQueueProxyHandler.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
@@ -85,4 +86,5 @@ public static HRESULT Invoke(void* @this)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs
index fbb90b6c1f..0815451756 100644
--- a/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs
+++ b/src/WinRT.Runtime2/ABI/WindowsRuntime.InteropServices/EventRegistrationToken.cs
@@ -1,12 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
-using WindowsRuntime;
using WindowsRuntime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
using static System.Runtime.InteropServices.ComWrappers;
@@ -25,10 +24,6 @@ namespace ABI.WindowsRuntime.InteropServices;
///
/// Marshaller for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class EventRegistrationTokenMarshaller
{
///
@@ -187,4 +182,5 @@ private static HRESULT get_Value(void* thisPtr, EventRegistrationToken* result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeClassNameAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeClassNameAttribute.cs
index caa4b685c3..ec66cf7f1f 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeClassNameAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeClassNameAttribute.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
namespace WindowsRuntime;
@@ -39,4 +40,5 @@ public WindowsRuntimeClassNameAttribute(string runtimeClassName)
/// Gets the runtime class name for the current instance.
///
public string RuntimeClassName { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs
index ba327c4a61..7b41cf10d1 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeDefaultInterfaceAttribute.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT License.
using System;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -12,10 +11,6 @@ namespace WindowsRuntime;
/// on the runtime class type itself. This allows the interface type reference to be trimmed away when not needed.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeDefaultInterfaceAttribute : Attribute
{
///
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs
index 5ae3841602..efbc1f8763 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeExclusiveToInterfaceAttribute.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT License.
using System;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -10,10 +9,6 @@ namespace WindowsRuntime;
/// Indicates the projected Windows Runtime class type that a given interface is exclusive to.
///
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeExclusiveToInterfaceAttribute : Attribute
{
///
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs
index abec34fd53..2c94c4e7ce 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMappedMetadataAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -17,10 +17,6 @@ namespace WindowsRuntime;
AttributeTargets.Delegate,
AllowMultiple = false,
Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeMappedMetadataAttribute : Attribute
{
///
@@ -36,4 +32,5 @@ public WindowsRuntimeMappedMetadataAttribute(string name)
/// Gets the name of the mapped source Windows Runtime metadata file (.winmd) that the current custom-mapped type is from.
///
public string Name { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs
index ef8d79db32..2d52f447d6 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -17,10 +17,6 @@ namespace WindowsRuntime;
AttributeTargets.Delegate,
AllowMultiple = false,
Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeMetadataAttribute : Attribute
{
///
@@ -36,4 +32,5 @@ public WindowsRuntimeMetadataAttribute(string name)
/// Gets the name of the source Windows Runtime metadata file (.winmd) that the current projected type is from.
///
public string Name { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs
index 352cae8da7..a807f110a6 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeMetadataTypeNameAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -27,10 +27,6 @@ namespace WindowsRuntime;
AttributeTargets.Delegate,
AllowMultiple = false,
Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeMetadataTypeNameAttribute : Attribute
{
///
@@ -46,4 +42,5 @@ public WindowsRuntimeMetadataTypeNameAttribute(string metadataTypeName)
/// Gets the metadata type name for the current instance.
///
public string MetadataTypeName { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs b/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs
index 68f1a6e269..689538fc26 100644
--- a/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs
+++ b/src/WinRT.Runtime2/Attributes/WindowsRuntimeReferenceTypeAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -16,10 +16,6 @@ namespace WindowsRuntime;
AttributeTargets.Enum,
AllowMultiple = false,
Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeReferenceTypeAttribute : Attribute
{
///
@@ -35,4 +31,5 @@ public WindowsRuntimeReferenceTypeAttribute(Type referenceType)
/// Gets the reference type (a constructed type) for the annotated type.
///
public Type ReferenceType { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs
index 32f46e3709..a1dfac2a68 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationArgsReference.cs
@@ -2,7 +2,6 @@
// Licensed under the MIT License.
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -14,10 +13,6 @@ namespace WindowsRuntime.InteropServices;
///
/// This type works around the lack of support for for byref-like types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public readonly ref struct WindowsRuntimeActivationArgsReference
{
///
@@ -62,4 +57,4 @@ public ref readonly T GetValueRefUnsafe()
{
return ref Unsafe.As(ref Unsafe.AsRef(in _reference));
}
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactory.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactory.cs
index 847890afdb..63e0a8a231 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactory.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactory.cs
@@ -17,6 +17,7 @@ namespace WindowsRuntime.InteropServices;
///
public static unsafe class WindowsRuntimeActivationFactory
{
+#if !REFERENCE_ASSEMBLY
///
/// The registered hook into activation to hook/mock activation of Windows Runtime types.
///
@@ -301,4 +302,5 @@ static Exception GetException(string runtimeClassName, HRESULT hresult)
ThrowException(runtimeClassName, hresult);
}
}
+#endif
}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs
index cb25f7c927..dc5ddb4284 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationFactoryCallback.cs
@@ -1,28 +1,19 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
///
/// Activation factory types to activate Windows Runtime objects with custom logic.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class WindowsRuntimeActivationFactoryCallback
{
///
/// A type containing logic to activate a composed Windows Runtime object.
///
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public abstract class DerivedComposed
{
///
@@ -43,10 +34,6 @@ public abstract unsafe void Invoke(
/// A type containing logic to activate a sealed Windows Runtime object.
///
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public abstract class DerivedSealed
{
///
@@ -56,4 +43,5 @@ public abstract class DerivedSealed
/// The resulting default interface pointer.
public abstract unsafe void Invoke(WindowsRuntimeActivationArgsReference additionalParameters, out void* defaultInterface);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHandler.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHandler.cs
index 491aeb7553..bf539e3806 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHandler.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHandler.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
namespace WindowsRuntime.InteropServices;
@@ -20,4 +21,5 @@ namespace WindowsRuntime.InteropServices;
/// Instances are assumed to behave like DllGetActivationFactory, return HRESULT-s for failures, without throwing exceptions.
///
///
-public unsafe delegate HRESULT WindowsRuntimeActivationHandler(string runtimeClassName, in Guid iid, out void* activationFactory);
\ No newline at end of file
+public unsafe delegate HRESULT WindowsRuntimeActivationHandler(string runtimeClassName, in Guid iid, out void* activationFactory);
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHelper.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHelper.cs
index c16f258c0a..4b73b3446c 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHelper.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationHelper.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Specialized;
@@ -184,4 +185,5 @@ public static void ActivateInstanceUnsafe(
RestrictedErrorInfo.ThrowExceptionForHR(hresult);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs
index fa500e3c97..00f1f7327e 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeActivationTypes.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -15,27 +14,16 @@ namespace WindowsRuntime.InteropServices;
/// constructor. Activation works differently for composed and sealed types, so these marker types are used to select
/// the correct constructor overload to invoke.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class WindowsRuntimeActivationTypes
{
///
/// The derived type is a composed Windows Runtime type.
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public readonly ref struct DerivedComposed;
///
/// The derived type is a sealed Windows Runtime type.
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public readonly ref struct DerivedSealed;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeDllModule.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeDllModule.cs
index 1903eb1684..9935fb0e7a 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeDllModule.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimeDllModule.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -206,4 +207,5 @@ private static bool TryCreate(string fileName, [NotNullWhen(true)] out WindowsRu
return true;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimePlatformModule.cs b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimePlatformModule.cs
index 67d56ea4bb..e360a7e6fc 100644
--- a/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimePlatformModule.cs
+++ b/src/WinRT.Runtime2/InteropServices/Activation/WindowsRuntimePlatformModule.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -117,4 +118,5 @@ public HRESULT GetActivationFactoryUnsafe(string runtimeClassName, in Guid iid,
return WindowsRuntimeImports.RoGetActivationFactory(reference.HString, riid, activationFactoryPtr);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs
index b96c494473..4ffa34cd46 100644
--- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IAsyncActionWithProgressMethods
{
///
@@ -27,4 +22,5 @@ public static void GetResults(WindowsRuntimeObjectReference thisReference)
RestrictedErrorInfo.ThrowExceptionForHR(((IAsyncActionWithProgressVftbl*)*(void***)thisPtr)->GetResults(thisPtr));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs
index 95a77664e7..eb0ba93b0a 100644
--- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs
+++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncActionWithProgressMethodsImpl{TProgress}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using Windows.Foundation;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of types.
///
/// The type of progress information.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IAsyncActionWithProgressMethodsImpl
{
///
@@ -55,4 +50,5 @@ public interface IAsyncActionWithProgressMethodsImpl
/// The instance to use to invoke the native method.
///
static abstract void GetResults(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs
index 9dc801b08a..5b1ed68c0a 100644
--- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs
+++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationMethodsImpl{TResult}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using Windows.Foundation;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of types.
///
/// The result type.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IAsyncOperationMethodsImpl
{
///
@@ -40,4 +35,5 @@ public interface IAsyncOperationMethodsImpl
/// The results of the operation.
///
static abstract TResult GetResults(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs
index 5b0fc97bf9..0559e058f5 100644
--- a/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs
+++ b/src/WinRT.Runtime2/InteropServices/AsyncInfo/IAsyncOperationWithProgressMethodsImpl{TResult, TProgress}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using Windows.Foundation;
namespace WindowsRuntime.InteropServices;
@@ -12,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The result type.
/// The type of progress information.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IAsyncOperationWithProgressMethodsImpl
{
///
@@ -57,4 +52,5 @@ public interface IAsyncOperationWithProgressMethodsImpl
/// The results of the operation.
///
static abstract TResult GetResults(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs
index bc1c6475f9..fd8777a2e4 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/DynamicInterfaceCastableForwarderAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
@@ -18,14 +18,11 @@ namespace WindowsRuntime.InteropServices;
/// is supported. Implementations are also expected to pre-cache the resulting object references while performing these checks.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class DynamicInterfaceCastableForwarderAttribute : Attribute
{
///
/// The instance to use to perform QueryInterface calls.
/// The resulting for the effective interface, if available.
public abstract bool IsInterfaceImplemented(WindowsRuntimeObject thisObject, [NotNullWhen(true)] out WindowsRuntimeObjectReference? interfaceReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs
index 6e7bbb0ae7..4abf359225 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeActivationFactoryAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// Indicates the authored Windows Runtime class type that a given activation factory is for.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeActivationFactoryAttribute : Attribute
{
///
@@ -29,4 +25,5 @@ public WindowsRuntimeActivationFactoryAttribute(Type runtimeClassType)
/// Gets the authored Windows Runtime class type that the annotated activation factory is for.
///
public Type RuntimeClassType { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs
index 77a19c1874..29af877a61 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComWrappersMarshallerAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -41,10 +41,6 @@ namespace WindowsRuntime.InteropServices;
AttributeTargets.Delegate,
AllowMultiple = false,
Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class WindowsRuntimeComWrappersMarshallerAttribute : Attribute
{
///
@@ -139,4 +135,5 @@ static NotSupportedException GetNotSupportedException()
throw GetNotSupportedException();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs
index dd0b2a0a90..55d7e41ab4 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -16,10 +16,6 @@ namespace WindowsRuntime.InteropServices;
///
///
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeComponentAssemblyAttribute : Attribute
{
///
@@ -28,4 +24,5 @@ public sealed class WindowsRuntimeComponentAssemblyAttribute : Attribute
public WindowsRuntimeComponentAssemblyAttribute()
{
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs
index 9bdc7db4e7..b3bdf94b60 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeComponentAssemblyExportsTypeAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
///
///
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeComponentAssemblyExportsTypeAttribute : Attribute
{
///
@@ -34,4 +30,5 @@ public WindowsRuntimeComponentAssemblyExportsTypeAttribute(Type exportsType)
/// Gets the type that contains the managed GetActivationFactory method to invoke for authoring scenarios.
///
public Type ExportsType { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeManagedOnlyTypeAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeManagedOnlyTypeAttribute.cs
index 960ee2fa51..bf7c261661 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeManagedOnlyTypeAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeManagedOnlyTypeAttribute.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
namespace WindowsRuntime.InteropServices;
@@ -25,4 +26,5 @@ namespace WindowsRuntime.InteropServices;
///
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
-public sealed class WindowsRuntimeManagedOnlyTypeAttribute : Attribute;
\ No newline at end of file
+public sealed class WindowsRuntimeManagedOnlyTypeAttribute : Attribute;
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs
index 69e72069bc..09ee3ab2b9 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeMappedTypeAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// Indicates a mapped type for a Windows Runtime type projection (ie. a metadata provider type).
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeMappedTypeAttribute : Attribute
{
///
@@ -29,4 +25,5 @@ public WindowsRuntimeMappedTypeAttribute(Type publicType)
/// Gets the public type associated with the current instance (ie. the type that would be used directly by developers).
///
public Type PublicType { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs
index 6625d2f27d..a28621fd06 100644
--- a/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs
+++ b/src/WinRT.Runtime2/InteropServices/Attributes/WindowsRuntimeReferenceAssemblyAttribute.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -17,10 +17,6 @@ namespace WindowsRuntime.InteropServices;
///
///
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class WindowsRuntimeReferenceAssemblyAttribute : Attribute
{
///
@@ -29,4 +25,5 @@ public sealed class WindowsRuntimeReferenceAssemblyAttribute : Attribute
public WindowsRuntimeReferenceAssemblyAttribute()
{
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableAdapter.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableAdapter.cs
index 29c9e71c0d..82a99f2303 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableAdapter.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableAdapter.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Collections;
using System.Collections.Generic;
using WindowsRuntime.InteropServices.Marshalling;
@@ -49,4 +50,5 @@ public static unsafe void First(IEnumerable enumerable, void** enumerator)
*enumerator = (void*)WindowsRuntimeComWrappers.GetOrCreateComInterfaceForObjectExact(enumeratorAdapter, in WellKnownWindowsInterfaceIIDs.IID_IBindableIterator);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableMethods.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableMethods.cs
index 0aadaf025d..295490ddfc 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumerableMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@@ -38,4 +39,5 @@ public static IEnumerator GetEnumerator(WindowsRuntimeObjectReference thisRefere
// Otherwise, just return the original enumerator directly, it shouldn't be wrapping anything
return enumerator;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumeratorAdapter.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumeratorAdapter.cs
index cd46fe0c04..106d9caa72 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumeratorAdapter.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIEnumeratorAdapter.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
@@ -183,4 +184,5 @@ private BindableIEnumeratorAdapter Create(IEnumerator enumerator)
{
return new(enumerator);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListAdapter.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListAdapter.cs
index ffe55f0fcc..7768568faf 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListAdapter.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListAdapter.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
@@ -182,4 +183,5 @@ public static void Clear(IList list)
{
list.Clear();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListMethods.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListMethods.cs
index 12c1cb0aac..a21297caf8 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIListMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
#pragma warning disable CS1573
@@ -194,4 +195,5 @@ public static void CopyTo(WindowsRuntimeObjectReference thisReference, Array arr
array.SetValue(Item(thisReference, i), i + index);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs
index 23b2862b0b..e2d257d6d8 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/BindableIReadOnlyListAdapter.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
/// still uses "IReadOnlyList" in its name to match the naming convention of adapter types matching .NET type names.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class BindableIReadOnlyListAdapter : IEnumerable
{
///
@@ -58,4 +54,5 @@ public IEnumerator GetEnumerator()
{
return _list.GetEnumerator();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIterableMethods.cs b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIterableMethods.cs
index 2529d6810f..4e98c1d70b 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIterableMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIterableMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Collections;
using System.Runtime.CompilerServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -37,4 +38,5 @@ public static IEnumerator First(WindowsRuntimeObjectReference thisReference)
WindowsRuntimeUnknownMarshaller.Free(result);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIteratorMethods.cs b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIteratorMethods.cs
index 79a3a69405..77a567b7b1 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIteratorMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableIteratorMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -78,4 +79,5 @@ public static bool MoveNext(WindowsRuntimeObjectReference thisReference)
return result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorMethods.cs b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorMethods.cs
index a295ac2b7d..4defd360aa 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -156,4 +157,5 @@ public static void Clear(WindowsRuntimeObjectReference thisReference)
RestrictedErrorInfo.ThrowExceptionForHR(((IBindableVectorVftbl*)*(void***)thisPtr)->Clear(thisPtr));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorViewMethods.cs b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorViewMethods.cs
index 2f8e4fe9ad..b4fe41a2d5 100644
--- a/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorViewMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Bindables/IBindableVectorViewMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -86,4 +87,5 @@ public static bool IndexOf(WindowsRuntimeObjectReference thisReference, object v
return result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferMemoryStream.cs b/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferMemoryStream.cs
index 20a187ad8e..5cc31bbf0a 100644
--- a/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferMemoryStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferMemoryStream.cs
@@ -82,4 +82,4 @@ public override void WriteByte(byte value)
_buffer.Length = (uint)Length;
}
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferUnmanagedMemoryStream.cs b/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferUnmanagedMemoryStream.cs
index b5af9aaaa3..db19642797 100644
--- a/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferUnmanagedMemoryStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Buffers/MemoryStreams/WindowsRuntimeBufferUnmanagedMemoryStream.cs
@@ -79,4 +79,4 @@ public override void WriteByte(byte value)
_buffer.Length = (uint)Length;
}
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeBufferHelpers.cs b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeBufferHelpers.cs
index a259bca335..a5cea02d6b 100644
--- a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeBufferHelpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeBufferHelpers.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics.CodeAnalysis;
using Windows.Storage.Streams;
@@ -175,3 +176,4 @@ public static unsafe bool TryGetNativeData(IBuffer buffer, out byte* data)
return false;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs
index a7abaa8012..8f244cbc63 100644
--- a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs
+++ b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimeExternalArrayBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
@@ -185,3 +186,4 @@ public Span GetSpanForCapacity()
return (byte*)pinnedDataPtr;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs
index 8fbce18f64..2232180d7d 100644
--- a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs
+++ b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedArrayBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
@@ -143,3 +144,4 @@ public Span GetSpanForCapacity()
return MemoryMarshal.CreateSpan(ref Unsafe.Add(ref pinnedData, _offset), _capacity);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs
index 3b485243a5..05a6fcc848 100644
--- a/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs
+++ b/src/WinRT.Runtime2/InteropServices/Buffers/WindowsRuntimePinnedMemoryBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
@@ -115,3 +116,4 @@ public void Invalidate()
_data = null;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs
index 074d3e64d5..bdcdd21d0a 100644
--- a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeArrayComWrappersCallback.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// An interface for callbacks for , for Windows Runtime arrays.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe interface IWindowsRuntimeArrayComWrappersCallback
{
///
@@ -38,4 +34,5 @@ public unsafe interface IWindowsRuntimeArrayComWrappersCallback
///
///
static abstract Array CreateArray(uint count, void* value);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs
index 8e0e279a0b..f8a3ab6f4c 100644
--- a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeObjectComWrappersCallback.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
///
/// An interface for callbacks for , for Windows Runtime objects.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe interface IWindowsRuntimeObjectComWrappersCallback
{
///
@@ -47,4 +42,5 @@ public unsafe interface IWindowsRuntimeObjectComWrappersCallback
///
///
static abstract object CreateObject(void* value, out CreatedWrapperFlags wrapperFlags);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs
index 83f5f3d92c..156a354f01 100644
--- a/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/Callbacks/IWindowsRuntimeUnsealedObjectComWrappersCallback.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// An interface for callbacks for , for unsealed Windows Runtime objects.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe interface IWindowsRuntimeUnsealedObjectComWrappersCallback
{
///
@@ -62,4 +58,5 @@ static abstract bool TryCreateObject(
///
///
static abstract object CreateObject(void* value, out CreatedWrapperFlags wrapperFlags);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeObjectComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeObjectComWrappersCallback.cs
index ebd0df462a..1d9dc0d3b5 100644
--- a/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeObjectComWrappersCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeObjectComWrappersCallback.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices;
@@ -42,4 +43,5 @@ public override unsafe object CreateObject(void* value, out CreatedWrapperFlags
{
return TCallback.CreateObject(value, out wrapperFlags);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeUnsealedObjectComWrappersCallback.cs b/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeUnsealedObjectComWrappersCallback.cs
index c171ab83f2..5beaad2d46 100644
--- a/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeUnsealedObjectComWrappersCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/Callbacks/WindowsRuntimeUnsealedObjectComWrappersCallback.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
@@ -61,4 +62,5 @@ public override unsafe object CreateObject(void* value, out CreatedWrapperFlags
{
return TCallback.CreateObject(value, out wrapperFlags);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs
index 47dd367703..177ac5e290 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryAdapterExtensions.cs
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Collections.Frozen;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
#pragma warning disable IDE0045, IDE0046
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Extensions for the type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IDictionaryAdapterExtensions
{
extension(IDictionaryAdapter)
@@ -127,4 +123,5 @@ public static void Remove(IDictionary dictionary, ReadOnlySpanThe type of keys in the dictionary.
/// The type of values in the dictionary.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IDictionaryAdapter
{
///
@@ -115,4 +110,5 @@ public static void Remove(IDictionary dictionary, TKey key)
KeyNotFoundException.ThrowKeyNotFound();
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs
index e5071cfee0..a6efada83b 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods.cs
@@ -1,18 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
///
/// Methods for implementations of types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IDictionaryMethods
{
///
@@ -28,4 +23,5 @@ public static void Clear(WindowsRuntimeObjectReference thisReference)
{
IMapMethods.Clear(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs
index 7de74cf38f..fcf4065042 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IDictionaryMethods{TKey, TValue}.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable CS1573, IDE0046
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of keys in the dictionary.
/// The type of values in the dictionary.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IDictionaryMethods
{
///
@@ -210,4 +206,5 @@ public static bool Remove(WindowsRuntimeObjectReference thisReference,
return true;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs
index 5a6712311d..966e1e74ab 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableAdapter{T}.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using WindowsRuntime.InteropServices.Marshalling;
namespace WindowsRuntime.InteropServices;
@@ -13,10 +13,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of objects to enumerate.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumerableAdapter
{
///
@@ -61,4 +57,5 @@ public static unsafe void First(IEnumerable enumerable, in Guid iid, void** e
*enumerator = (void*)WindowsRuntimeComWrappers.GetOrCreateComInterfaceForObjectExact(enumeratorAdapter, in iid);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods.cs
index c0d55a88d7..e87d6aac0a 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@@ -70,4 +71,5 @@ public static IEnumerator GetEnumerator(WindowsRuntimeObjectReference thisRefere
WindowsRuntimeUnknownMarshaller.Free(result);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs
index 65ce32a786..22bbb9a6b3 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumerableMethods{T}.cs
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -12,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
/// Methods for types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumerableMethods
{
///
@@ -40,4 +35,5 @@ public static IEnumerator GetEnumerator(WindowsRuntimeObjectReferen
// object implementing 'IEnumerator', or a managed object that was passed to native as a CCW.
return enumerator;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs
index 0a8d3cda77..896b3488fa 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapterExtensions.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using WindowsRuntime.InteropServices.Marshalling;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Extensions for the type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterExtensions
{
// Note: all the extensions in this file match the ones in 'IReadOnlyListAdapterExtensions',
@@ -170,10 +166,6 @@ public unsafe uint GetMany(uint itemsSize, ABI.System.Type* items)
///
/// Extensions for the type for blittable value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterBlittableValueTypeExtensions
{
extension(IEnumeratorAdapter adapter)
@@ -206,10 +198,6 @@ public unsafe uint GetMany(uint itemsSize, T* items)
///
/// Extensions for the type for unmanaged value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterUnmanagedValueTypeExtensions
{
extension(IEnumeratorAdapter adapter)
@@ -244,10 +232,6 @@ public unsafe uint GetMany(uint itemsSize, TAbi* items)
///
/// Extensions for the type for managed value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterManagedValueTypeExtensions
{
extension(IEnumeratorAdapter adapter)
@@ -294,10 +278,6 @@ public unsafe uint GetMany(uint itemsSize, TAbi* items)
///
/// Extensions for the type for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterKeyValuePairTypeExtensions
{
extension(IEnumeratorAdapter> adapter)
@@ -342,10 +322,6 @@ public unsafe uint GetMany(uint itemsSize, void** items)
///
/// Extensions for the type for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterNullableTypeExtensions
{
extension(IEnumeratorAdapter adapter)
@@ -391,10 +367,6 @@ public unsafe uint GetMany(uint itemsSize, void** items)
///
/// Extensions for the type for reference types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IEnumeratorAdapterReferenceTypeExtensions
{
extension(IEnumeratorAdapter adapter)
@@ -435,4 +407,5 @@ public unsafe uint GetMany(uint itemsSize, void** items)
return index;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs
index a50a24218c..75d10889bc 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IEnumeratorAdapter{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
#pragma warning disable IDE0032
@@ -16,10 +16,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of objects to enumerate.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class IEnumeratorAdapter : IEnumerator, IEnumeratorAdapter
{
///
@@ -204,4 +200,5 @@ private IEnumeratorAdapter Create(IEnumerator enumerator)
{
return new(enumerator);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs
index 1b7e8eb5e2..3a3d9e9293 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IIterableMethodsImpl{T}.cs
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of Windows.Foundation.Collections.IIterable<T> types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IIterableMethodsImpl
{
///
@@ -24,4 +19,5 @@ public interface IIterableMethodsImpl
/// The iterator.
///
static abstract IEnumerator First(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs
index 63eed64d3f..add8bc3da2 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for Windows.Foundation.Collections.IIterator<T> types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IIteratorMethods
{
///
@@ -54,4 +49,5 @@ public static bool MoveNext(WindowsRuntimeObjectReference thisReference)
return result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs
index 785f129dbc..30b7dd83ca 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IIteratorMethodsImpl{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of Windows.Foundation.Collections.IIterator<T> types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IIteratorMethodsImpl
{
///
@@ -23,4 +18,5 @@ public interface IIteratorMethodsImpl
/// The current element.
///
static abstract T Current(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs
index 55238b460a..fb13af81e4 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapterExtensions.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using WindowsRuntime.InteropServices.Marshalling;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Extensions for the type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterExtensions
{
// Note: all the extensions in this file exactly match the ones in 'IReadOnlyListAdapterExtensions'.
@@ -226,10 +222,6 @@ public static unsafe uint GetMany(IList list, uint startIndex, uint itemsS
///
/// Extensions for the type for blittable value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterBlittableValueTypeExtensions
{
extension(IListAdapter)
@@ -269,10 +261,6 @@ public static unsafe uint GetMany(IList list, uint startIndex, uint itemsSize
///
/// Extensions for the type for unmanaged value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterUnmanagedValueTypeExtensions
{
extension(IListAdapter)
@@ -314,10 +302,6 @@ public static unsafe uint GetMany(IList list, uint startI
///
/// Extensions for the type for managed value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterManagedValueTypeExtensions
{
extension(IListAdapter)
@@ -374,10 +358,6 @@ public static unsafe uint GetMany(IList list, uint startI
///
/// Extensions for the type for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterKeyValuePairTypeExtensions
{
extension(IListAdapter>)
@@ -432,10 +412,6 @@ public static unsafe uint GetMany(IList
/// Extensions for the type for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterNullableTypeExtensions
{
extension(IListAdapter)
@@ -491,10 +467,6 @@ public static unsafe uint GetMany(IList list, uint start
///
/// Extensions for the type for reference types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapterReferenceTypeExtensions
{
extension(IListAdapter)
@@ -543,4 +515,5 @@ public static unsafe uint GetMany(IList list, uint startI
return (uint)itemCount;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs
index 23b4ad4dd7..1b56cb47a1 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IListAdapter{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -14,10 +14,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of objects to enumerate.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListAdapter
{
///
@@ -203,4 +199,5 @@ public static void RemoveAtEnd(IList list)
throw;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs
index 8ea7bbcf53..636f8d07b9 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
#pragma warning disable CS1573
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListMethods
{
///
@@ -48,4 +44,5 @@ public static void RemoveAt(WindowsRuntimeObjectReference thisReference, int ind
throw ArgumentOutOfRangeException.GetArgumentOutOfRangeException(nameof(index));
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs
index d5e19d09a4..3a0a7aceab 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IListMethods{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
#pragma warning disable CS1573
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
/// Methods for types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IListMethods
{
///
@@ -159,4 +155,5 @@ public static void Insert(WindowsRuntimeObjectReference thisReference,
throw ArgumentOutOfRangeException.GetArgumentOutOfRangeException(nameof(index));
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs
index df55acf04a..d91ad198a9 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using Windows.Foundation.Collections;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for Windows.Foundation.Collections.IMapChangedEventArgs<K> types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IMapChangedEventArgsMethods
{
///
@@ -35,4 +30,5 @@ public static CollectionChange CollectionChange(WindowsRuntimeObjectReference th
return result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs
index 41fe28b9ed..a03007378e 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapChangedEventArgsMethodsImpl{K}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of Windows.Foundation.Collections.IMapChangedEventArgs<K> types.
///
/// The type of keys in the map.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IMapChangedEventArgsMethodsImpl
{
///
@@ -23,4 +18,5 @@ public interface IMapChangedEventArgsMethodsImpl
/// The key of the item that changed.
///
static abstract K Key(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs
index a59d695f66..144665604c 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
#pragma warning disable CS1573
@@ -12,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for Windows.Foundation.Collections.IMap<K, V> types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IMapMethods
{
///
@@ -39,4 +34,5 @@ public static void Clear(WindowsRuntimeObjectReference thisReference)
RestrictedErrorInfo.ThrowExceptionForHR(((IMapVftbl*)*(void***)thisPtr)->Clear(thisPtr));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs
index a8a62dd20e..13fcaaf3b4 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapMethodsImpl{K, V}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of keys in the map.
/// The type of values in the map.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IMapMethodsImpl
{
///
@@ -52,4 +47,5 @@ public interface IMapMethodsImpl
/// The key associated with the item to remove.
///
static abstract void Remove(WindowsRuntimeObjectReference thisReference, K key);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs
index 5617a0893e..e4ca470b05 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethods.cs
@@ -1,18 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
///
/// Methods for Windows.Foundation.Collections.IMapView<K, V> types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IMapViewMethods
{
///
@@ -26,4 +21,5 @@ public static uint Size(WindowsRuntimeObjectReference thisReference)
// The vtable slot for 'get_Size' is identical between 'IMapView' and 'IVectorView'
return IVectorViewMethods.Size(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs
index b3e2dfe47c..0ad7ffc6bb 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IMapViewMethodsImpl{K, V}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of keys in the map.
/// The type of values in the map.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IMapViewMethodsImpl
{
///
@@ -34,4 +29,5 @@ public interface IMapViewMethodsImpl
/// if the key is found; otherwise, .
///
static abstract bool HasKey(WindowsRuntimeObjectReference thisReference, K key);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs
index 02c97cbd80..87cba49155 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IObservableMapEventSourceFactory{TKey, TValue}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of keys in the observable map.
/// The type of values in the observable map.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IObservableMapEventSourceFactory
{
///
@@ -24,4 +19,5 @@ public interface IObservableMapEventSourceFactory
/// The instance to be used with .
///
static abstract ABI.Windows.Foundation.Collections.MapChangedEventHandlerEventSource MapChanged(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs
index 8ba76aa0e9..70664d1be8 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IObservableVectorEventSourceFactory{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of types.
///
/// The type of elements in the observable vector.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IObservableVectorEventSourceFactory
{
///
@@ -23,4 +18,5 @@ public interface IObservableVectorEventSourceFactory
/// The instance to be used with .
///
static abstract ABI.Windows.Foundation.Collections.VectorChangedEventHandlerEventSource VectorChanged(WindowsRuntimeObjectReference thisReference);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs
index 08bd42ab30..48dd49b494 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapterExtensions.cs
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Collections.Frozen;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
#pragma warning disable IDE0045, IDE0046
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Extensions for the type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyDictionaryAdapterExtensions
{
extension(IReadOnlyDictionaryAdapter)
@@ -103,4 +99,5 @@ public static bool HasKey(IReadOnlyDictionary dictionary, ReadOn
return dictionary.ContainsKey(key.ToString());
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs
index 74ac8414df..b2c1f9355e 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryAdapter{TKey, TValue}.cs
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -15,10 +14,6 @@ namespace WindowsRuntime.InteropServices;
/// The type of keys in the dictionary.
/// The type of values in the dictionary.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyDictionaryAdapter
{
///
@@ -84,4 +79,5 @@ public static void Split(
splitAdapter.Split(out first, out second);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs
index 1d240ffbfc..f00f697513 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
#pragma warning disable CS1573
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyDictionaryMethods
{
///
@@ -24,4 +19,5 @@ public static int Count(WindowsRuntimeObjectReference thisReference)
// The vtable slot for 'get_Size' and the desired semantics are identical between 'IMapView' and 'IVectorView'
return IReadOnlyListMethods.Count(thisReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs
index b0e6986841..fc4aab0a73 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionaryMethods{TKey, TValue}.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable CS1573
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of keys in the read-only dictionary.
/// The type of values in the read-only dictionary.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyDictionaryMethods
{
///
@@ -72,4 +68,5 @@ public static bool TryGetValue(WindowsRuntimeObjectReference thisRefer
return true;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs
index 362f95ed7b..f701c45c45 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyDictionarySplitAdapter{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
#pragma warning disable IDE0046
@@ -17,10 +17,6 @@ namespace WindowsRuntime.InteropServices;
/// The type of keys in the dictionary.
/// The type of values in the dictionary.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class IReadOnlyDictionarySplitAdapter : IReadOnlyDictionary
{
///
@@ -214,4 +210,5 @@ public int Compare(KeyValuePair x, KeyValuePair y)
return Comparer.Default.Compare(x.Key, y.Key);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs
index b97b9e4d75..717d0f8730 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapterExtensions.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using WindowsRuntime.InteropServices.Marshalling;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Extensions for the type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterExtensions
{
extension(IReadOnlyListAdapter)
@@ -228,10 +224,6 @@ public static unsafe uint GetMany(IReadOnlyList list, uint startIndex, uin
///
/// Extensions for the type for blittable value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterBlittableValueTypeExtensions
{
extension(IReadOnlyListAdapter)
@@ -271,10 +263,6 @@ public static unsafe uint GetMany(IReadOnlyList list, uint startIndex, uint i
///
/// Extensions for the type for unmanaged value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterUnmanagedValueTypeExtensions
{
extension(IReadOnlyListAdapter)
@@ -316,10 +304,6 @@ public static unsafe uint GetMany(IReadOnlyList list, uin
///
/// Extensions for the type for managed value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterManagedValueTypeExtensions
{
extension(IReadOnlyListAdapter)
@@ -376,10 +360,6 @@ public static unsafe uint GetMany(IReadOnlyList list, uin
///
/// Extensions for the type for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterKeyValuePairTypeExtensions
{
extension(IReadOnlyListAdapter>)
@@ -434,10 +414,6 @@ public static unsafe uint GetMany(IReadOnlyList
/// Extensions for the type for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterNullableTypeExtensions
{
extension(IReadOnlyListAdapter)
@@ -493,10 +469,6 @@ public static unsafe uint GetMany(IReadOnlyList list, ui
///
/// Extensions for the type for reference types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapterReferenceTypeExtensions
{
extension(IReadOnlyListAdapter)
@@ -545,4 +517,5 @@ public static unsafe uint GetMany(IReadOnlyList list, uin
return (uint)itemCount;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs
index c09c03020a..a05e23a9e8 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListAdapter{T}.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -13,10 +13,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of objects to enumerate.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListAdapter
{
///
@@ -82,4 +78,5 @@ public static bool IndexOf(IReadOnlyList list, T value, out uint index)
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs
index bf27f25986..821e60a2bb 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods.cs
@@ -1,18 +1,14 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
///
/// Methods for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListMethods
{
///
@@ -26,4 +22,5 @@ public static int Count(WindowsRuntimeObjectReference thisReference)
return (int)count;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs
index 940404ba05..64e79d501f 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IReadOnlyListMethods{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
#pragma warning disable CS1573
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
/// Methods for types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IReadOnlyListMethods
{
///
@@ -38,4 +34,5 @@ public static T Item(WindowsRuntimeObjectReference thisReference, int
throw ArgumentOutOfRangeException.GetArgumentOutOfRangeException(nameof(index));
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs
index 8ca1491ae6..693154984c 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for Windows.Foundation.Collections.IVector<T> types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IVectorMethods
{
///
@@ -58,4 +53,5 @@ public static void Clear(WindowsRuntimeObjectReference thisReference)
RestrictedErrorInfo.ThrowExceptionForHR(((IVectorVftbl*)*(void***)thisPtr)->Clear(thisPtr));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs
index 6ab0679404..8503fb0fc8 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorMethodsImpl{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of Windows.Foundation.Collections.IVector<T> types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IVectorMethodsImpl
{
///
@@ -60,4 +55,5 @@ public interface IVectorMethodsImpl
/// The item to insert.
///
static abstract void InsertAt(WindowsRuntimeObjectReference thisReference, uint index, T value);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs
index 58f3d4b4ba..f5c45bd901 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethods.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Methods for Windows.Foundation.Collections.IVectorView<T> types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IVectorViewMethods
{
///
@@ -34,4 +29,5 @@ public static uint Size(WindowsRuntimeObjectReference thisReference)
return result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs
index f99494d5e4..e760482e3a 100644
--- a/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Collections/IVectorViewMethodsImpl{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
/// An interface for implementations of Windows.Foundation.Collections.IVectorView<T> types.
///
/// The type of objects to enumerate.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IVectorViewMethodsImpl
{
///
@@ -24,4 +19,5 @@ public interface IVectorViewMethodsImpl
/// The item at the specified index.
///
static abstract T GetAt(WindowsRuntimeObjectReference thisReference, uint index);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueProxyHandler.cs b/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueProxyHandler.cs
index c9cdd57b22..7fc8fa5cce 100644
--- a/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueProxyHandler.cs
+++ b/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueProxyHandler.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -105,4 +106,5 @@ public readonly void Invoke()
_callbackHandle.Target(state);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs b/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs
index 976ee2634a..436cb74c3c 100644
--- a/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs
+++ b/src/WinRT.Runtime2/InteropServices/Dispatching/DispatcherQueueSynchronizationContext.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Threading;
namespace WindowsRuntime.InteropServices;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
/// the UI thread. It needs to be installed on the UI thread through
/// invoked on a wrapping managed object (which is generated in a projection .dll).
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public readonly struct DispatcherQueueSynchronizationContext
{
///
@@ -100,4 +96,5 @@ public void Send(SendOrPostCallback d, object? state)
{
throw new NotSupportedException("'SynchronizationContext.Send' is not supported.");
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs
index f52596ac36..394c8efbbb 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource.cs
@@ -1,18 +1,14 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
///
/// An implementation for .
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed unsafe class EventHandlerEventSource : EventSource
{
///
@@ -50,4 +46,5 @@ protected override EventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs
index 8c4511ae8e..dfc55fa53d 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TEventArgs}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// An implementation for .
///
/// The type of the event data generated by the event.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class EventHandlerEventSource : EventSource>
{
///
@@ -45,4 +41,5 @@ protected override EventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs
index 9df6c6cff5..5f02eb3886 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventHandlerEventSource{TSender,TEventArgs}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// The type of object raising the event.
/// The type of the event data generated by the event.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class EventHandlerEventSource : EventSource>
{
///
@@ -46,4 +42,5 @@ protected override EventHandler GetEventInvoke()
return (obj, e) => TargetDelegate?.Invoke(obj, e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationToken.cs b/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationToken.cs
index 8b590c358c..9e2441502e 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationToken.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationToken.cs
@@ -11,10 +11,12 @@ namespace WindowsRuntime.InteropServices;
/// Represents a reference to a delegate that receives change notifications.
///
///
+#if !REFERENCE_ASSEMBLY
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
[WindowsRuntimeClassName("Windows.Foundation.IReference`1")]
[WindowsRuntimeReferenceType(typeof(EventRegistrationToken?))]
[ABI.WindowsRuntime.InteropServices.EventRegistrationTokenComWrappersMarshaller]
+#endif
public struct EventRegistrationToken : IEquatable
{
///
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs
index e7e3124111..85453fd942 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventRegistrationTokenTable{T}.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -14,10 +14,6 @@ namespace WindowsRuntime.InteropServices;
/// sourcing Windows Runtime style events from managed code. This only supports events for CCW objects.
///
/// The event handler type to use in the table.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class EventRegistrationTokenTable
where T : MulticastDelegate
{
@@ -177,4 +173,5 @@ private static int GetTypeOfTHashCode()
// To work around this, we just check for this edge case and return a magic constant instead.
return hashCode == 0 ? 0x5FC74196 : hashCode;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventSourceCache.cs b/src/WinRT.Runtime2/InteropServices/Events/EventSourceCache.cs
index 8d264c076d..7b4dfe447f 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventSourceCache.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventSourceCache.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Collections.Concurrent;
using System;
using System.Threading;
@@ -285,4 +286,5 @@ file readonly struct CachesFactoryArgs(
/// A weak reference to the event state.
///
public readonly WeakReference
/// The type of delegate being managed from the associated event.
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class EventSourceState : IDisposable
where T : MulticastDelegate
{
@@ -212,4 +208,5 @@ private void OnDispose()
EventSourceCache.Remove(_thisPtr, _index, _weakReferenceToSelf);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs b/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs
index 371453befe..9d7e3a88dc 100644
--- a/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Events/EventSource{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
/// A managed wrapper for an event to expose to a native Windows Runtime consumer.
///
/// The type of delegate being managed.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe class EventSource
where T : MulticastDelegate
{
@@ -221,4 +217,5 @@ private bool TryGetStateUnsafe([NotNullWhen(true)] out EventSourceState? stat
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Exceptions/ILanguageExceptionErrorInfoMethods.cs b/src/WinRT.Runtime2/InteropServices/Exceptions/ILanguageExceptionErrorInfoMethods.cs
index 08dab53834..2b9e9f8358 100644
--- a/src/WinRT.Runtime2/InteropServices/Exceptions/ILanguageExceptionErrorInfoMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Exceptions/ILanguageExceptionErrorInfoMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics.CodeAnalysis;
using WindowsRuntime.InteropServices.Marshalling;
@@ -149,4 +150,5 @@ private static bool TryGetLanguageExceptionWithoutTraversal(void* thisPtr, HRESU
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Exceptions/IRestrictedErrorInfoMethods.cs b/src/WinRT.Runtime2/InteropServices/Exceptions/IRestrictedErrorInfoMethods.cs
index aa772d72f4..1c500025cf 100644
--- a/src/WinRT.Runtime2/InteropServices/Exceptions/IRestrictedErrorInfoMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Exceptions/IRestrictedErrorInfoMethods.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.InteropServices.Marshalling;
namespace WindowsRuntime.InteropServices;
@@ -120,4 +121,5 @@ public static void GetErrorDetails(void* thisPtr, out int error)
BStrStringMarshaller.Free((ushort*)resultPtr);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfoHelpers.cs b/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfoHelpers.cs
index aa98dca270..1dcd22ccee 100644
--- a/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfoHelpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/Exceptions/RestrictedErrorInfoHelpers.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Diagnostics.CodeAnalysis;
@@ -145,4 +146,5 @@ public static bool TryGetErrorInfo(
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Exceptions/SystemErrorInfoHelpers.cs b/src/WinRT.Runtime2/InteropServices/Exceptions/SystemErrorInfoHelpers.cs
index b97f7ba99b..11af1f51bc 100644
--- a/src/WinRT.Runtime2/InteropServices/Exceptions/SystemErrorInfoHelpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/Exceptions/SystemErrorInfoHelpers.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
///
@@ -43,4 +44,5 @@ internal static unsafe class SystemErrorInfoHelpers
return null;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Exceptions/WellKnownExceptionDataKeys.cs b/src/WinRT.Runtime2/InteropServices/Exceptions/WellKnownExceptionDataKeys.cs
index b9ccf9f8ae..e523b93ad6 100644
--- a/src/WinRT.Runtime2/InteropServices/Exceptions/WellKnownExceptionDataKeys.cs
+++ b/src/WinRT.Runtime2/InteropServices/Exceptions/WellKnownExceptionDataKeys.cs
@@ -28,6 +28,7 @@ internal static class WellKnownExceptionDataKeys
///
public const string RestrictedCapabilitySid = "RestrictedCapabilitySid";
+#if !REFERENCE_ASSEMBLY
///
/// The "__RestrictedErrorObjectReference" key for the stored instance (undocumented).
///
@@ -37,6 +38,7 @@ internal static class WellKnownExceptionDataKeys
/// The "__HasRestrictedLanguageErrorObject" key indicating whether there's a stored instance (undocumented).
///
public const string HasRestrictedLanguageErrorObject = "__HasRestrictedLanguageErrorObject";
+#endif
///
/// The "__InternalCsWinRTException" key for the internal stored instance (undocumented).
diff --git a/src/WinRT.Runtime2/InteropServices/Extensions/InterlockedExtensions.cs b/src/WinRT.Runtime2/InteropServices/Extensions/InterlockedExtensions.cs
index 9b9d931b13..9bf67e74b1 100644
--- a/src/WinRT.Runtime2/InteropServices/Extensions/InterlockedExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Extensions/InterlockedExtensions.cs
@@ -34,4 +34,4 @@ public static void Write([NotNullIfNotNull(nameof(value))] ref T location, T
_ = Interlocked.Exchange(ref location, value);
}
}
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs
index 595875a15f..01689acfd1 100644
--- a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs
+++ b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -12,14 +12,11 @@ namespace WindowsRuntime.InteropServices;
///
/// This interface is only meant to be used to support marshalling code for generic instantiations.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeInterface
{
///
/// Gets the IID for the implemented interface.
///
static abstract ref readonly Guid IID { get; }
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs
index 18b467a373..b9300edc90 100644
--- a/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/IWindowsRuntimeInterface{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -18,10 +17,6 @@ namespace WindowsRuntime.InteropServices;
/// The type must refer to a projected Windows Runtime interface.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeInterface
where T : class
{
@@ -30,4 +25,5 @@ public interface IWindowsRuntimeInterface
///
/// The cached instance for the interface .
WindowsRuntimeObjectReferenceValue GetInterface();
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalers/FreeThreadedMarshaler.cs b/src/WinRT.Runtime2/InteropServices/Marshalers/FreeThreadedMarshaler.cs
index 974987a090..01ded66d34 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalers/FreeThreadedMarshaler.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalers/FreeThreadedMarshaler.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -283,4 +284,5 @@ public void DisconnectObject(uint dwReserved)
Marshal.ThrowExceptionForHR(hresult);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalers/RoBufferMarshaler.cs b/src/WinRT.Runtime2/InteropServices/Marshalers/RoBufferMarshaler.cs
index a6f5d8ba93..902cf1559c 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalers/RoBufferMarshaler.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalers/RoBufferMarshaler.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -227,4 +228,5 @@ public void DisconnectObject(uint dwReserved)
Marshal.ThrowExceptionForHR(hresult);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs
index 902cd1d7f6..a962518492 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeKeyValuePairTypeElementMarshaller{TKey, TValue}.cs
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -12,10 +11,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of the key.
/// The type of the value.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeKeyValuePairTypeElementMarshaller
{
///
@@ -25,3 +20,4 @@ public interface IWindowsRuntimeKeyValuePairTypeElementMarshaller
/// The marshalled native value.
static abstract WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(KeyValuePair value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs
index 3bcfa861cb..1235c1d010 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeManagedValueTypeElementMarshaller{T, TAbi}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of elements in the array.
/// The ABI type for type .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeManagedValueTypeElementMarshaller
where T : struct
where TAbi : unmanaged
@@ -32,3 +27,4 @@ public interface IWindowsRuntimeManagedValueTypeElementMarshaller
/// The unmanaged value to dispose.
static abstract void Dispose(TAbi value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs
index 50c1e54e4b..5e1eb456e0 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeNullableTypeElementMarshaller{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// An interface for marshalling collection elements to native.
///
/// The underlying value type of the nullable type.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeNullableTypeElementMarshaller
where T : struct
{
@@ -24,3 +20,4 @@ public interface IWindowsRuntimeNullableTypeElementMarshaller
/// The marshalled native value.
static abstract WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(T? value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs
index e5ed85edcc..ceb3692d3f 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeReferenceTypeElementMarshaller{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// An interface for marshalling collection elements to native.
///
/// The type of elements in the array.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeReferenceTypeElementMarshaller
where T : class
{
@@ -24,3 +19,4 @@ public interface IWindowsRuntimeReferenceTypeElementMarshaller
/// A instance for .
static abstract WindowsRuntimeObjectReferenceValue ConvertToUnmanaged(T? value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs
index 0358ac8975..614e6271f8 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/Collections/IWindowsRuntimeUnmanagedValueTypeElementMarshaller{T, TAbi}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of elements in the array.
/// The ABI type for type .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeUnmanagedValueTypeElementMarshaller
where T : unmanaged
where TAbi : unmanaged
@@ -26,3 +21,4 @@ public interface IWindowsRuntimeUnmanagedValueTypeElementMarshaller
/// The marshalled native value.
static abstract TAbi ConvertToUnmanaged(T value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs
index 1b169310de..1b86743e87 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringHeader.cs
@@ -1,18 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
///
/// Represents a header for a fast-pass HSTRING value (passed without copying).
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public struct HStringHeader
{
///
@@ -22,4 +17,5 @@ public struct HStringHeader
/// Using this field to mirror the layout of with one fewer indirection.
///
internal HSTRING_HEADER._Reserved_e__Union _reserved;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs
index 0db896dd7c..12119041db 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for the Windows Runtime HSTRING type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class HStringMarshaller
{
///
@@ -171,4 +167,5 @@ public static void Free(HSTRING value)
// We can ignore the return value, as this method always returns 'S_OK'
_ = WindowsRuntimeImports.WindowsDeleteString(value);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs
index 832965ac3d..a65355178a 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/HStringReference.cs
@@ -1,18 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
///
/// Represents a reference to a fast-pass HSTRING value (passed without copying).
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe ref struct HStringReference
{
///
@@ -32,4 +27,5 @@ public unsafe ref struct HStringReference
/// It is not valid to escape this value outside of the scope of the current instance.
///
public readonly HSTRING HString => _hstring;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/RestrictedErrorInfoExceptionMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/RestrictedErrorInfoExceptionMarshaller.cs
index 4c5cb3050e..10a70cf7eb 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/RestrictedErrorInfoExceptionMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/RestrictedErrorInfoExceptionMarshaller.cs
@@ -36,9 +36,13 @@ public static class RestrictedErrorInfoExceptionMarshaller
///
public static HRESULT ConvertToUnmanaged(Exception value)
{
+#if !REFERENCE_ASSEMBLY
RestrictedErrorInfo.SetErrorInfo(value);
return RestrictedErrorInfo.GetHRForException(value);
+#else
+ throw null!;
+#endif
}
///
@@ -48,6 +52,10 @@ public static HRESULT ConvertToUnmanaged(Exception value)
/// A managed exception.
public static Exception? ConvertToManaged(HRESULT value)
{
+#if !REFERENCE_ASSEMBLY
return RestrictedErrorInfo.GetExceptionForHR(value);
+#else
+ throw null!;
+#endif
}
}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs
index 436fd7a79b..ec251a3ae4 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/ExceptionArrayMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for arrays of the Windows Runtime type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class ExceptionArrayMarshaller
{
///
@@ -104,4 +100,5 @@ public static void CopyToManaged(uint size, ABI.System.Exception* source, Span
/// A marshaller for arrays of the Windows Runtime HSTRING type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class HStringArrayMarshaller
{
///
@@ -271,4 +267,5 @@ public static void Free(uint size, void** array)
Marshal.FreeCoTaskMem((nint)array);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs
index 2c6d040212..85ff362311 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller{TKey, TValue}.cs
@@ -1,9 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
+#if !REFERENCE_ASSEMBLY
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -12,10 +11,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of the key.
/// The type of the value.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe interface IWindowsRuntimeKeyValuePairTypeArrayElementMarshaller
{
///
@@ -32,3 +27,4 @@ public unsafe interface IWindowsRuntimeKeyValuePairTypeArrayElementMarshallerThe marshalled managed value.
static abstract KeyValuePair ConvertToManaged(void* value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs
index 1f2052b0a3..bc8eb3a7e4 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeManagedValueTypeArrayElementMarshaller{T, TAbi}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of elements in the array.
/// The ABI type for type .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeManagedValueTypeArrayElementMarshaller
where T : struct
where TAbi : unmanaged
@@ -39,3 +34,4 @@ public interface IWindowsRuntimeManagedValueTypeArrayElementMarshaller
/// The unmanaged value to dispose.
static abstract void Dispose(TAbi value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs
index 7ade281e51..3769f60d46 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeNullableTypeArrayElementMarshaller{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// An interface for marshalling implementations to support .
///
/// The underlying value type of the nullable type.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe interface IWindowsRuntimeNullableTypeArrayElementMarshaller
where T : struct
{
@@ -31,3 +27,4 @@ public unsafe interface IWindowsRuntimeNullableTypeArrayElementMarshaller
/// The marshalled managed value.
static abstract T? ConvertToManaged(void* value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs
index bd913731f7..7f86c8e924 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeReferenceTypeArrayElementMarshaller{T}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// An interface for marshalling implementations to support .
///
/// The type of elements in the array.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe interface IWindowsRuntimeReferenceTypeArrayElementMarshaller
where T : class
{
@@ -31,3 +26,4 @@ public unsafe interface IWindowsRuntimeReferenceTypeArrayElementMarshaller
/// The resulting managed object.
static abstract T? ConvertToManaged(void* value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs
index 11743faf18..9f6d7f7d98 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller{T, TAbi}.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of elements in the array.
/// The ABI type for type .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public interface IWindowsRuntimeUnmanagedValueTypeArrayElementMarshaller
where T : unmanaged
where TAbi : unmanaged
@@ -33,3 +28,4 @@ public interface IWindowsRuntimeUnmanagedValueTypeArrayElementMarshallerThe marshalled managed value.
static abstract T ConvertToManaged(TAbi value);
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs
index dd43538aa2..5cbe2c20c8 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/TypeArrayMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for arrays of the Windows Runtime type.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class TypeArrayMarshaller
{
///
@@ -162,4 +158,5 @@ public static void Free(uint size, ABI.System.Type* array)
Marshal.FreeCoTaskMem((nint)array);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs
index 79fc337642..b2cda38caf 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for arrays of blittable Windows Runtime types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeBlittableValueTypeArrayMarshaller
{
///
@@ -32,4 +28,5 @@ public static void Free(uint size, void* array)
Marshal.FreeCoTaskMem((nint)array);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs
index 2867243f5c..03c5e653e9 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeBlittableValueTypeArrayMarshaller{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// A marshaller for arrays of blittable Windows Runtime types.
///
/// The type of elements in the array.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeBlittableValueTypeArrayMarshaller
where T : unmanaged
{
@@ -97,4 +93,5 @@ public static void CopyToManaged(uint size, T* source, Span destination)
new ReadOnlySpan(source, (int)size).CopyTo(destination);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs
index ec3e5089cb..df31afebee 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeKeyValuePairTypeArrayMarshaller{TKey, TValue}.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -13,10 +13,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of the key.
/// The type of the value.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeKeyValuePairTypeArrayMarshaller
{
///
@@ -139,4 +135,5 @@ public static void CopyToManaged(uint size, void** source, S
destination[(int)i] = TElementMarshaller.ConvertToManaged(source[i]);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs
index 2d1ddb2de0..da3133f6a2 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeManagedValueTypeArrayMarshaller{T, TAbi}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of elements in the array.
/// The ABI type for type .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeManagedValueTypeArrayMarshaller
where T : struct
where TAbi : unmanaged
@@ -179,4 +175,5 @@ public static void Free(uint size, TAbi* array)
Marshal.FreeCoTaskMem((nint)array);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs
index dd9d23d35b..f245c5061a 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeNullableTypeArrayMarshaller{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// A marshaller for arrays of types.
///
/// The underlying value type of the nullable type.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeNullableTypeArrayMarshaller
where T : struct
{
@@ -139,3 +135,4 @@ public static void CopyToManaged(uint size, void** source, S
}
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs
index 967752f911..32991d2e02 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeObjectArrayMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for arrays of Windows Runtime objects.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeObjectArrayMarshaller
{
///
@@ -128,4 +124,5 @@ public static void CopyToManaged(uint size, void** source, Span
/// The type of elements in the array.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeReferenceTypeArrayMarshaller
where T : class
{
@@ -138,4 +134,5 @@ public static void CopyToManaged(uint size, void** source, S
destination[(int)i] = TElementMarshaller.ConvertToManaged(source[i]);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs
index 5fc9b78ec4..ad59cb690f 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnknownArrayMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -13,10 +13,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// This type mirrors , but for arrays.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeUnknownArrayMarshaller
{
///
@@ -56,4 +52,5 @@ public static void Free(uint size, void** array)
Marshal.FreeCoTaskMem((nint)array);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs
index 8f97df4afc..d3ca6929fb 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/SzArrays/WindowsRuntimeUnmanagedValueTypeArrayMarshaller{T, TAbi}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// The type of elements in the array.
/// The ABI type for type .
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeUnmanagedValueTypeArrayMarshaller
where T : unmanaged
where TAbi : unmanaged
@@ -119,4 +115,5 @@ public static void CopyToManaged(uint size, TAbi* source, Sp
destination[(int)i] = TElementMarshaller.ConvertToManaged(source[i]);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs
index 7f50ef2691..b170834995 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/TypeReference.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using Windows.UI.Xaml.Interop;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// Represents a reference to a value, for fast marshalling to native.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public unsafe ref struct TypeReference
{
///
@@ -67,4 +63,5 @@ public readonly ref byte GetPinnableReference()
{
return ref Unsafe.As(ref Unsafe.AsRef(in Name!.GetPinnableReference()));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs
index 37f1dad53e..dd4d347bb9 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeArrayMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for Windows Runtime arrays.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeArrayMarshaller
{
///
@@ -59,4 +55,5 @@ public static unsafe class WindowsRuntimeArrayMarshaller
WindowsRuntimeUnknownMarshaller.Free(referencePtr);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs
index 6ecaf37353..a97f27c63b 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeDelegateMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -13,10 +13,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for Windows Runtime delegates.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeDelegateMarshaller
{
///
@@ -189,4 +185,5 @@ static void ThrowNotSupportedException(object value)
// Now that we have the 'IReference' pointer, unbox it normally
return UnboxToManaged(referencePtr);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs
index bb7d786830..70efe61d6d 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeInterfaceMarshaller{T}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.CompilerServices;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
/// A marshaller for Windows Runtime interfaces.
///
/// The type of the interface being marshalled.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeInterfaceMarshaller
where T : class
{
@@ -219,4 +215,5 @@ private static void ThrowInvalidCastExceptionManaged(object value, in Guid iid,
RestrictedErrorInfo.ThrowExceptionForHR(hresult);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs
index ff1b751f1c..95d9411d99 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeKeyValuePairTypeMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeKeyValuePairTypeMarshaller
{
///
@@ -34,4 +30,5 @@ public static WindowsRuntimeObjectReferenceValue ConvertToUnmanagedUnsafe(object
{
return new((void*)WindowsRuntimeComWrappers.Default.GetOrCreateComInterfaceForObject(value, flags, in iid));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs
index 08c8b115a6..b97d638379 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeObjectMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for Windows Runtime objects.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeObjectMarshaller
{
///
@@ -124,4 +120,5 @@ static void ThrowNotSupportedException(object value)
objectComWrappersCallback: WindowsRuntimeObjectComWrappersCallback.GetInstance(),
unsealedObjectComWrappersCallback: null);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs
index 3bba42d511..0511e528a4 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnknownMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for Windows Runtime or COM objects that does not do any additional QueryInterface calls for specific interfaces.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeUnknownMarshaller
{
///
@@ -68,4 +64,5 @@ public static void Free(void* value)
_ = IUnknownVftbl.ReleaseUnsafe(value);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs
index 02fd47e608..528fa44ff2 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeUnsealedObjectMarshaller.cs
@@ -1,18 +1,13 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for unsealed Windows Runtime objects.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeUnsealedObjectMarshaller
{
///
@@ -41,4 +36,5 @@ public static unsafe class WindowsRuntimeUnsealedObjectMarshaller
objectComWrappersCallback: null,
unsealedObjectComWrappersCallback: WindowsRuntimeUnsealedObjectComWrappersCallback.GetInstance());
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs
index 460e0f4c5e..9b6e91a753 100644
--- a/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs
+++ b/src/WinRT.Runtime2/InteropServices/Marshalling/WindowsRuntimeValueTypeMarshaller.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices.Marshalling;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices.Marshalling;
///
/// A marshaller for Windows Runtime value types.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeValueTypeMarshaller
{
///
@@ -176,4 +172,5 @@ public static T UnboxToManagedUnsafe(void* value, in Guid iid)
return result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/AgileObjectReferenceExtensions.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/AgileObjectReferenceExtensions.cs
index 6182013433..04982f20a1 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/AgileObjectReferenceExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/AgileObjectReferenceExtensions.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -94,4 +95,5 @@ public static WindowsRuntimeObjectReference FromAgileUnsafe(this WindowsRuntimeO
// We don't need to do another 'QueryInterface', as 'Resolve' guarantees things.
return WindowsRuntimeObjectReference.CreateUnsafe(pObjectReference, in iid)!;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/ComObjectHelpers.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/ComObjectHelpers.cs
index eb9d36f144..60d9370843 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/ComObjectHelpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/ComObjectHelpers.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
@@ -122,4 +123,5 @@ static void PerformValidation(void* thisPtr, CreateObjectReferenceMarshalingType
PerformValidation(thisPtr, marshalingType);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInspectableObjectReference.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInspectableObjectReference.cs
index 808c9f8941..986e06673b 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInspectableObjectReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInspectableObjectReference.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
namespace WindowsRuntime.InteropServices;
@@ -50,4 +51,5 @@ public ContextAwareInspectableObjectReference(
: base(thisPtr, referenceTrackerPtr, contextCallbackPtr, contextToken, flags)
{
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInterfaceObjectReference.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInterfaceObjectReference.cs
index 89194265c0..c0cf536f0f 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInterfaceObjectReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareInterfaceObjectReference.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
#pragma warning disable IDE0032
@@ -59,4 +60,5 @@ public ContextAwareInterfaceObjectReference(
/// Gets a reference to the interface id for the wrapped native object.
///
public ref readonly Guid Iid => ref _iid;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareObjectReference.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareObjectReference.cs
index a12ce0854d..3598d7a0f8 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareObjectReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextAwareObjectReference.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Runtime.CompilerServices;
@@ -302,4 +303,5 @@ private static class CachedContextsObjectReferenceFactory
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextCallback.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextCallback.cs
index 7d1f4d52e2..4b3d046f84 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextCallback.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/ContextCallback.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -103,4 +104,5 @@ private struct CallbackData
///
public object State;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceFlags.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceFlags.cs
index 26244a05fe..382420304f 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceFlags.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceFlags.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -41,4 +42,5 @@ internal enum CreateObjectReferenceFlags
///
///
PreventReleaseFromTrackerSourceOnDispose = 0x1 << 2
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs
index efc02e0f53..51f1855970 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/CreateObjectReferenceMarshalingType.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -10,10 +9,6 @@ namespace WindowsRuntime.InteropServices;
/// Specifies the marshaling type to use to marshal a given Windows Runtime object, specifically when creating a instance.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public enum CreateObjectReferenceMarshalingType
{
///
@@ -31,4 +26,5 @@ public enum CreateObjectReferenceMarshalingType
/// CoGetStandardMarshal on all interfaces.
///
Standard
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/FreeThreadedObjectReference.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/FreeThreadedObjectReference.cs
index 1eaae3cbdd..7cf2020a41 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/FreeThreadedObjectReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/FreeThreadedObjectReference.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
namespace WindowsRuntime.InteropServices;
@@ -71,4 +72,5 @@ private protected override void NativeReleaseWithContextUnsafe()
{
// This method is also never called
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Activation.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Activation.cs
index 66bb08400b..570c36fd1e 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Activation.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Activation.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics.CodeAnalysis;
@@ -61,4 +62,5 @@ public static bool TryGetActivationFactory(string runtimeClassName, in Guid iid,
return true;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Factory.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Factory.cs
index 694abca919..957b1aa04d 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Factory.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Factory.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -146,4 +147,5 @@ public unsafe partial class WindowsRuntimeObjectReference
? new ContextAwareInspectableObjectReference(acquiredThisPtr, referenceTrackerPtr: null)
: new ContextAwareInterfaceObjectReference(acquiredThisPtr, referenceTrackerPtr: null, iid: in iid);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs
index a90e72c0e7..c54e04aa28 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Helpers.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -169,4 +170,5 @@ internal HRESULT TryAsNative(in Guid iid, out nint ppv)
ReleaseUnsafe();
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Initialization.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Initialization.cs
index d5dd6dfada..8a5591bf70 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Initialization.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Initialization.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -503,4 +504,5 @@ private static WindowsRuntimeObjectReference InitializeObjectReferenceUnsafe(
? new ContextAwareInspectableObjectReference(acquiredExternalComObject, referenceTracker)
: new ContextAwareInterfaceObjectReference(acquiredExternalComObject, referenceTracker, in iid);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs
index 2feda1a9c0..1c64779843 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.Lifecycle.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using System.Threading;
using System;
@@ -370,4 +371,5 @@ private void NativeReleaseFromTrackerSourceUnsafe()
_ = IReferenceTrackerVftbl.ReleaseFromTrackerSourceUnsafe(referenceTrackerPtr);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs
index ee06ae965e..75ad2c56c9 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReference.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
/// A managed, low-level wrapper for a native Windows Runtime object.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract unsafe partial class WindowsRuntimeObjectReference : IDisposable
{
///
@@ -152,4 +148,5 @@ internal CreateObjectReferenceFlags CopyFlags(CreateObjectReferenceFlags request
///
/// The value to return from .
private protected abstract bool DerivedIsInCurrentContext();
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs
index 99a2a83704..40469ac827 100644
--- a/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs
+++ b/src/WinRT.Runtime2/InteropServices/ObjectReference/WindowsRuntimeObjectReferenceValue.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// A marshalling-optimized wrapper for a Windows Runtime object.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public readonly unsafe ref struct WindowsRuntimeObjectReferenceValue
{
///
@@ -157,4 +153,5 @@ public void Dispose()
_ = IUnknownVftbl.ReleaseUnsafe(_thisPtr);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Placeholders/DynamicInterfaceCastableForwarderAttributePlaceholder.cs b/src/WinRT.Runtime2/InteropServices/Placeholders/DynamicInterfaceCastableForwarderAttributePlaceholder.cs
index e912ea17b1..ccbea41ed3 100644
--- a/src/WinRT.Runtime2/InteropServices/Placeholders/DynamicInterfaceCastableForwarderAttributePlaceholder.cs
+++ b/src/WinRT.Runtime2/InteropServices/Placeholders/DynamicInterfaceCastableForwarderAttributePlaceholder.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Diagnostics.CodeAnalysis;
namespace WindowsRuntime.InteropServices;
@@ -22,4 +23,5 @@ public override bool IsInterfaceImplemented(WindowsRuntimeObject thisReference,
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Placeholders/NullPlaceholder.cs b/src/WinRT.Runtime2/InteropServices/Placeholders/NullPlaceholder.cs
index b83be080b5..80a4b23dcb 100644
--- a/src/WinRT.Runtime2/InteropServices/Placeholders/NullPlaceholder.cs
+++ b/src/WinRT.Runtime2/InteropServices/Placeholders/NullPlaceholder.cs
@@ -16,9 +16,9 @@ namespace WindowsRuntime.InteropServices;
/// convert to an actual value. 3rd-party code should never see or receive instances of this type.
///
///
-/// An example of where this is used is by . Because exceptions are marshalled to
-/// when the native HRESULT is 0, the object marshaller for them could potentially return if the
-/// input object were some IReference`1 wrapping such an error code. Instead, that marshaller can use .
+/// An example of where this is used is by the ABI type. Because exceptions are marshalled to
+/// when the native HRESULT is 0, the object marshaller for them could potentially return if the input object
+/// were some IReference`1 wrapping such an error code. Instead, that marshaller can use .
///
///
internal sealed class NullPlaceholder
diff --git a/src/WinRT.Runtime2/InteropServices/Placeholders/WindowsRuntimeComWrappersMarshallerAttributePlaceholder.cs b/src/WinRT.Runtime2/InteropServices/Placeholders/WindowsRuntimeComWrappersMarshallerAttributePlaceholder.cs
index 796157bcdf..1a9408bc4d 100644
--- a/src/WinRT.Runtime2/InteropServices/Placeholders/WindowsRuntimeComWrappersMarshallerAttributePlaceholder.cs
+++ b/src/WinRT.Runtime2/InteropServices/Placeholders/WindowsRuntimeComWrappersMarshallerAttributePlaceholder.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.InteropServices;
namespace WindowsRuntime.InteropServices;
@@ -37,3 +38,4 @@ public override object CreateObject(void* value, out CreatedWrapperFlags wrapper
return null!;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/ComCallData.cs b/src/WinRT.Runtime2/InteropServices/Platform/ComCallData.cs
index 449f5dc198..e4135e0ec4 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/ComCallData.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/ComCallData.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
///
@@ -13,4 +14,5 @@ internal unsafe struct ComCallData
/// Custom user-defined argument to pass to the callback invoked on the target context.
///
public void* pUserDefined;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_ACCESS_OPTIONS.cs b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_ACCESS_OPTIONS.cs
index 2811cdd654..c1e20c0c35 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_ACCESS_OPTIONS.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_ACCESS_OPTIONS.cs
@@ -14,4 +14,4 @@ internal enum HANDLE_ACCESS_OPTIONS : uint
HAO_READ = 0x120089,
HAO_WRITE = 0x120116,
HAO_DELETE = 0x10000
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_CREATION_OPTIONS.cs b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_CREATION_OPTIONS.cs
index e202f6988e..67644198c0 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_CREATION_OPTIONS.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_CREATION_OPTIONS.cs
@@ -11,4 +11,4 @@ internal enum HANDLE_CREATION_OPTIONS : uint
HCO_OPEN_EXISTING = 0x3,
HCO_OPEN_ALWAYS = 0x4,
HCO_TRUNCATE_EXISTING = 0x5
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_OPTIONS.cs b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_OPTIONS.cs
index 9313b3ea91..050b81ce99 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_OPTIONS.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_OPTIONS.cs
@@ -17,4 +17,4 @@ internal enum HANDLE_OPTIONS : uint
HO_NO_BUFFERING = 0x20000000,
HO_OVERLAPPED = 0x40000000,
HO_WRITE_THROUGH = 0x80000000
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_SHARING_OPTIONS.cs b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_SHARING_OPTIONS.cs
index 63a329893a..ec479ce6f4 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_SHARING_OPTIONS.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/HANDLE_SHARING_OPTIONS.cs
@@ -13,4 +13,4 @@ internal enum HANDLE_SHARING_OPTIONS : uint
HSO_SHARE_READ = 0x1,
HSO_SHARE_WRITE = 0x2,
HSO_SHARE_DELETE = 0x4
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/HSTRING_HEADER.cs b/src/WinRT.Runtime2/InteropServices/Platform/HSTRING_HEADER.cs
index 6cf2421521..c86b9c1e18 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/HSTRING_HEADER.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/HSTRING_HEADER.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
// Ported from https://github.com/terrafx/terrafx.interop.windows.
// Defined in 'winrt/hstring.h' in the Windows SDK for Windows 10.0.26100.0.
@@ -29,4 +30,5 @@ public unsafe partial struct _Reserved_e__Union
internal fixed byte Reserved1_0[16];
internal nuint Reserved1_1;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.Stubs.cs b/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.Stubs.cs
index 08ac54c731..0633566799 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.Stubs.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.Stubs.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.ComponentModel;
@@ -71,4 +72,5 @@ public static unsafe HMODULE LoadLibraryExW(string lpLibFileNameUtf16, HANDLE hF
return LoadLibraryExW(lpLibFileName, hFile, dwFlags);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.cs b/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.cs
index 5202ac3d03..3e38af2b37 100644
--- a/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.cs
+++ b/src/WinRT.Runtime2/InteropServices/Platform/WindowsRuntimeImports.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
@@ -109,4 +110,5 @@ internal static unsafe partial class WindowsRuntimeImports
///
[LibraryImport("api-ms-win-core-winrt-robuffer-l1-1-0.dll")]
public static partial HRESULT RoGetBufferMarshaler(void** bufferMarshaler);
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs b/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs
index 7b9e3a865b..3c227a2cb6 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionDllExports/TokenizerHelper.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Globalization;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// Helper class for tokenizing used by generated projections.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class TokenizerHelper
{
///
@@ -35,4 +31,5 @@ public static char GetNumericListSeparator(IFormatProvider? provider)
? SemicolonSeparator
: CommaSeparator;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs
index f8db6bff2c..e9ed63b563 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IAgileObjectImpl.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -11,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
/// The IAgileObject implementation for managed types.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class IAgileObjectImpl
{
///
@@ -26,4 +21,5 @@ public static nint Vtable
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => IUnknownImpl.Vtable;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs
index 27d6f3f97a..05c1307aca 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IInspectableImpl.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -15,10 +15,6 @@ namespace WindowsRuntime.InteropServices;
/// The IInspectable implementation for managed types.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IInspectableImpl
{
///
@@ -123,4 +119,5 @@ private static HRESULT GetTrustLevel(void* thisPtr, TrustLevel* trustLevel)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.RoBuffer.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.RoBuffer.cs
index 73f08e9e5f..acce4b55ea 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.RoBuffer.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.RoBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -163,4 +164,5 @@ private static HRESULT DisconnectObject(void* thisPtr, uint dwReserved)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs
index be7ccae012..09fb498677 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IMarshalImpl.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -13,10 +13,6 @@ namespace WindowsRuntime.InteropServices;
/// The IMarshal implementation for managed types.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe partial class IMarshalImpl
{
///
@@ -171,4 +167,5 @@ private static HRESULT DisconnectObject(void* thisPtr, uint dwReserved)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(ex);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.g.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.g.cs
index e299b77da3..5a80930290 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.g.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.g.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -1661,3 +1662,4 @@ internal static HRESULT GetRectArray(void* thisPtr, uint* size, Rect** value)
}
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.tt b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.tt
index a60cec1715..df6c429427 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.tt
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.BlittableValueTypeArray.tt
@@ -51,6 +51,7 @@ var arrayVtableSlots = new[]
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -173,4 +174,5 @@ file static unsafe class <#=blittableType.Value#>ArrayPropertyValueImpl
}
<#
}
-#>
\ No newline at end of file
+#>
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.DateTimeArray.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.DateTimeArray.cs
index 8dc4cac6f0..6475e97716 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.DateTimeArray.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.DateTimeArray.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -127,4 +128,5 @@ static extern void ConvertToUnmanaged(
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.InspectableArray.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.InspectableArray.cs
index 9e0a9f9788..5bd22f1a2c 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.InspectableArray.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.InspectableArray.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -120,4 +121,5 @@ internal static HRESULT GetInspectableArray(void* thisPtr, uint* size, void*** v
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherType.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherType.cs
index 5a3785376b..80db3b4c07 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherType.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherType.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -95,4 +96,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherTypeArray.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherTypeArray.cs
index 6c6419e5c6..af9d42f654 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherTypeArray.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.OtherTypeArray.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -95,4 +96,5 @@ private static HRESULT get_Type(void* thisPtr, PropertyType* value)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.SharedExports.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.SharedExports.cs
index 652c1e258d..04af0d9cb6 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.SharedExports.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.SharedExports.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -90,4 +91,5 @@ internal static HRESULT ThrowStubForGetArrayOverloads(void* thisPtr, uint* size,
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.StringArray.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.StringArray.cs
index aa2d85d598..3861d13fe3 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.StringArray.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.StringArray.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -120,4 +121,5 @@ internal static HRESULT GetStringArray(void* thisPtr, uint* size, HSTRING** valu
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.TimeSpanArray.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.TimeSpanArray.cs
index f91d1b901d..ac8f39df50 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.TimeSpanArray.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.TimeSpanArray.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -127,4 +128,5 @@ static extern void ConvertToUnmanaged(
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs
index 02c704fcc1..6ba05dc92e 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IPropertyValueImpl.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
#pragma warning disable IDE0060, IDE1006
@@ -16,8 +15,5 @@ namespace WindowsRuntime.InteropServices;
/// This type provides shared paths for some implementations, and then some specific full implementations.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
-public static partial class IPropertyValueImpl;
\ No newline at end of file
+public static partial class IPropertyValueImpl;
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs
index 52be173fe0..43c3f8e485 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.Int32Enum.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -16,10 +16,6 @@ namespace WindowsRuntime.InteropServices;
/// The IReference`1 implementation for managed types that can share an implementation.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe partial class IReferenceImpl
{
///
@@ -73,4 +69,5 @@ public static HRESULT get_Value(void* thisPtr, int* result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.UInt32Enum.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.UInt32Enum.cs
index 2397f6ceca..09650f8183 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.UInt32Enum.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IReferenceImpl.UInt32Enum.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -65,4 +66,5 @@ public static HRESULT get_Value(void* thisPtr, uint* result)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs
index a8db72502b..ece581a9c1 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IStringableImpl.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using WindowsRuntime.InteropServices.Marshalling;
@@ -14,10 +14,6 @@ namespace WindowsRuntime.InteropServices;
/// The IStringable implementation for managed types.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IStringableImpl
{
///
@@ -64,4 +60,5 @@ private static HRESULT ToString(void* thisPtr, HSTRING* value)
return RestrictedErrorInfoExceptionMarshaller.ConvertToUnmanaged(e);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs
index 97fc2ddb15..f98ca83d87 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IUnknownImpl.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -14,10 +13,6 @@ namespace WindowsRuntime.InteropServices;
/// The IUnknown implementation for managed types.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IUnknownImpl
{
///
@@ -49,4 +44,5 @@ public static nint Vtable
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => (nint)Unsafe.AsPointer(in Vftbl);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs
index 7c4204eb8b..f4e7bd721d 100644
--- a/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs
+++ b/src/WinRT.Runtime2/InteropServices/ProjectionImpls/IWeakReferenceSourceImpl.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
@@ -14,10 +14,6 @@ namespace WindowsRuntime.InteropServices;
/// The IWeakReferenceSource implementation for managed types.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IWeakReferenceSourceImpl
{
///
@@ -69,4 +65,5 @@ private static HRESULT GetWeakReference(void* thisPtr, void** weakReference)
return e.HResult;
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/RestrictedErrorInfo.cs b/src/WinRT.Runtime2/InteropServices/RestrictedErrorInfo.cs
index 282df1313b..327ce7d975 100644
--- a/src/WinRT.Runtime2/InteropServices/RestrictedErrorInfo.cs
+++ b/src/WinRT.Runtime2/InteropServices/RestrictedErrorInfo.cs
@@ -29,9 +29,14 @@ public static unsafe class RestrictedErrorInfo
///
public static Exception? GetExceptionForHR(HRESULT errorCode)
{
+#if !REFERENCE_ASSEMBLY
return GetExceptionForHR(errorCode, out _);
+#else
+ throw null!;
+#endif
}
+#if !REFERENCE_ASSEMBLY
///
/// The HRESULT to be converted.
/// restoredExceptionFromGlobalState Out param.
@@ -439,4 +444,5 @@ internal static void ReportUnhandledError(Exception exception)
_ = WindowsRuntimeImports.RoReportUnhandledError(restrictedErrorInfoValuePtr);
}
}
+#endif
}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Read.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Read.cs
index 28338af47c..094b3d2c57 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Read.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Read.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Buffers;
using System.Diagnostics;
@@ -335,4 +336,5 @@ public override int ReadByte()
// be will be called from the 'Read' -> 'BeginRead' call chain.
return Read(new Span(ref result)) == 0 ? -1 : result;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Write.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Write.cs
index 5d02092182..2865669f38 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Write.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.Write.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Buffers;
using System.Runtime.InteropServices;
@@ -302,4 +303,5 @@ private StreamWriteAsyncResult BeginWrite(byte[] buffer, int offset, int count,
state,
processCompletedOperationInCallback: !usedByBlockingWrapper);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.cs
index efc1f0b402..a81c430af8 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.Implementation.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.IO;
@@ -178,4 +179,5 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.cs
index 13c78f8b5e..5d0fb57697 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeManagedStreamAdapter.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -165,4 +166,5 @@ private object EnsureNotDisposed()
return windowsRuntimeStream;
#pragma warning restore CS8774
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IInputStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IInputStream.cs
index b64f4f3a92..339720c9a7 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IInputStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IInputStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.IO;
using System.Runtime.Versioning;
@@ -33,4 +34,5 @@ public IAsyncOperationWithProgress ReadAsync(IBuffer buffer, uint
_ => throw new NotSupportedException(WindowsRuntimeExceptionMessages.NotSupported_UnrecognizedStreamReadOptimization)
};
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IOutputStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IOutputStream.cs
index d497333fa9..5d330c8847 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IOutputStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IOutputStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.IO;
using System.Runtime.Versioning;
@@ -32,4 +33,5 @@ public IAsyncOperation FlushAsync()
return StreamOperationsImplementation.FlushAsync(managedStream);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IRandomAccessStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IRandomAccessStream.cs
index 2013c369c3..fd7ea5471e 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IRandomAccessStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.Implementation.IRandomAccessStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -107,4 +108,5 @@ public IRandomAccessStream CloneStream()
{
throw NotSupportedException.GetCloningNotSupportedException("CloneStream");
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputOutputStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputOutputStream.cs
index 70f752d8ea..2522ef230f 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputOutputStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputOutputStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.IO;
using Windows.Storage.Streams;
@@ -23,4 +24,5 @@ public InputOutputStream(Stream stream, StreamReadOperationOptimization readOpti
{
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputStream.cs
index 01c634eba9..0344259ca0 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.InputStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.IO;
using Windows.Storage.Streams;
@@ -23,4 +24,5 @@ public InputStream(Stream stream, StreamReadOperationOptimization readOptimizati
{
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.OutputStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.OutputStream.cs
index f872641cac..0954b2303f 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.OutputStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.OutputStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.IO;
using Windows.Storage.Streams;
@@ -24,3 +25,4 @@ public OutputStream(Stream stream, StreamReadOperationOptimization readOptimizat
}
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.RandomAccessStream.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.RandomAccessStream.cs
index e34eeb7a8c..6530daeefc 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.RandomAccessStream.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.RandomAccessStream.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.IO;
using Windows.Storage.Streams;
@@ -23,4 +24,5 @@ public RandomAccessStream(Stream stream, StreamReadOperationOptimization readOpt
{
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.cs b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.cs
index 6af7c80a38..d867c7c738 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Adapters/WindowsRuntimeNativeStreamAdapter.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -140,4 +141,5 @@ private Stream EnsureNotDisposed()
return managedStream;
#pragma warning restore CS8774
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs b/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs
index 61e8fadcc2..619b8c2cb5 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/IStorageFolderHandleAccessMethods.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.IO;
using Microsoft.Win32.SafeHandles;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
/// Provides methods for interacting with the IStorageFolderHandleAccess COM interface.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IStorageFolderHandleAccessMethods
{
///
@@ -105,3 +101,4 @@ public static unsafe class IStorageFolderHandleAccessMethods
return new(interopHandle, ownsHandle: true);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs b/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs
index ac6b3d3332..724c8f6a08 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/IStorageItemHandleAccessMethods.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.IO;
using Microsoft.Win32.SafeHandles;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
/// Provides methods for interacting with the IStorageItemHandleAccess COM interface.
///
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class IStorageItemHandleAccessMethods
{
///
@@ -90,3 +86,4 @@ public static unsafe class IStorageItemHandleAccessMethods
return new(interopHandle, ownsHandle: true);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamFlushAsyncResult.cs b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamFlushAsyncResult.cs
index 768b8790f8..230f46bbe7 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamFlushAsyncResult.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamFlushAsyncResult.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System.Runtime.Versioning;
using Windows.Foundation;
@@ -39,4 +40,5 @@ static void ProcessCompletedOperation(IAsyncOperation completedOperation,
ProcessCompletedOperation((IAsyncOperation)completedOperation, out numberOfBytesProcessed);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamOperationAsyncResult.cs b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamOperationAsyncResult.cs
index 0aea05c0e7..c4ddb4f066 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamOperationAsyncResult.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamOperationAsyncResult.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -399,4 +400,5 @@ private static void ThrowIOExceptionWithExceptionDispatchInfo(Exception exceptio
WindowsRuntimeIOHelpers.GetExceptionDispatchInfo(exception).Throw();
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamReadAsyncResult.cs b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamReadAsyncResult.cs
index aff0f783c3..9f4d461238 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamReadAsyncResult.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamReadAsyncResult.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.Runtime.Versioning;
@@ -60,4 +61,5 @@ void ProcessCompletedOperation(IAsyncOperationWithProgress comple
ProcessCompletedOperation((IAsyncOperationWithProgress)completedOperation, out numberOfBytesProcessed);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamWriteAsyncResult.cs b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamWriteAsyncResult.cs
index 9a9e15d356..d11ab77307 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamWriteAsyncResult.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Operations/AsyncResults/StreamWriteAsyncResult.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.Versioning;
using Windows.Foundation;
@@ -43,4 +44,5 @@ static void ProcessCompletedOperation(IAsyncOperationWithProgress co
ProcessCompletedOperation((IAsyncOperationWithProgress)completedOperation, out numberOfBytesProcessed);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationOptimizationExtensions.cs b/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationOptimizationExtensions.cs
index 5e6a00dd26..da0b133a56 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationOptimizationExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationOptimizationExtensions.cs
@@ -44,4 +44,4 @@ static bool CanUseMemoryStreamOptimization(Stream stream)
return StreamReadOperationOptimization.AbstractStream;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationsImplementation.cs b/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationsImplementation.cs
index 7f545856f5..383ba79edd 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationsImplementation.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/Operations/StreamOperationsImplementation.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
using System.IO;
@@ -281,3 +282,4 @@ async Task FlushCoreAsync(CancellationToken cancelToken)
return AsyncInfo.Run(FlushCoreAsync);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs
index 07368a74ae..22ee658a3d 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeIOHelpers.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Runtime.ExceptionServices;
@@ -13,10 +13,6 @@ namespace Windows.Storage.Streams;
///
/// Helpers for working with Windows Runtime I/O operations.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class WindowsRuntimeIOHelpers
{
///
@@ -79,3 +75,4 @@ public static void EnsureResultsInUserBuffer(IBuffer userBuffer, IBuffer resultB
userBuffer.Length = resultBuffer.Length;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStorageOptionsExtensions.cs b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStorageOptionsExtensions.cs
index ac20d6e487..22c952d5ef 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStorageOptionsExtensions.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStorageOptionsExtensions.cs
@@ -101,4 +101,4 @@ public HANDLE_CREATION_OPTIONS ToHandleCreationOptions()
: (HANDLE_CREATION_OPTIONS)(uint)mode;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStreamMapping.cs b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStreamMapping.cs
index 08159616de..8086f077a3 100644
--- a/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStreamMapping.cs
+++ b/src/WinRT.Runtime2/InteropServices/Streams/WindowsRuntimeStreamMapping.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Diagnostics;
#if DEBUG
@@ -274,3 +275,4 @@ private static void EnsureAdapterBufferSize(Stream adapter, int requiredBufferSi
}
#endif
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/AsyncInfo.cs b/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/AsyncInfo.cs
index d7ca2ace12..9bf76dcfc3 100644
--- a/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/AsyncInfo.cs
+++ b/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/AsyncInfo.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.Versioning;
using System.Threading;
@@ -277,4 +278,5 @@ public static IAsyncOperationWithProgress CanceledOperationW
{
return new TaskWithProgressAdapter(default(CanceledTaskPlaceholder));
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/WindowsRuntimeBuffer.cs b/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/WindowsRuntimeBuffer.cs
index 73194ebb12..902c5a82c6 100644
--- a/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/WindowsRuntimeBuffer.cs
+++ b/src/WinRT.Runtime2/InteropServices/System.Runtime.InteropServices/WindowsRuntimeBuffer.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using Windows.Storage.Streams;
@@ -93,3 +94,4 @@ public static IBuffer Create(byte[] data, int offset, int length, int capacity)
return new WindowsRuntimePinnedArrayBuffer(pinnedData, offset: 0, length, capacity);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs
index 81ce3f8650..58ffb671e0 100644
--- a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs
+++ b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/DynamicInterfaceCastableImplementationTypeMapGroup.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -13,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
///
/// This type is only meant to be used as type map group for APIs.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class DynamicInterfaceCastableImplementationTypeMapGroup
{
///
@@ -25,4 +20,5 @@ public abstract class DynamicInterfaceCastableImplementationTypeMapGroup
private DynamicInterfaceCastableImplementationTypeMapGroup()
{
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs
index 3d14def610..5504e28645 100644
--- a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs
+++ b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeComWrappersTypeMapGroup.cs
@@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
-using System;
-using System.ComponentModel;
+#if !REFERENCE_ASSEMBLY
namespace WindowsRuntime.InteropServices;
@@ -12,10 +11,6 @@ namespace WindowsRuntime.InteropServices;
///
/// This type is only meant to be used as type map group for APIs.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeComWrappersTypeMapGroup
{
///
@@ -24,4 +19,5 @@ public abstract class WindowsRuntimeComWrappersTypeMapGroup
private WindowsRuntimeComWrappersTypeMapGroup()
{
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs
index 59b512bf8c..d28d4a9c25 100644
--- a/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs
+++ b/src/WinRT.Runtime2/InteropServices/TypeMapGroups/WindowsRuntimeMetadataTypeMapGroup.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
namespace WindowsRuntime.InteropServices;
@@ -12,10 +12,6 @@ namespace WindowsRuntime.InteropServices;
///
/// This type is only meant to be used as type map group for APIs.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeMetadataTypeMapGroup
{
///
@@ -24,4 +20,5 @@ public abstract class WindowsRuntimeMetadataTypeMapGroup
private WindowsRuntimeMetadataTypeMapGroup()
{
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapInfo/DynamicInterfaceCastableImplementationInfo.cs b/src/WinRT.Runtime2/InteropServices/TypeMapInfo/DynamicInterfaceCastableImplementationInfo.cs
index aaec477300..63c7c684aa 100644
--- a/src/WinRT.Runtime2/InteropServices/TypeMapInfo/DynamicInterfaceCastableImplementationInfo.cs
+++ b/src/WinRT.Runtime2/InteropServices/TypeMapInfo/DynamicInterfaceCastableImplementationInfo.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -181,3 +182,4 @@ bool Load([NotNullWhen(true)] out DynamicInterfaceCastableForwarderAttribute? fo
return null;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMarshallingInfo.cs b/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMarshallingInfo.cs
index 06c31b568f..790d7081e8 100644
--- a/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMarshallingInfo.cs
+++ b/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMarshallingInfo.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -796,4 +797,5 @@ private static WindowsRuntimeMarshallingInfo CreateMarshallingInfo(Type metadata
// We don't have a metadata provider for the type (we'll just marshal it as a generic 'IInspectable')
return null;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMetadataInfo.cs b/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMetadataInfo.cs
index f9f2e444f0..1c1e6e5099 100644
--- a/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMetadataInfo.cs
+++ b/src/WinRT.Runtime2/InteropServices/TypeMapInfo/WindowsRuntimeMetadataInfo.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -224,4 +225,5 @@ private static WindowsRuntimeMetadataInfo CreateMetadataInfo(Type metadataProvid
// We don't have a metadata provider for the type
return null;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IActivationFactoryVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IActivationFactoryVftbl.cs
index f72462150d..b9f2a5fee5 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IActivationFactoryVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IActivationFactoryVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
@@ -119,4 +120,5 @@ public static HRESULT ActivateInstanceUnsafe(
innerInterface,
instance);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IAgileReferenceVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IAgileReferenceVftbl.cs
index 883d167b90..9c28b0ddfb 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IAgileReferenceVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IAgileReferenceVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -36,4 +37,5 @@ public static HRESULT ResolveUnsafe(
{
return ((IAgileReferenceVftbl*)*(void***)thisPtr)->Resolve(thisPtr, riid, ppvObjectReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IAsyncActionWithProgressVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IAsyncActionWithProgressVftbl.cs
index 41dd05f64b..0e6a6a09b3 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IAsyncActionWithProgressVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IAsyncActionWithProgressVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -25,4 +26,5 @@ internal unsafe struct IAsyncActionWithProgressVftbl
public delegate* unmanaged[MemberFunction] set_Completed;
public delegate* unmanaged[MemberFunction] get_Completed;
public delegate* unmanaged[MemberFunction] GetResults;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIterableVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIterableVftbl.cs
index a32b0a0c41..da4c37c2cf 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIterableVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIterableVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -24,4 +25,5 @@ internal unsafe struct IBindableIterableVftbl
public delegate* unmanaged[MemberFunction] GetRuntimeClassName;
public delegate* unmanaged[MemberFunction] GetTrustLevel;
public delegate* unmanaged[MemberFunction] First;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIteratorVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIteratorVftbl.cs
index d29fd7a9a4..1a57fcaf64 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIteratorVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableIteratorVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -32,4 +33,5 @@ internal unsafe struct IBindableIteratorVftbl
// to 'IIterator'. It is the last function in the vftable and shouldn't be called
// by anyone. If called, it will return 'E_NOTIMPL'.
public delegate* unmanaged[MemberFunction] GetMany;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorVftbl.cs
index 6bec8f0732..1cd6b00f65 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -33,4 +34,5 @@ internal unsafe struct IBindableVectorVftbl
public delegate* unmanaged[MemberFunction] Append;
public delegate* unmanaged[MemberFunction] RemoveAtEnd;
public delegate* unmanaged[MemberFunction] Clear;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorViewVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorViewVftbl.cs
index 9b8182b248..c428fa89e5 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorViewVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IBindableVectorViewVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -26,4 +27,5 @@ internal unsafe struct IBindableVectorViewVftbl
public delegate* unmanaged[MemberFunction] GetAt;
public delegate* unmanaged[MemberFunction] get_Size;
public delegate* unmanaged[MemberFunction] IndexOf;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IBufferByteAccessVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IBufferByteAccessVftbl.cs
index 75afe44c91..a7f68957f4 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IBufferByteAccessVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IBufferByteAccessVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -32,4 +33,5 @@ public static HRESULT BufferUnsafe(void* thisPtr, byte** value)
{
return ((IBufferByteAccessVftbl*)*(void***)thisPtr)->Buffer(thisPtr, value);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IContextCallbackVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IContextCallbackVftbl.cs
index 823f5a2dc6..90ce9bf142 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IContextCallbackVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IContextCallbackVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -41,4 +42,5 @@ public static HRESULT ContextCallbackUnsafe(
{
return ((IContextCallbackVftbl*)*(void***)thisPtr)->ContextCallback(thisPtr, pfnCallback, pParam, riid, iMethod, pUnk);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IDataErrorsChangedEventArgsVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IDataErrorsChangedEventArgsVftbl.cs
index 486593a4fd..26b121a423 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IDataErrorsChangedEventArgsVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IDataErrorsChangedEventArgsVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -37,4 +38,5 @@ public static HRESULT get_PropertyNameUnsafe(void* thisPtr, HSTRING* propertyNam
{
return ((IDataErrorsChangedEventArgsVftbl*)*(void***)thisPtr)->get_PropertyName(thisPtr, propertyName);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueHandlerVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueHandlerVftbl.cs
index 8211c68422..fb8ffe7e27 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueHandlerVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueHandlerVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -20,4 +21,5 @@ internal unsafe struct IDispatcherQueueHandlerVftbl
public delegate* unmanaged[MemberFunction] AddRef;
public delegate* unmanaged[MemberFunction] Release;
public delegate* unmanaged[MemberFunction] Invoke;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueVftbl.cs
index 62064e6af3..49e478971d 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IDispatcherQueueVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -41,4 +42,5 @@ public static HRESULT TryEnqueueUnsafe(void* thisPtr, void* callback, bool* resu
{
return ((IDispatcherQueueVftbl*)*(void***)thisPtr)->TryEnqueue(thisPtr, callback, result);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IInspectableVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IInspectableVftbl.cs
index 9db00a22d7..b81ad700ce 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IInspectableVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IInspectableVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -64,4 +65,5 @@ public static HRESULT GetTrustLevelUnsafe(void* thisPtr, TrustLevel* trustLevel)
{
return ((IInspectableVftbl*)*(void***)thisPtr)->GetTrustLevel(thisPtr, trustLevel);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IIterableVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IIterableVftbl.cs
index 1c559bdeda..b5368be29d 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IIterableVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IIterableVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -21,4 +22,5 @@ internal unsafe struct IIterableVftbl
public delegate* unmanaged[MemberFunction] GetRuntimeClassName;
public delegate* unmanaged[MemberFunction] GetTrustLevel;
public delegate* unmanaged[MemberFunction] First;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IIteratorVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IIteratorVftbl.cs
index 64fa4b6bc0..ae89e7bf03 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IIteratorVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IIteratorVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -24,4 +25,5 @@ internal unsafe struct IIteratorVftbl
public delegate* unmanaged[MemberFunction] get_HasCurrent;
public delegate* unmanaged[MemberFunction] MoveNext;
public delegate* unmanaged[MemberFunction] GetMany;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfo2Vftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfo2Vftbl.cs
index 44310f0d39..cdb85d45c4 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfo2Vftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfo2Vftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -53,4 +54,5 @@ public static HRESULT GetPropagationContextHeadUnsafe(void* thisPtr, void** prop
thisPtr,
propagatedLanguageExceptionErrorInfoHead);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfoVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfoVftbl.cs
index 051c987789..6a2da293e4 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfoVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/ILanguageExceptionErrorInfoVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -32,4 +33,5 @@ public static HRESULT GetLanguageExceptionUnsafe(void* thisPtr, void** languageE
thisPtr,
languageException);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IMapChangedEventArgsVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IMapChangedEventArgsVftbl.cs
index 488932fa5f..5f221c4373 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IMapChangedEventArgsVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IMapChangedEventArgsVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -23,4 +24,5 @@ internal unsafe struct IMapChangedEventArgsVftbl
public delegate* unmanaged[MemberFunction] GetTrustLevel;
public delegate* unmanaged[MemberFunction] get_CollectionChange;
public delegate* unmanaged[MemberFunction] get_Key;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IMapVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IMapVftbl.cs
index 47dfe7e23c..4c01a8d740 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IMapVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IMapVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -29,4 +30,5 @@ internal unsafe struct IMapVftbl
public delegate* unmanaged[MemberFunction] Insert;
public delegate* unmanaged[MemberFunction] Remove;
public delegate* unmanaged[MemberFunction] Clear;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IMarshalVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IMarshalVftbl.cs
index a7d87059ae..b1375ace7e 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IMarshalVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IMarshalVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -137,4 +138,5 @@ public static HRESULT DisconnectObjectUnsafe(void* thisPtr, uint dwReserved)
{
return ((IMarshalVftbl*)*(void***)thisPtr)->DisconnectObject(thisPtr, dwReserved);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IMemoryBufferByteAccessVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IMemoryBufferByteAccessVftbl.cs
index 68e5766ae7..d34100a982 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IMemoryBufferByteAccessVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IMemoryBufferByteAccessVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -33,4 +34,5 @@ public static HRESULT GetBufferUnsafe(void* thisPtr, byte** value, uint* capacit
{
return ((IMemoryBufferByteAccessVftbl*)*(void***)thisPtr)->GetBuffer(thisPtr, value, capacity);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/INotifyCollectionChangedEventArgsVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/INotifyCollectionChangedEventArgsVftbl.cs
index 1e4eb53607..4dcea82de2 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/INotifyCollectionChangedEventArgsVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/INotifyCollectionChangedEventArgsVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections.Specialized;
using System.Runtime.CompilerServices;
@@ -89,4 +90,5 @@ public static HRESULT get_OldStartingIndexUnsafe(void* thisPtr, int* oldStarting
{
return ((INotifyCollectionChangedEventArgsVftbl*)*(void***)thisPtr)->get_OldStartingIndex(thisPtr, oldStartingIndex);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyChangedEventArgsVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyChangedEventArgsVftbl.cs
index 534b30d9a7..0a6522b2d1 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyChangedEventArgsVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyChangedEventArgsVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -36,4 +37,5 @@ public static HRESULT get_PropertyNameUnsafe(void* thisPtr, HSTRING* propertyNam
{
return ((IPropertyChangedEventArgsVftbl*)*(void***)thisPtr)->get_PropertyName(thisPtr, propertyName);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyValueVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyValueVftbl.cs
index b7d0f4c833..eeb3976858 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyValueVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IPropertyValueVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -59,4 +60,5 @@ internal unsafe struct IPropertyValueVftbl
public delegate* unmanaged[MemberFunction] GetPointArray;
public delegate* unmanaged[MemberFunction] GetSizeArray;
public delegate* unmanaged[MemberFunction] GetRectArray;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceArrayVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceArrayVftbl.cs
index 24e5077ec5..cce7faa1fa 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceArrayVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceArrayVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -37,4 +38,5 @@ public static HRESULT get_ValueUnsafe(void* thisPtr, uint* count, void** value)
{
return ((IReferenceArrayVftbl*)*(void***)thisPtr)->get_Value(thisPtr, count, value);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerTargetVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerTargetVftbl.cs
index 8d19ecec78..ba359dae61 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerTargetVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerTargetVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -45,4 +46,5 @@ public static uint ReleaseFromReferenceTrackerUnsafe(void* thisPtr)
{
return ((IReferenceTrackerVftblTargetVftbl*)*(void***)thisPtr)->ReleaseFromReferenceTracker(thisPtr);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerVftbl.cs
index 0f722573c6..f18974f108 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceTrackerVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -46,4 +47,5 @@ public static HRESULT ReleaseFromTrackerSourceUnsafe(void* thisPtr)
{
return ((IReferenceTrackerVftbl*)*(void***)thisPtr)->ReleaseFromTrackerSource(thisPtr);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceVftbl.cs
index 8f1c892b85..36aa71ebf6 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IReferenceVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -36,4 +37,5 @@ public static HRESULT get_ValueUnsafe(void* thisPtr, void* value)
{
return ((IReferenceVftbl*)*(void***)thisPtr)->get_Value(thisPtr, value);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IRestrictedErrorInfoVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IRestrictedErrorInfoVftbl.cs
index f89d25afd4..9e1191c0c6 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IRestrictedErrorInfoVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IRestrictedErrorInfoVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
@@ -18,4 +19,5 @@ internal unsafe struct IRestrictedErrorInfoVftbl
public delegate* unmanaged[MemberFunction] Release;
public delegate* unmanaged[MemberFunction] GetErrorDetails;
public delegate* unmanaged[MemberFunction] GetReference;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IStorageFolderHandleAccessVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IStorageFolderHandleAccessVftbl.cs
index 6a27bcd44d..92dae36798 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IStorageFolderHandleAccessVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IStorageFolderHandleAccessVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -53,3 +54,4 @@ public static HRESULT CreateUnsafe(
interopHandle);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IStorageItemHandleAccessVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IStorageItemHandleAccessVftbl.cs
index bd9e191ee3..a7c95edaf1 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IStorageItemHandleAccessVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IStorageItemHandleAccessVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -47,3 +48,4 @@ public static HRESULT CreateUnsafe(
interopHandle);
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IStringableVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IStringableVftbl.cs
index df0acefbfe..50cb59b51e 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IStringableVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IStringableVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -21,4 +22,5 @@ internal unsafe struct IStringableVftbl
public delegate* unmanaged[MemberFunction] GetRuntimeClassName;
public delegate* unmanaged[MemberFunction] GetTrustLevel;
public new delegate* unmanaged[MemberFunction] ToString;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IUnknownVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IUnknownVftbl.cs
index 1ef471420d..e49e0d0b5c 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IUnknownVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IUnknownVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -66,4 +67,5 @@ public static uint ReleaseUnsafe(void* thisPtr)
{
return ((IUnknownVftbl*)*(void***)thisPtr)->Release(thisPtr);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IUriRuntimeClassVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IUriRuntimeClassVftbl.cs
index 3102557e75..e9bf27d075 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IUriRuntimeClassVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IUriRuntimeClassVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -53,4 +54,5 @@ public static HRESULT get_RawUriUnsafe(void* thisPtr, HSTRING* result)
{
return ((IUriRuntimeClassVftbl*)*(void***)thisPtr)->get_RawUri(thisPtr, result);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IVectorVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IVectorVftbl.cs
index 7f0150e3f8..6f2eb6d665 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IVectorVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IVectorVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -34,4 +35,5 @@ internal unsafe struct IVectorVftbl
public delegate* unmanaged[MemberFunction] Clear;
public delegate* unmanaged[MemberFunction] GetMany;
public delegate* unmanaged[MemberFunction] ReplaceAll;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IVectorViewVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IVectorViewVftbl.cs
index 1a7952888d..4f5323c62c 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IVectorViewVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IVectorViewVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using Windows.Foundation;
@@ -29,4 +30,5 @@ internal unsafe struct IVectorViewVftbl
// used from 'WinRT.Interop.dll', which will emit specialized vtable types when necessary.
public delegate* unmanaged[MemberFunction] IndexOf;
public delegate* unmanaged[MemberFunction] GetMany;
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceSourceVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceSourceVftbl.cs
index e351328822..587487780a 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceSourceVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceSourceVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -30,4 +31,5 @@ public static HRESULT GetWeakReferenceUnsafe(void* thisPtr, void** weakReference
{
return ((IWeakReferenceSourceVftbl*)*(void***)thisPtr)->GetWeakReference(thisPtr, weakReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceVftbl.cs b/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceVftbl.cs
index ce374f3702..f1ee03646b 100644
--- a/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceVftbl.cs
+++ b/src/WinRT.Runtime2/InteropServices/Vtables/IWeakReferenceVftbl.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -31,4 +32,5 @@ public static HRESULT ResolveUnsafe(void* thisPtr, Guid* riid, void** objectRefe
{
return ((IWeakReferenceVftbl*)*(void***)thisPtr)->Resolve(thisPtr, riid, objectReference);
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/WeakReferences/ManagedWeakReference.cs b/src/WinRT.Runtime2/InteropServices/WeakReferences/ManagedWeakReference.cs
index 10a02973b2..b90a2bf307 100644
--- a/src/WinRT.Runtime2/InteropServices/WeakReferences/ManagedWeakReference.cs
+++ b/src/WinRT.Runtime2/InteropServices/WeakReferences/ManagedWeakReference.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.Marshalling;
@@ -56,4 +57,5 @@ public HRESULT Resolve(in Guid interfaceId, out void* weakReference)
return WellKnownErrorCodes.S_OK;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs
index 2ca6a8e856..978dd33e4f 100644
--- a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs
+++ b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.g.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -10,10 +10,6 @@ namespace WindowsRuntime.InteropServices;
///
/// IIDs for well known projected WinRT interfaces.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class WellKnownInterfaceIIDs
{
/// The IID for IUnknown.
@@ -232,4 +228,5 @@ public static ref readonly Guid IID_Windows_Storage_Streams_IRandomAccessStream
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => ref WellKnownWindowsInterfaceIIDs.IID_IRandomAccessStream;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt
index 6ddf0ca640..d7078d2a7c 100644
--- a/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt
+++ b/src/WinRT.Runtime2/InteropServices/WellKnownInterfaceIIDs.tt
@@ -5,8 +5,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace WindowsRuntime.InteropServices;
@@ -14,10 +14,6 @@ namespace WindowsRuntime.InteropServices;
///
/// IIDs for well known projected WinRT interfaces.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static class WellKnownInterfaceIIDs
{
<#
@@ -93,4 +89,5 @@ for (int i = 0; i < entries.Length; i++)
}
}
#>
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/WellKnownXamlRuntimeClassNames.g.cs b/src/WinRT.Runtime2/InteropServices/WellKnownXamlRuntimeClassNames.g.cs
index f602936cd8..a57d3c8d33 100644
--- a/src/WinRT.Runtime2/InteropServices/WellKnownXamlRuntimeClassNames.g.cs
+++ b/src/WinRT.Runtime2/InteropServices/WellKnownXamlRuntimeClassNames.g.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft Corporation.
+// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
diff --git a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeBufferMarshal.cs b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeBufferMarshal.cs
index ff0756aa54..d1b6e64f28 100644
--- a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeBufferMarshal.cs
+++ b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeBufferMarshal.cs
@@ -27,6 +27,7 @@ public static partial class WindowsRuntimeBufferMarshal
///
public static unsafe bool TryGetDataUnsafe([NotNullWhen(true)] IBuffer? buffer, out byte* data)
{
+#if !REFERENCE_ASSEMBLY
if (buffer is null)
{
goto Failure;
@@ -49,6 +50,9 @@ public static unsafe bool TryGetDataUnsafe([NotNullWhen(true)] IBuffer? buffer,
data = null;
return false;
+#else
+ throw null!;
+#endif
}
///
@@ -66,6 +70,7 @@ public static unsafe bool TryGetDataUnsafe([NotNullWhen(true)] IBuffer? buffer,
///
public static unsafe bool TryGetDataUnsafe([NotNullWhen(true)] IMemoryBufferReference? buffer, out byte* data, out uint capacity)
{
+#if !REFERENCE_ASSEMBLY
if (buffer is null)
{
goto Failure;
@@ -92,6 +97,9 @@ public static unsafe bool TryGetDataUnsafe([NotNullWhen(true)] IMemoryBufferRefe
capacity = 0;
return false;
+#else
+ throw null!;
+#endif
}
///
@@ -102,6 +110,7 @@ public static unsafe bool TryGetDataUnsafe([NotNullWhen(true)] IMemoryBufferRefe
/// Whether was successfully retrieved.
public static bool TryGetArray([NotNullWhen(true)] IBuffer? buffer, out ArraySegment array)
{
+#if !REFERENCE_ASSEMBLY
if (buffer is null)
{
goto Failure;
@@ -127,5 +136,8 @@ public static bool TryGetArray([NotNullWhen(true)] IBuffer? buffer, out ArraySeg
array = default;
return false;
+#else
+ throw null!;
+#endif
}
}
diff --git a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappers.cs b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappers.cs
index 087229d386..e1ee489123 100644
--- a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappers.cs
+++ b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappers.cs
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Diagnostics;
@@ -495,4 +496,5 @@ public static void ThrowInvalidOperationException()
$"If no static type information is available, it is not possible to leverage any of the static callback types. " +
$"This scenario should never be hit. Please file an issue at https://github.com/microsoft/CsWinRT.");
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs
index 651b4578d4..1b6c286974 100644
--- a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs
+++ b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeComWrappersMarshal.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -20,10 +20,6 @@ namespace WindowsRuntime.InteropServices;
/// the code will throw . It is the caller's responsibility
/// to validate inputs before calling any method in this class.
///
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public static unsafe class WindowsRuntimeComWrappersMarshal
{
///
@@ -231,4 +227,5 @@ public static WindowsRuntimeObjectReference UnwrapObjectReferenceUnsafe(WindowsR
{
return value.NativeObjectReference;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeMarshal.cs b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeMarshal.cs
index fab3807a23..54cd319282 100644
--- a/src/WinRT.Runtime2/InteropServices/WindowsRuntimeMarshal.cs
+++ b/src/WinRT.Runtime2/InteropServices/WindowsRuntimeMarshal.cs
@@ -24,6 +24,7 @@ public static unsafe class WindowsRuntimeMarshal
/// Whether and are the same object or wrap the same underlying native object.
public static bool NativeReferenceEquals(object? left, object? right)
{
+#if !REFERENCE_ASSEMBLY
if (ReferenceEquals(left, right))
{
return true;
@@ -46,6 +47,9 @@ public static bool NativeReferenceEquals(object? left, object? right)
}
return false;
+#else
+ throw null!;
+#endif
}
///
@@ -57,6 +61,7 @@ public static bool NativeReferenceEquals(object? left, object? right)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsReferenceToManagedObject(void* externalComObject)
{
+#if !REFERENCE_ASSEMBLY
ArgumentNullException.ThrowIfNull(externalComObject);
IUnknownVftbl* unknownVftbl = (IUnknownVftbl*)*(void***)externalComObject;
@@ -66,6 +71,9 @@ public static bool IsReferenceToManagedObject(void* externalComObject)
unknownVftbl->QueryInterface == runtimeVftbl->QueryInterface &&
unknownVftbl->AddRef == runtimeVftbl->AddRef &&
unknownVftbl->Release == runtimeVftbl->Release;
+#else
+ throw null!;
+#endif
}
///
@@ -76,6 +84,7 @@ public static bool IsReferenceToManagedObject(void* externalComObject)
/// Whether was a reference to a managed object, and could be retrieved.
public static bool TryGetManagedObject(void* externalComObject, [NotNullWhen(true)] out object? result)
{
+#if !REFERENCE_ASSEMBLY
// If the input pointer is a reference to a managed object, we can resolve the original managed object
if (externalComObject is not null && IsReferenceToManagedObject(externalComObject))
{
@@ -87,6 +96,9 @@ public static bool TryGetManagedObject(void* externalComObject, [NotNullWhen(tru
result = null;
return false;
+#else
+ throw null!;
+#endif
}
///
@@ -97,6 +109,7 @@ public static bool TryGetManagedObject(void* externalComObject, [NotNullWhen(tru
/// Whether was a reference to a native object, and could be retrieved.
public static bool TryGetNativeObject([NotNullWhen(true)] object? managedObject, out void* result)
{
+#if !REFERENCE_ASSEMBLY
// If the input object is wrapping a native object, we can unwrap it and return it after incrementing its reference count
if (WindowsRuntimeComWrappersMarshal.TryUnwrapObjectReference(managedObject, out WindowsRuntimeObjectReference? objectReference))
{
@@ -108,6 +121,9 @@ public static bool TryGetNativeObject([NotNullWhen(true)] object? managedObject,
result = null;
return false;
+#else
+ throw null!;
+#endif
}
///
@@ -128,7 +144,11 @@ public static bool TryGetNativeObject([NotNullWhen(true)] object? managedObject,
///
public static void* ConvertToUnmanaged(object? managedObject)
{
+#if !REFERENCE_ASSEMBLY
return WindowsRuntimeUnknownMarshaller.ConvertToUnmanaged(managedObject).DetachThisPtrUnsafe();
+#else
+ throw null!;
+#endif
}
///
@@ -140,7 +160,11 @@ public static bool TryGetNativeObject([NotNullWhen(true)] object? managedObject,
///
public static object? ConvertToManaged(void* value)
{
+#if !REFERENCE_ASSEMBLY
return WindowsRuntimeObjectMarshaller.ConvertToManaged(value);
+#else
+ throw null!;
+#endif
}
///
@@ -154,6 +178,10 @@ public static bool TryGetNativeObject([NotNullWhen(true)] object? managedObject,
///
public static void Free(void* value)
{
+#if !REFERENCE_ASSEMBLY
WindowsRuntimeUnknownMarshaller.Free(value);
+#else
+ throw null!;
+#endif
}
}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs
index b6720c55fb..0eaa9d1725 100644
--- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs
+++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncAction.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using Windows.Foundation;
@@ -53,10 +53,6 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
public AsyncActionCompletedHandler? Completed
@@ -105,12 +101,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs
index 7f192a9749..16f6647df7 100644
--- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncActionWithProgress{TProgress}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using ABI.Windows.Foundation;
@@ -18,10 +18,6 @@ namespace WindowsRuntime;
/// The implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeAsyncActionWithProgress : WindowsRuntimeObject,
IAsyncActionWithProgress,
IWindowsRuntimeInterface>,
@@ -59,10 +55,6 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -119,12 +111,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs
index a248639770..11de1f6a53 100644
--- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperationWithProgress{TResult, TProgress}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using ABI.Windows.Foundation;
@@ -19,10 +19,6 @@ namespace WindowsRuntime;
/// The implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeAsyncOperationWithProgress : WindowsRuntimeObject,
IAsyncOperationWithProgress,
IWindowsRuntimeInterface>,
@@ -60,10 +56,6 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -120,12 +112,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs
index 86bdd28dc4..73d2afc2c6 100644
--- a/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/AsyncInfo/WindowsRuntimeAsyncOperation{TResult}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using ABI.Windows.Foundation;
@@ -18,10 +18,6 @@ namespace WindowsRuntime;
/// The implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeAsyncOperation : WindowsRuntimeObject,
IAsyncOperation,
IWindowsRuntimeInterface>,
@@ -59,10 +55,6 @@ WindowsRuntimeObjectReference InitializeIAsyncInfoObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -112,12 +104,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInter
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs
index 487915e3d2..484329455e 100644
--- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerable.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using WindowsRuntime.InteropServices;
namespace WindowsRuntime;
@@ -26,10 +26,6 @@ public WindowsRuntimeEnumerable(WindowsRuntimeObjectReference nativeObjectRefere
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -45,12 +41,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs
index dff273efc5..afd959ab39 100644
--- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeEnumerator.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using WindowsRuntime.InteropServices;
@@ -39,10 +39,6 @@ public WindowsRuntimeEnumerator(WindowsRuntimeObjectReference nativeObjectRefere
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -113,12 +109,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs
index 66a402a897..5bbfa44718 100644
--- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeList.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using WindowsRuntime.InteropServices;
@@ -53,10 +53,6 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -148,12 +144,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs
index b8278220c0..e603f5ea0e 100644
--- a/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Bindables/WindowsRuntimeReadOnlyList.cs
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using WindowsRuntime.InteropServices;
@@ -57,10 +57,6 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -76,12 +72,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs
index 41e3c32a57..dfd01c156f 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryKeyCollection{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -13,10 +13,6 @@ namespace WindowsRuntime;
///
/// The type of keys in the dictionary.
/// The type of values in the dictionary.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class DictionaryKeyCollection : ICollection
{
///
@@ -108,10 +104,6 @@ IEnumerator IEnumerable.GetEnumerator()
///
/// The implementation for .
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public sealed class Enumerator : IEnumerator
{
///
@@ -158,4 +150,5 @@ public void Dispose()
_enumerator.Dispose();
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs
index b382430ed2..0340202ab0 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/DictionaryValueCollection{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -13,10 +13,6 @@ namespace WindowsRuntime;
///
/// The type of keys in the dictionary.
/// The type of values in the dictionary.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class DictionaryValueCollection : ICollection
{
///
@@ -117,10 +113,6 @@ IEnumerator IEnumerable.GetEnumerator()
///
/// The implementation for .
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public sealed class Enumerator : IEnumerator
{
///
@@ -167,4 +159,5 @@ public void Dispose()
_enumerator.Dispose();
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs
index 7b9ef3047a..00745d57b9 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryKeyCollection{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -13,10 +13,6 @@ namespace WindowsRuntime;
///
/// The type of keys in the read-only dictionary.
/// The type of values in the read-only dictionary.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class ReadOnlyDictionaryKeyCollection : IEnumerable
{
///
@@ -51,10 +47,6 @@ IEnumerator IEnumerable.GetEnumerator()
///
/// The implementation for .
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public sealed class Enumerator : IEnumerator
{
///
@@ -101,4 +93,5 @@ public void Dispose()
_enumerator.Dispose();
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs
index 00ed96700f..7906189c11 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/ReadOnlyDictionaryValueCollection{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
namespace WindowsRuntime;
@@ -13,10 +13,6 @@ namespace WindowsRuntime;
///
/// The type of keys in the read-only dictionary.
/// The type of values in the read-only dictionary.
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public sealed class ReadOnlyDictionaryValueCollection : IEnumerable
{
///
@@ -51,10 +47,6 @@ IEnumerator IEnumerable.GetEnumerator()
///
/// The implementation for .
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
public sealed class Enumerator : IEnumerator
{
///
@@ -101,4 +93,5 @@ public void Dispose()
_enumerator.Dispose();
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs
index ebe4b6f5d6..d6a6c201f2 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeDictionary{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Threading;
@@ -22,10 +22,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IMap<K, V> implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeDictionary<
TKey,
TValue,
@@ -83,10 +79,6 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -205,12 +197,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs
index bc7d477c2f..19dcc0a566 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerable{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using WindowsRuntime.InteropServices;
#pragma warning disable CA1816
@@ -18,10 +18,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IIterable<T> implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeEnumerable : WindowsRuntimeObject, IEnumerable, IWindowsRuntimeInterface>
where TIIterableMethods : IIterableMethodsImpl
{
@@ -36,10 +32,6 @@ protected WindowsRuntimeEnumerable(WindowsRuntimeObjectReference nativeObjectRef
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -61,12 +53,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs
index dca11f3180..74536fa583 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeEnumerator{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using WindowsRuntime.InteropServices;
@@ -19,10 +19,6 @@ namespace WindowsRuntime;
/// The implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeEnumerator : WindowsRuntimeObject, IEnumerator, IWindowsRuntimeInterface>
where TIIteratorMethods : IIteratorMethodsImpl
{
@@ -47,10 +43,6 @@ protected WindowsRuntimeEnumerator(WindowsRuntimeObjectReference nativeObjectRef
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -142,12 +134,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs
index e77e03308a..2350e390b5 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeList{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using WindowsRuntime.InteropServices;
@@ -22,10 +22,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IVector<T> implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeList<
T,
TIIterable,
@@ -70,10 +66,6 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -162,12 +154,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs
index fa97363bdb..f7e54af61a 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeMapChangedEventArgs{TKey}.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using Windows.Foundation.Collections;
using WindowsRuntime.InteropServices;
@@ -15,10 +15,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IMapChangedEventArgs<K> implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeMapChangedEventArgs : WindowsRuntimeObject,
IMapChangedEventArgs,
IWindowsRuntimeInterface>
@@ -35,10 +31,6 @@ protected WindowsRuntimeMapChangedEventArgs(WindowsRuntimeObjectReference native
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -54,12 +46,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs
index a2b13bd635..ba31ada259 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableMap{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Threading;
@@ -27,10 +27,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IObservableMap<K, V> factory type for event source objects.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeObservableMap<
TKey,
TValue,
@@ -139,10 +135,6 @@ public event MapChangedEventHandler? MapChanged
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -267,12 +259,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs
index 40f4f76aad..e788b92107 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeObservableVector{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using Windows.Foundation.Collections;
@@ -25,10 +25,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IObservableVector<T> factory type for event source objects.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeObservableVector<
T,
TIIterable,
@@ -130,10 +126,6 @@ public event VectorChangedEventHandler? VectorChanged
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -228,12 +220,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs
index 6785c57edd..27dcff050d 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyDictionary{TKey, TValue}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Threading;
@@ -22,10 +22,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IMapView<K, V> implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeReadOnlyDictionary<
TKey,
TValue,
@@ -82,10 +78,6 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -143,12 +135,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs
index 65abb113df..a0fb59f234 100644
--- a/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Collections/WindowsRuntimeReadOnlyList{T}.cs
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
using System.Collections;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using WindowsRuntime.InteropServices;
@@ -20,10 +20,6 @@ namespace WindowsRuntime;
/// The Windows.Foundation.Collections.IVectorView<T> implementation type.
///
[WindowsRuntimeManagedOnlyType]
-[Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
-[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class WindowsRuntimeReadOnlyList<
T,
TIIterable,
@@ -69,10 +65,6 @@ WindowsRuntimeObjectReference InitializeIIterableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal sealed override bool HasUnwrappableNativeObjectReference => true;
///
@@ -106,12 +98,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface>.GetI
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected sealed override bool IsOverridableInterface(in Guid iid)
{
return false;
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs b/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs
index 62a2ecb4dd..b82f6e9ab4 100644
--- a/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Foundation/WindowsRuntimeMemoryBufferReference.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using Windows.Foundation;
@@ -60,10 +60,6 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -88,12 +84,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs
index 2f94efde9f..a241be963e 100644
--- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeBuffer.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using Windows.Storage.Streams;
using WindowsRuntime.InteropServices;
@@ -26,10 +26,6 @@ public WindowsRuntimeBuffer(WindowsRuntimeObjectReference nativeObjectReference)
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -49,12 +45,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInterfac
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs
index c3de4a7ae7..a7655dc42b 100644
--- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeInputStream.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using Windows.Foundation;
@@ -54,10 +54,6 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -85,12 +81,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs
index 26d28c990a..f40ceb2989 100644
--- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeOutputStream.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using Windows.Foundation;
@@ -52,10 +52,6 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -89,12 +85,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs
index fe50449890..be7bd901ff 100644
--- a/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs
+++ b/src/WinRT.Runtime2/NativeObjects/Streams/WindowsRuntimeRandomAccessStream.cs
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+#if !REFERENCE_ASSEMBLY
using System;
-using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading;
using Windows.Foundation;
@@ -98,10 +98,6 @@ WindowsRuntimeObjectReference InitializeIClosableObjectReference()
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected internal override bool HasUnwrappableNativeObjectReference => true;
///
@@ -193,12 +189,9 @@ WindowsRuntimeObjectReferenceValue IWindowsRuntimeInterface.GetInte
}
///
- [Obsolete(WindowsRuntimeConstants.PrivateImplementationDetailObsoleteMessage,
- DiagnosticId = WindowsRuntimeConstants.PrivateImplementationDetailObsoleteDiagnosticId,
- UrlFormat = WindowsRuntimeConstants.CsWinRTDiagnosticsUrlFormat)]
- [EditorBrowsable(EditorBrowsableState.Never)]
protected override bool IsOverridableInterface(in Guid iid)
{
return false;
}
}
+#endif
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs b/src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs
deleted file mode 100644
index e871e10332..0000000000
--- a/src/WinRT.Runtime2/Properties/WindowsRuntimeConstants.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation.
-// Licensed under the MIT License.
-
-namespace WindowsRuntime;
-
-///
-/// A type containing constants for various scenarios related to Windows Runtime functionality and projections.
-///
-internal static class WindowsRuntimeConstants
-{
- ///
- /// A message for private implementation detail types.
- ///
- public const string PrivateImplementationDetailObsoleteMessage =
- "This type or method is a private implementation detail, and it's only meant to be consumed by generated projections (produced by 'cswinrt.exe') " +
- "and by generated interop code (produced by 'cswinrtinteropgen.exe'). Private implementation detail types are not considered part of the versioned " +
- "API surface, and they are ignored when determining the assembly version following semantic versioning. Types might be modified or removed " +
- "across any version change for 'WinRT.Runtime.dll', and using them in user code is undefined behavior and not supported.";
-
- ///
- /// The diagnostic id for private implementation detail types.
- ///
- public const string PrivateImplementationDetailObsoleteDiagnosticId = "CSWINRT3001";
-
- ///
- /// The URL format for all custom diagnostics for CsWinRT.
- ///
- ///
- /// This URL format assumes it will receive the diagnostic id as a parameter.
- ///
- public const string CsWinRTDiagnosticsUrlFormat = "https://aka.ms/cswinrt/errors/{0}";
-}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Properties/WindowsRuntimeExceptionExtensions.cs b/src/WinRT.Runtime2/Properties/WindowsRuntimeExceptionExtensions.cs
index 06a163f49d..8374eccb8e 100644
--- a/src/WinRT.Runtime2/Properties/WindowsRuntimeExceptionExtensions.cs
+++ b/src/WinRT.Runtime2/Properties/WindowsRuntimeExceptionExtensions.cs
@@ -1481,19 +1481,4 @@ public static ArgumentNullException GetIOCompletionCallbackCannotProcessNullAsyn
return new(paramName, WindowsRuntimeExceptionMessages.ArgumentNullReference_IOCompletionCallbackCannotProcessNullAsyncInfo);
}
}
-
- extension(UnreachableException)
- {
- ///
- /// Throws an .
- ///
- /// This method never returns.
- /// Always thrown.
- [DoesNotReturn]
- [StackTraceHidden]
- public static bool Throw()
- {
- throw new UnreachableException();
- }
- }
-}
+}
\ No newline at end of file
diff --git a/src/WinRT.Runtime2/Properties/WindowsRuntimeFeatureSwitches.cs b/src/WinRT.Runtime2/Properties/WindowsRuntimeFeatureSwitches.cs
index 99d5d20c94..7d9d247c6e 100644
--- a/src/WinRT.Runtime2/Properties/WindowsRuntimeFeatureSwitches.cs
+++ b/src/WinRT.Runtime2/Properties/WindowsRuntimeFeatureSwitches.cs
@@ -4,6 +4,8 @@
using System;
using System.Diagnostics.CodeAnalysis;
+#pragma warning disable CS1574
+
namespace WindowsRuntime;
///
diff --git a/src/WinRT.Runtime2/WinRT.Runtime.csproj b/src/WinRT.Runtime2/WinRT.Runtime.csproj
index 2b734d5c1d..18ba7a1b0d 100644
--- a/src/WinRT.Runtime2/WinRT.Runtime.csproj
+++ b/src/WinRT.Runtime2/WinRT.Runtime.csproj
@@ -1,4 +1,4 @@
-
+net10.014.0
@@ -81,13 +81,41 @@
-->
$(NoWarn);AD0001
-
- $(NoWarn);CSWINRT3001
-
truekey.snk
+
+
+
+ false
+
+
+
+
+ $(DefineConstants);REFERENCE_ASSEMBLY
+
+
+ $(NoWarn);CS8597;IDE0005;IDE0380
+