Use auto-properties in attributes to enforce readonly
このコミットが含まれているのは:
1 親
0e24e68b10
コミット
e3e6f89038
19ファイル変更
+20
-20
検索条件に一致するファイルはありません
@@ -14,7 +14,7 @@ internal sealed class HlslIntrinsicNameAttribute(string name) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the name of the HLSL intrinsic.
|
||||
/// </summary>
|
||||
public string Name => name;
|
||||
public string Name { get; } = name;
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether or not matching parameters is also required to extract the name of this intrinsic.
|
||||
|
||||
@@ -31,5 +31,5 @@ public sealed class D2DCompileOptionsAttribute(D2D1CompileOptions options) : Att
|
||||
/// <summary>
|
||||
/// Gets the number of threads in each thread group for the X axis
|
||||
/// </summary>
|
||||
public D2D1CompileOptions Options => options;
|
||||
public D2D1CompileOptions Options { get; } = options;
|
||||
}
|
||||
@@ -15,5 +15,5 @@ public sealed class D2DEffectAuthorAttribute(string value) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the author value.
|
||||
/// </summary>
|
||||
public string Value => value;
|
||||
public string Value { get; } = value;
|
||||
}
|
||||
@@ -15,5 +15,5 @@ public sealed class D2DEffectCategoryAttribute(string value) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the category value.
|
||||
/// </summary>
|
||||
public string Value => value;
|
||||
public string Value { get; } = value;
|
||||
}
|
||||
@@ -15,5 +15,5 @@ public sealed class D2DEffectDescriptionAttribute(string value) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the description value.
|
||||
/// </summary>
|
||||
public string Value => value;
|
||||
public string Value { get; } = value;
|
||||
}
|
||||
@@ -15,5 +15,5 @@ public sealed class D2DEffectDisplayNameAttribute(string value) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the display name value.
|
||||
/// </summary>
|
||||
public string Value => value;
|
||||
public string Value { get; } = value;
|
||||
}
|
||||
@@ -17,5 +17,5 @@ public sealed class D2DInputComplexAttribute(int index) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the index of the resource declared as using complex sampling.
|
||||
/// </summary>
|
||||
public int Index => index;
|
||||
public int Index { get; } = index;
|
||||
}
|
||||
@@ -17,5 +17,5 @@ public sealed class D2DInputCountAttribute(int count) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the number of texture inputs for the shader.
|
||||
/// </summary>
|
||||
public int Count => count;
|
||||
public int Count { get; } = count;
|
||||
}
|
||||
@@ -18,12 +18,12 @@ public sealed class D2DInputDescriptionAttribute(int index, D2D1Filter filter) :
|
||||
/// <summary>
|
||||
/// Gets the index of the resource to declare the description for.
|
||||
/// </summary>
|
||||
public int Index => index;
|
||||
public int Index { get; } = index;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of filter to apply to the input texture.
|
||||
/// </summary>
|
||||
public D2D1Filter Filter => filter;
|
||||
public D2D1Filter Filter { get; } = filter;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the mip level to retrieve from the upstream transform, if specified.
|
||||
|
||||
@@ -17,5 +17,5 @@ public sealed class D2DInputSimpleAttribute(int index) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the index of the resource declared as using simple sampling.
|
||||
/// </summary>
|
||||
public int Index => index;
|
||||
public int Index { get; } = index;
|
||||
}
|
||||
@@ -16,5 +16,5 @@ public sealed class D2DPixelOptionsAttribute(D2D1PixelOptions options) : Attribu
|
||||
/// <summary>
|
||||
/// Gets the options to specify for the shader.
|
||||
/// </summary>
|
||||
public D2D1PixelOptions Options => options;
|
||||
public D2D1PixelOptions Options { get; } = options;
|
||||
}
|
||||
@@ -39,5 +39,5 @@ public sealed class D2DPixelShaderSourceAttribute([StringSyntax("Hlsl")] string
|
||||
/// <summary>
|
||||
/// Gets the number of texture inputs for the shader.
|
||||
/// </summary>
|
||||
public string HlslSource => hlslSource;
|
||||
public string HlslSource { get; } = hlslSource;
|
||||
}
|
||||
@@ -16,5 +16,5 @@ public sealed class D2DResourceTextureIndexAttribute(int index) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the index of the annotated resource field.
|
||||
/// </summary>
|
||||
public int Index => index;
|
||||
public int Index { get; } = index;
|
||||
}
|
||||
@@ -31,5 +31,5 @@ public sealed class D2DShaderProfileAttribute(D2D1ShaderProfile shaderProfile) :
|
||||
/// <summary>
|
||||
/// The shader profile used to compile the annotated D2D1 pixel shader.
|
||||
/// </summary>
|
||||
public D2D1ShaderProfile ShaderProfile => shaderProfile;
|
||||
public D2D1ShaderProfile ShaderProfile { get; } = shaderProfile;
|
||||
}
|
||||
@@ -12,5 +12,5 @@ public sealed class AdditionalDataAttribute(params object[] data) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the additional input data for the current attribute.
|
||||
/// </summary>
|
||||
public object[] Data => data;
|
||||
public object[] Data { get; } = data;
|
||||
}
|
||||
@@ -12,5 +12,5 @@ public sealed class AdditionalResourceAttribute(Type type) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the additional resource type for the current attribute.
|
||||
/// </summary>
|
||||
public Type Type => type;
|
||||
public Type Type { get; } = type;
|
||||
}
|
||||
@@ -12,5 +12,5 @@ public sealed class DataAttribute(params object[] data) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the input data for the current attribute.
|
||||
/// </summary>
|
||||
public object[] Data => data;
|
||||
public object[] Data { get; } = data;
|
||||
}
|
||||
@@ -13,5 +13,5 @@ public sealed class DeviceAttribute(Device device) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Extensions.Device"/> target to use.
|
||||
/// </summary>
|
||||
public Device Device => device;
|
||||
public Device Device { get; } = device;
|
||||
}
|
||||
@@ -12,5 +12,5 @@ public sealed class ResourceAttribute(Type type) : Attribute
|
||||
/// <summary>
|
||||
/// Gets the resource type for the current attribute.
|
||||
/// </summary>
|
||||
public Type Type => type;
|
||||
public Type Type { get; } = type;
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする