1
0
mirror of https://github.com/chylex/.NET-Community-Toolkit.git synced 2024-11-24 07:42:45 +01:00
.NET-Community-Toolkit/CommunityToolkit.HighPerformance/Properties/Polyfills/RequiresPreviewFeaturesAttribute.cs
2022-01-01 20:11:13 +01:00

55 lines
1.6 KiB
C#

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#if !NET6_0_OR_GREATER
namespace System.Runtime.Versioning;
/// <summary>
/// Indicates that an API is in preview.
/// </summary>
[AttributeUsage(
AttributeTargets.Assembly |
AttributeTargets.Module |
AttributeTargets.Class |
AttributeTargets.Interface |
AttributeTargets.Delegate |
AttributeTargets.Struct |
AttributeTargets.Enum |
AttributeTargets.Constructor |
AttributeTargets.Method |
AttributeTargets.Property |
AttributeTargets.Field |
AttributeTargets.Event,
Inherited = false)]
internal sealed class RequiresPreviewFeaturesAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <seealso cref="RequiresPreviewFeaturesAttribute"/> class.
/// </summary>
public RequiresPreviewFeaturesAttribute()
{
}
/// <summary>
/// Initializes a new instance of the <seealso cref="RequiresPreviewFeaturesAttribute"/> class with the specified message.
/// </summary>
/// <param name="message">An optional message associated with this attribute instance.</param>
public RequiresPreviewFeaturesAttribute(string? message)
{
Message = message;
}
/// <summary>
/// Returns the optional message associated with this attribute instance.
/// </summary>
public string? Message { get; }
/// <summary>
/// Returns the optional URL associated with this attribute instance.
/// </summary>
public string? Url { get; set; }
}
#endif