Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ namespace Windows.Foundation;
/// <remarks>
/// This type is required for ABI projection of the value types and delegates, but marshalling it is not supported.
/// </remarks>
[ApiContract]
[ContractVersion(262144u)]
public enum FoundationContract;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;
using System.Runtime.Versioning;
using WindowsRuntime;

namespace Windows.Foundation.Metadata;

/// <summary>
/// Specifies that the type represents an API contract.
/// </summary>
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
[AttributeUsage(AttributeTargets.Enum, AllowMultiple = false)]
[SupportedOSPlatform("Windows10.0.10240.0")]
[ContractVersion(typeof(FoundationContract), 65536u)]
public sealed class ApiContractAttribute : Attribute;
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ namespace Windows.Foundation.Metadata;
/// <summary>
/// Indicates the version of the API contract.
/// </summary>
/// <remarks>
/// This type is required for ABI projection of the value types and delegates, but marshalling it is not supported.
/// </remarks>
[WindowsRuntimeMetadata("Windows.Foundation.FoundationContract")]
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
[SupportedOSPlatform("Windows10.0.10240.0")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ namespace Windows.Foundation;
/// <remarks>
/// This type is required for ABI projection of the value types and delegates, but marshalling it is not supported.
/// </remarks>
[ApiContract]
[ContractVersion(1245184u)]
public enum UniversalApiContract;
1 change: 1 addition & 0 deletions src/cswinrt/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,7 @@ namespace cswinrt
},
{ "Windows.Foundation.Metadata",
{
{ "ApiContractAttribute", "Windows.Foundation.Metadata", "ApiContractAttribute"},
{ "AttributeTargets", "System", "AttributeTargets" },
{ "AttributeUsageAttribute", "System", "AttributeUsageAttribute" },
{ "ContractVersionAttribute", "Windows.Foundation.Metadata", "ContractVersionAttribute"},
Expand Down