Skip to content

Commit 7941f0f

Browse files
author
GitHub Actions Autoformatter
committed
Auto-format source code
1 parent 965bbe9 commit 7941f0f

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

src/rgen/Microsoft.Macios.Generator/DataModel/TypeInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public bool IsView {
214214
get => isView;
215215
init => isView = value;
216216
}
217-
217+
218218
readonly bool isNSCoding = false;
219219

220220
/// <summary>

src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ namespace Microsoft.Macios.Generator.Emitters;
2525
/// Emitter for Objective-C classes.
2626
/// </summary>
2727
class ClassEmitter : IClassEmitter {
28-
28+
2929
const string initWithCoderSelector = "initWithCoder:";
30-
30+
3131
/// <inheritdoc />
3232
public string GetSymbolName (in Binding binding)
3333
{
@@ -63,7 +63,7 @@ static void EmitNSCondingConstructor (in BindingContext context, TabbedWriter<St
6363
var uiThreadCheck = (context.NeedsThreadChecks)
6464
? EnsureUiThread (context.RootContext.CurrentPlatform)
6565
: null;
66-
66+
6767
classBlock.WriteDocumentation (Documentation.Class.InitWithCoder (context.Changes.Name));
6868
classBlock.AppendGeneratedCodeAttribute (optimizable: true);
6969
classBlock.AppendDesignatedInitializer ();
@@ -72,7 +72,7 @@ static void EmitNSCondingConstructor (in BindingContext context, TabbedWriter<St
7272
classBlock.AppendBgenExportAttribute (initWithCoderSelector);
7373
}
7474
using (var constructorBlock = classBlock.CreateBlock (
75-
$"public {context.Changes.Name} (NSCoder coder) : base (NSObjectFlag.Empty)", block: true)) {
75+
$"public {context.Changes.Name} (NSCoder coder) : base (NSObjectFlag.Empty)", block: true)) {
7676
if (uiThreadCheck is not null) {
7777
constructorBlock.WriteLine (uiThreadCheck.ToString ());
7878
constructorBlock.WriteLine ();
@@ -104,7 +104,7 @@ void EmitConstructors (in BindingContext context, TabbedWriter<StringWriter> cla
104104
// constructors with the same signature
105105
if (context.Changes.TypeInfo.IsNSCoding && constructor.Selector == initWithCoderSelector)
106106
continue;
107-
107+
108108
classBlock.AppendMemberAvailability (constructor.SymbolAvailability);
109109
classBlock.AppendGeneratedCodeAttribute (optimizable: true);
110110
if (constructor.ExportMethodData.Flags.HasFlag (Constructor.DesignatedInitializer)) {
@@ -303,11 +303,11 @@ public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out
303303
this.EmitDefaultNSObjectConstructors (className: bindingContext.Changes.Name,
304304
classBlock: classBlock,
305305
disableDefaultCtor: bindingData.Flags.HasFlag (ObjCBindings.Class.DisableDefaultCtor));
306-
306+
307307
// A class that inherits from NSCoding OR implements the INSCoding interface requires to create
308308
// the 'initWithCoder:' constructor
309309
if (bindingContext.Changes.TypeInfo.IsNSCoding) {
310-
EmitNSCondingConstructor (bindingContext, classBlock);
310+
EmitNSCondingConstructor (bindingContext, classBlock);
311311
}
312312

313313
// emit any other constructor that is not the default one

src/rgen/Microsoft.Macios.Generator/Emitters/Documentation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public static string DefaultInitWithHandle (string name) =>
138138

139139
public static string TrampolineStaticClass (string name) =>
140140
"/// <summary>This class bridges native block invocations that call into C#</summary>";
141-
141+
142142
public static string InitWithCoder (string name) =>
143143
@"/// <summary>A constructor that initializes the object from the data stored in the unarchiver object.</summary>
144144
/// <param name=""coder"">The unarchiver object.</param>

src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.Core.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,10 @@ internal static int GetValueTypeSize (this ITypeSymbol type, List<ITypeSymbol> f
429429
/// <param name="interfaces">All implemented interfaces by the type and its parents.</param>
430430
/// <param name="isNSObject">If the type inherits from NSObject.</param>
431431
public static void GetInheritance (
432-
this ITypeSymbol symbol,
433-
out bool isNSObject,
434-
out bool isNativeObject,
435-
out bool isDictionaryContainer,
432+
this ITypeSymbol symbol,
433+
out bool isNSObject,
434+
out bool isNativeObject,
435+
out bool isDictionaryContainer,
436436
out bool isView,
437437
out bool isNSCoding,
438438
out ImmutableArray<string> parents,

tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public class TestDataGenerator : BaseTestDataGenerator, IEnumerable<object []> {
123123
new (ApplePlatform.TVOS, "NSCodingSubclass", "NSCodingSubclass.cs", "ExpectedNSCodingSubclass.cs"),
124124
new (ApplePlatform.MacCatalyst, "NSCodingSubclass", "NSCodingSubclass.cs", "ExpectedNSCodingSubclass.cs"),
125125
new (ApplePlatform.MacOSX, "NSCodingSubclass", "macosNSCodingSubclass.cs", "macosExpectedNSCodingSubclass.cs"),
126-
126+
127127
new (ApplePlatform.iOS, "NSCodingSubclassWithConstructor", "NSCodingSubclassWithConstructor.cs", "ExpectedNSCodingSubclassWithConstructor.cs"),
128128
new (ApplePlatform.TVOS, "NSCodingSubclassWithConstructor", "NSCodingSubclassWithConstructor.cs", "ExpectedNSCodingSubclassWithConstructor.cs"),
129129
new (ApplePlatform.MacCatalyst, "NSCodingSubclassWithConstructor", "NSCodingSubclassWithConstructor.cs", "ExpectedNSCodingSubclassWithConstructor.cs"),

tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/NSCodingSubclassWithConstructor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace UIKit;
1818
[SupportedOSPlatform ("maccatalyst13.1")]
1919
[BindingType<Class>]
2020
public partial class NSCodingSubclassWithConstructor : NSCoding {
21-
21+
2222
// ensure that we do not have issues if it was already defined
2323
[Export<Constructor> ("initWithCoder:",
2424
Flags = Constructor.DesignatedInitializer)]

tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/macosNSCodingSubclassWithConstructor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace AppKit;
1818
[SupportedOSPlatform ("maccatalyst13.1")]
1919
[BindingType<Class>]
2020
public partial class NSCodingSubclassWithConstructor : NSCoding {
21-
21+
2222
// ensure that we do not have issues if it was already defined
2323
[Export<Constructor> ("initWithCoder:",
2424
Flags = Constructor.DesignatedInitializer)]

0 commit comments

Comments
 (0)