Use primary constructors in published projects
このコミットが含まれているのは:
1 親
531e3c3b35
コミット
46a6b25756
54ファイル変更
+210
-564
検索条件に一致するファイルはありません
@@ -24,20 +24,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// This attribute can also be added to a whole assembly, and will be used by default if not overridden by a shader type.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="options">The compiler options to use to compile the shader.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Assembly | AttributeTargets.Method, AllowMultiple = false)]
|
||||
public sealed class D2DCompileOptionsAttribute : Attribute
|
||||
public sealed class D2DCompileOptionsAttribute(D2D1CompileOptions options) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="D2DCompileOptionsAttribute"/> instance with the specified parameters.
|
||||
/// </summary>
|
||||
/// <param name="options">The compiler options to use to compile the shader.</param>
|
||||
public D2DCompileOptionsAttribute(D2D1CompileOptions options)
|
||||
{
|
||||
Options = options;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of threads in each thread group for the X axis
|
||||
/// </summary>
|
||||
public D2D1CompileOptions Options { get; }
|
||||
public D2D1CompileOptions Options => options;
|
||||
}
|
||||
@@ -8,20 +8,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
/// <param name="value">The value for the author.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public sealed class D2DEffectAuthorAttribute : Attribute
|
||||
public sealed class D2DEffectAuthorAttribute(string value) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DEffectAuthorAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="value">The value for the author.</param>
|
||||
public D2DEffectAuthorAttribute(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the author value.
|
||||
/// </summary>
|
||||
public string Value { get; }
|
||||
public string Value => value;
|
||||
}
|
||||
@@ -8,20 +8,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
/// <param name="value">The value for the category.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public sealed class D2DEffectCategoryAttribute : Attribute
|
||||
public sealed class D2DEffectCategoryAttribute(string value) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DEffectCategoryAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="value">The value for the category.</param>
|
||||
public D2DEffectCategoryAttribute(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the category value.
|
||||
/// </summary>
|
||||
public string Value { get; }
|
||||
public string Value => value;
|
||||
}
|
||||
@@ -8,20 +8,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
/// <param name="value">The value for the description.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
|
||||
public sealed class D2DEffectDescriptionAttribute : Attribute
|
||||
public sealed class D2DEffectDescriptionAttribute(string value) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DEffectDescriptionAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="value">The value for the description.</param>
|
||||
public D2DEffectDescriptionAttribute(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the description value.
|
||||
/// </summary>
|
||||
public string Value { get; }
|
||||
public string Value => value;
|
||||
}
|
||||
@@ -8,20 +8,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
/// <param name="value">The value for the display name.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
|
||||
public sealed class D2DEffectDisplayNameAttribute : Attribute
|
||||
public sealed class D2DEffectDisplayNameAttribute(string value) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DEffectDisplayNameAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="value">The value for the display name.</param>
|
||||
public D2DEffectDisplayNameAttribute(string value)
|
||||
{
|
||||
Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the display name value.
|
||||
/// </summary>
|
||||
public string Value { get; }
|
||||
public string Value => value;
|
||||
}
|
||||
@@ -8,20 +8,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// This only applies to effects created from <see cref="Interop.D2D1PixelShaderEffect"/>.
|
||||
/// </remarks>
|
||||
/// <param name="value">The value for the effect id.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
|
||||
public sealed class D2DEffectIdAttribute : Attribute
|
||||
public sealed class D2DEffectIdAttribute(string value) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DEffectIdAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="value">The value for the effect id.</param>
|
||||
public D2DEffectIdAttribute(string value)
|
||||
{
|
||||
Value = Guid.Parse(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the effect id value.
|
||||
/// </summary>
|
||||
public Guid Value { get; }
|
||||
public Guid Value { get; } = Guid.Parse(value);
|
||||
}
|
||||
@@ -10,20 +10,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <para>This attribute directly maps to <c>#define D2D_INPUT<N>_COMPLEX</c>.</para>
|
||||
/// <para>For more info, see <see href="https://docs.microsoft.com/en-us/windows/win32/direct2d/hlsl-helpers"/>.</para>
|
||||
/// </remarks>
|
||||
/// <param name="index">The index of the resource to declare as using complex sampling.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
|
||||
public sealed class D2DInputComplexAttribute : Attribute
|
||||
public sealed class D2DInputComplexAttribute(int index) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DInputComplexAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the resource to declare as using complex sampling.</param>
|
||||
public D2DInputComplexAttribute(int index)
|
||||
{
|
||||
Index = index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the index of the resource declared as using complex sampling.
|
||||
/// </summary>
|
||||
public int Index { get; }
|
||||
public int Index => index;
|
||||
}
|
||||
@@ -10,20 +10,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <para>This attribute directly maps to <c>#define D2D_INPUT_COUNT <N></c>.</para>
|
||||
/// <para>For more info, see <see href="https://docs.microsoft.com/en-us/windows/win32/direct2d/hlsl-helpers"/>.</para>
|
||||
/// </remarks>
|
||||
/// <param name="count">The number of texture inputs for the shader.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
|
||||
public sealed class D2DInputCountAttribute : Attribute
|
||||
public sealed class D2DInputCountAttribute(int count) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DInputCountAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="count">The number of texture inputs for the shader.</param>
|
||||
public D2DInputCountAttribute(int count)
|
||||
{
|
||||
Count = count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of texture inputs for the shader.
|
||||
/// </summary>
|
||||
public int Count { get; }
|
||||
public int Count => count;
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -10,20 +10,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <para>This attribute directly maps to <c>#define D2D_INPUT<N>_SIMPLE</c>.</para>
|
||||
/// <para>For more info, see <see href="https://docs.microsoft.com/en-us/windows/win32/direct2d/hlsl-helpers"/>.</para>
|
||||
/// </remarks>
|
||||
/// <param name="index">The index of the resource to declare as using simple sampling.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
|
||||
public sealed class D2DInputSimpleAttribute : Attribute
|
||||
public sealed class D2DInputSimpleAttribute(int index) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DInputSimpleAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the resource to declare as using simple sampling.</param>
|
||||
public D2DInputSimpleAttribute(int index)
|
||||
{
|
||||
Index = index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the index of the resource declared as using simple sampling.
|
||||
/// </summary>
|
||||
public int Index { get; }
|
||||
public int Index => index;
|
||||
}
|
||||
@@ -9,20 +9,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// For more info, see <see href="https://docs.microsoft.com/windows/win32/api/d2d1effectauthor/ne-d2d1effectauthor-d2d1_pixel_options"/>.
|
||||
/// </remarks>
|
||||
/// <param name="options">The options to specify for the shader.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
|
||||
public sealed class D2DPixelOptionsAttribute : Attribute
|
||||
public sealed class D2DPixelOptionsAttribute(D2D1PixelOptions options) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DPixelOptionsAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="options">The options to specify for the shader.</param>
|
||||
public D2DPixelOptionsAttribute(D2D1PixelOptions options)
|
||||
{
|
||||
Options = options;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the options to specify for the shader.
|
||||
/// </summary>
|
||||
public D2D1PixelOptions Options { get; }
|
||||
public D2D1PixelOptions Options => options;
|
||||
}
|
||||
@@ -32,20 +32,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// to further customize the shader profile to use when compiling the HLSL source, and the compile options to use.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="hlslSource">The number of texture inputs for the shader.</param>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
||||
public sealed class D2DPixelShaderSourceAttribute : Attribute
|
||||
public sealed class D2DPixelShaderSourceAttribute([StringSyntax("Hlsl")] string hlslSource) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DPixelShaderSourceAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="hlslSource">The number of texture inputs for the shader.</param>
|
||||
public D2DPixelShaderSourceAttribute([StringSyntax("Hlsl")] string hlslSource)
|
||||
{
|
||||
HlslSource = hlslSource;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of texture inputs for the shader.
|
||||
/// </summary>
|
||||
public string HlslSource { get; }
|
||||
public string HlslSource => hlslSource;
|
||||
}
|
||||
@@ -9,20 +9,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// <remarks>
|
||||
/// <para>For more info, see <see href="https://docs.microsoft.com/windows/win32/api/d2d1effectauthor/nf-d2d1effectauthor-id2d1drawinfo-setresourcetexture"/>.</para>
|
||||
/// </remarks>
|
||||
/// <param name="index">The index of the annotated resource field.</param>
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
|
||||
public sealed class D2DResourceTextureIndexAttribute : Attribute
|
||||
public sealed class D2DResourceTextureIndexAttribute(int index) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="D2DResourceTextureIndexAttribute"/> type with the specified arguments.
|
||||
/// </summary>
|
||||
/// <param name="index">The index of the annotated resource field.</param>
|
||||
public D2DResourceTextureIndexAttribute(int index)
|
||||
{
|
||||
Index = index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the index of the annotated resource field.
|
||||
/// </summary>
|
||||
public int Index { get; }
|
||||
public int Index => index;
|
||||
}
|
||||
@@ -24,20 +24,12 @@ namespace ComputeSharp.D2D1;
|
||||
/// This attribute can also be added to a whole assembly, and will be used by default if not overridden by a shader type.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="shaderProfile">The target shader profile to use to compile the shader.</param>
|
||||
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Assembly | AttributeTargets.Method, AllowMultiple = false)]
|
||||
public sealed class D2DShaderProfileAttribute : Attribute
|
||||
public sealed class D2DShaderProfileAttribute(D2D1ShaderProfile shaderProfile) : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="D2DShaderProfileAttribute"/> instance with the specified parameters.
|
||||
/// </summary>
|
||||
/// <param name="shaderProfile">The target shader profile to use to compile the shader.</param>
|
||||
public D2DShaderProfileAttribute(D2D1ShaderProfile shaderProfile)
|
||||
{
|
||||
ShaderProfile = shaderProfile;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The shader profile used to compile the annotated D2D1 pixel shader.
|
||||
/// </summary>
|
||||
public D2D1ShaderProfile ShaderProfile { get; }
|
||||
public D2D1ShaderProfile ShaderProfile => shaderProfile;
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする