Remove [AutoConstructor] attributes

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-24 02:05:09 +01:00
1 親 f6326c8249
コミット bf9b1231b0
7ファイル変更
+4 -61

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

+4 -3
ファイルの表示
@@ -4,8 +4,6 @@
using System.Numerics;
using System.Runtime.CompilerServices;
#pragma warning disable IDE0022
namespace SixLabors.ImageSharp;
/// <summary>
@@ -30,5 +28,8 @@ internal struct ComplexVector4
/// <param name="b">The 'b' parameter, for the imaginary component</param>
/// <returns>The resulting <see cref="Vector4"/> value</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly Vector4 WeightedSum(float a, float b) => (this.Real * a) + (this.Imaginary * b);
public readonly Vector4 WeightedSum(float a, float b)
{
return (this.Real * a) + (this.Imaginary * b);
}
}
-17
ファイルの表示
@@ -1,17 +0,0 @@
using System;
using System.ComponentModel;
namespace ComputeSharp;
/// <summary>
/// An attribute that indicates that a target shader type should get an automatic constructor for all fields.
/// </summary>
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete(
"This API (and its accompanying source generator) is being removed in a future version of ComputeSharp. " +
"If you're relying on this functionality, consider switching to primary constructors, once they are supported. " +
"Otherwise, consider using alternative source generators providing similar functionality available on NuGet.")]
public sealed class AutoConstructorAttribute : Attribute
{
}
-12
ファイルの表示
@@ -1,12 +0,0 @@
namespace ComputeSharp;
/// <summary>
/// Indicates the behavior of fields annotated with <see cref="AutoConstructorBehaviorAttribute"/>.
/// </summary>
internal enum AutoConstructorBehavior
{
/// <summary>
/// Causes <see cref="AutoConstructorAttribute"/> to ignore fields and set their values to <see langword="default"/>.
/// </summary>
IgnoreAndSetToDefault
}
-26
ファイルの表示
@@ -1,26 +0,0 @@
using System;
#pragma warning disable IDE0290
namespace ComputeSharp;
/// <summary>
/// An attribute that indicates that a target shader type should get an automatic constructor for all fields.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false)]
internal sealed class AutoConstructorBehaviorAttribute : Attribute
{
/// <summary>
/// Creates a new <see cref="AutoConstructorBehaviorAttribute"/> instance with the specified parameters.
/// </summary>
/// <param name="behavior">The <see cref="AutoConstructorBehavior"/> value for the current instance.</param>
public AutoConstructorBehaviorAttribute(AutoConstructorBehavior behavior)
{
Behavior = behavior;
}
/// <summary>
/// Gets the <see cref="AutoConstructorBehavior"/> value for the current instance.
/// </summary>
public AutoConstructorBehavior Behavior { get; }
}
-1
ファイルの表示
@@ -7,7 +7,6 @@ namespace ComputeSharp.D2D1;
/// This can be used from D2D1 pixel shaders to be able to pass arbitrary inputs to them.
/// </summary>
/// <typeparam name="T">The type of items stored on the texture (only <see langword="float"/> and <see cref="Float4"/> are supported).</typeparam>
[AutoConstructorBehavior(AutoConstructorBehavior.IgnoreAndSetToDefault)]
public readonly struct D2D1ResourceTexture1D<T>
where T : unmanaged
{
-1
ファイルの表示
@@ -7,7 +7,6 @@ namespace ComputeSharp.D2D1;
/// This can be used from D2D1 pixel shaders to be able to pass arbitrary inputs to them.
/// </summary>
/// <typeparam name="T">The type of items stored on the texture (only <see langword="float"/> and <see cref="Float4"/> are supported).</typeparam>
[AutoConstructorBehavior(AutoConstructorBehavior.IgnoreAndSetToDefault)]
public readonly struct D2D1ResourceTexture2D<T>
where T : unmanaged
{
-1
ファイルの表示
@@ -7,7 +7,6 @@ namespace ComputeSharp.D2D1;
/// This can be used from D2D1 pixel shaders to be able to pass arbitrary inputs to them.
/// </summary>
/// <typeparam name="T">The type of items stored on the texture (only <see langword="float"/> and <see cref="Float4"/> are supported).</typeparam>
[AutoConstructorBehavior(AutoConstructorBehavior.IgnoreAndSetToDefault)]
public readonly struct D2D1ResourceTexture3D<T>
where T : unmanaged
{