Use primary constructors in published projects

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-20 23:06:21 +01:00
1 親 531e3c3b35
コミット 46a6b25756
54ファイル変更
+210 -564

検索条件に一致するファイルはありません

+5 -14
ファイルの表示
@@ -10,29 +10,20 @@ namespace ComputeSharp.D2D1;
/// <para>This attribute exposes the options that can be set via <c>D2D1_INPUT_DESCRIPTION</c>.</para>
/// <para>For more info, see <see href="https://docs.microsoft.com/windows/win32/api/d2d1effectauthor/ns-d2d1effectauthor-d2d1_input_description"/>.</para>
/// </remarks>
/// <param name="index">The index of the resource to declare the description for.</param>
/// <param name="filter">The type of filter to apply to the input texture.</param>
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
public sealed class D2DInputDescriptionAttribute : Attribute
public sealed class D2DInputDescriptionAttribute(int index, D2D1Filter filter) : Attribute
{
/// <summary>
/// Creates a new instance of the <see cref="D2DInputDescriptionAttribute"/> type with the specified arguments.
/// </summary>
/// <param name="index">The index of the resource to declare the description for.</param>
/// <param name="filter">The type of filter to apply to the input texture.</param>
public D2DInputDescriptionAttribute(int index, D2D1Filter filter)
{
Index = index;
Filter = filter;
}
/// <summary>
/// Gets the index of the resource to declare the description for.
/// </summary>
public int Index { get; }
public int Index => index;
/// <summary>
/// Gets the type of filter to apply to the input texture.
/// </summary>
public D2D1Filter Filter { get; }
public D2D1Filter Filter => filter;
/// <summary>
/// Gets the mip level to retrieve from the upstream transform, if specified.