From fd2e819a8ef3378533b60bf9a255a79cb60e0f6d Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Thu, 23 Nov 2023 11:26:16 +0000
Subject: [PATCH] style: format code with dotnet-format
This commit fixes the style issues introduced in f4ff5cf according to the output
from dotnet-format.
Details: None
---
.../SetsRequiredMembersAttribute.cs | 14 +++---
.../CompilerFeatureRequiredAttribute.cs | 48 +++++++++----------
.../IsExternalInit.cs | 3 +-
3 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/System.Private.CoreLib.Polyfills/System.Diagnostics.CodeAnalysis/SetsRequiredMembersAttribute.cs b/System.Private.CoreLib.Polyfills/System.Diagnostics.CodeAnalysis/SetsRequiredMembersAttribute.cs
index 850160a..3ab7b70 100644
--- a/System.Private.CoreLib.Polyfills/System.Diagnostics.CodeAnalysis/SetsRequiredMembersAttribute.cs
+++ b/System.Private.CoreLib.Polyfills/System.Diagnostics.CodeAnalysis/SetsRequiredMembersAttribute.cs
@@ -3,11 +3,11 @@ namespace System.Diagnostics.CodeAnalysis;
[System.AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
internal sealed class SetsRequiredMembersAttribute(params string[] members) : Attribute
{
- public string[] Members { get; } = members;
-
- public SetsRequiredMembersAttribute()
- : this(null as string[]) { }
-
- public SetsRequiredMembersAttribute(string members)
- : this(new[] { members }) { }
+ public string[] Members { get; } = members;
+
+public SetsRequiredMembersAttribute()
+ : this(null as string[]) { }
+
+public SetsRequiredMembersAttribute(string members)
+ : this(new[] { members }) { }
}
diff --git a/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs b/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs
index 030bd6b..0c1e51b 100644
--- a/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs
+++ b/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs
@@ -8,28 +8,28 @@ internal sealed class CompilerFeatureRequiredAttribute(string? featureName, bool
: Attribute
{
public CompilerFeatureRequiredAttribute(string? featureName)
- : this(featureName, false) { }
-
- public CompilerFeatureRequiredAttribute()
- : this(null) { }
-
- ///
- /// The used for the ref structs C# feature.
- ///
- public const string RefStructs = nameof(RefStructs);
-
- ///
- /// The used for the required members C# feature.
- ///
- public const string RequiredMembers = nameof(RequiredMembers);
-
- ///
- /// The name of the compiler feature.
- ///
- public string FeatureName { get; } = featureName;
-
- ///
- /// If , the compiler can choose to allow access to the location where this attribute is applied if it does not understand .
- ///
- public bool IsOptional { get; init; } = isOptional;
+ : this(featureName, false) { }
+
+public CompilerFeatureRequiredAttribute()
+ : this(null) { }
+
+///
+/// The used for the ref structs C# feature.
+///
+public const string RefStructs = nameof(RefStructs);
+
+///
+/// The used for the required members C# feature.
+///
+public const string RequiredMembers = nameof(RequiredMembers);
+
+///
+/// The name of the compiler feature.
+///
+public string FeatureName { get; } = featureName;
+
+///
+/// If , the compiler can choose to allow access to the location where this attribute is applied if it does not understand .
+///
+public bool IsOptional { get; init; } = isOptional;
}
diff --git a/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/IsExternalInit.cs b/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/IsExternalInit.cs
index 08cb489..0f0455e 100644
--- a/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/IsExternalInit.cs
+++ b/System.Private.CoreLib.Polyfills/System.Runtime.CompilerServices/IsExternalInit.cs
@@ -15,5 +15,6 @@ namespace System.Runtime.CompilerServices
#else
internal
#endif
- static class IsExternalInit { }
+ static class IsExternalInit
+ { }
}