1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Fix C# style with dotnet format

This commit is contained in:
Raul Santos
2022-08-27 03:22:23 +02:00
parent 390333e822
commit d35c58507c
12 changed files with 158 additions and 139 deletions

View File

@@ -94,16 +94,20 @@ namespace Godot.SourceGenerators.Sample
[Export] private NodePath field_NodePath = new NodePath("foo"); [Export] private NodePath field_NodePath = new NodePath("foo");
[Export] private RID field_RID; [Export] private RID field_RID;
[Export] private Godot.Collections.Dictionary field_GodotDictionary = [Export]
private Godot.Collections.Dictionary field_GodotDictionary =
new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } }; new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
[Export] private Godot.Collections.Array field_GodotArray = [Export]
private Godot.Collections.Array field_GodotArray =
new() { "foo", 10, Vector2.Up, Colors.Chocolate }; new() { "foo", 10, Vector2.Up, Colors.Chocolate };
[Export] private Godot.Collections.Dictionary<string, bool> field_GodotGenericDictionary = [Export]
private Godot.Collections.Dictionary<string, bool> field_GodotGenericDictionary =
new() { { "foo", true }, { "bar", false } }; new() { { "foo", true }, { "bar", false } };
[Export] private Godot.Collections.Array<int> field_GodotGenericArray = [Export]
private Godot.Collections.Array<int> field_GodotGenericArray =
new() { 0, 1, 2, 3, 4, 5, 6 }; new() { 0, 1, 2, 3, 4, 5, 6 };
} }
} }

View File

@@ -94,16 +94,20 @@ namespace Godot.SourceGenerators.Sample
[Export] private NodePath property_NodePath { get; set; } = new NodePath("foo"); [Export] private NodePath property_NodePath { get; set; } = new NodePath("foo");
[Export] private RID property_RID { get; set; } [Export] private RID property_RID { get; set; }
[Export] private Godot.Collections.Dictionary property_GodotDictionary { get; set; } = [Export]
private Godot.Collections.Dictionary property_GodotDictionary { get; set; } =
new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } }; new() { { "foo", 10 }, { Vector2.Up, Colors.Chocolate } };
[Export] private Godot.Collections.Array property_GodotArray { get; set; } = [Export]
private Godot.Collections.Array property_GodotArray { get; set; } =
new() { "foo", 10, Vector2.Up, Colors.Chocolate }; new() { "foo", 10, Vector2.Up, Colors.Chocolate };
[Export] private Godot.Collections.Dictionary<string, bool> property_GodotGenericDictionary { get; set; } = [Export]
private Godot.Collections.Dictionary<string, bool> property_GodotGenericDictionary { get; set; } =
new() { { "foo", true }, { "bar", false } }; new() { { "foo", true }, { "bar", false } };
[Export] private Godot.Collections.Array<int> property_GodotGenericArray { get; set; } = [Export]
private Godot.Collections.Array<int> property_GodotGenericArray { get; set; } =
new() { 0, 1, 2, 3, 4, 5, 6 }; new() { 0, 1, 2, 3, 4, 5, 6 };
} }
} }

View File

@@ -123,12 +123,16 @@ namespace GodotTools.IdeMessaging
string projectMetadataDir = Path.Combine(godotProjectDir, ".godot", "mono", "metadata"); string projectMetadataDir = Path.Combine(godotProjectDir, ".godot", "mono", "metadata");
// FileSystemWatcher requires an existing directory // FileSystemWatcher requires an existing directory
if (!Directory.Exists(projectMetadataDir)) { if (!Directory.Exists(projectMetadataDir))
{
// Check if the non hidden version exists // Check if the non hidden version exists
string nonHiddenProjectMetadataDir = Path.Combine(godotProjectDir, "godot", "mono", "metadata"); string nonHiddenProjectMetadataDir = Path.Combine(godotProjectDir, "godot", "mono", "metadata");
if (Directory.Exists(nonHiddenProjectMetadataDir)) { if (Directory.Exists(nonHiddenProjectMetadataDir))
{
projectMetadataDir = nonHiddenProjectMetadataDir; projectMetadataDir = nonHiddenProjectMetadataDir;
} else { }
else
{
Directory.CreateDirectory(projectMetadataDir); Directory.CreateDirectory(projectMetadataDir);
} }
} }

View File

@@ -249,8 +249,8 @@ namespace GodotTools.OpenVisualStudio
// Thread call was rejected, so try again. // Thread call was rejected, so try again.
int IOleMessageFilter.RetryRejectedCall(IntPtr hTaskCallee, int dwTickCount, int dwRejectType) int IOleMessageFilter.RetryRejectedCall(IntPtr hTaskCallee, int dwTickCount, int dwRejectType)
{ {
if (dwRejectType == 2)
// flag = SERVERCALL_RETRYLATER // flag = SERVERCALL_RETRYLATER
if (dwRejectType == 2)
{ {
// Retry the thread call immediately if return >= 0 & < 100 // Retry the thread call immediately if return >= 0 & < 100
return 99; return 99;

View File

@@ -76,13 +76,20 @@ namespace GodotTools.Export
else else
{ {
string arch = ""; string arch = "";
if (features.Contains("x86_64")) { if (features.Contains("x86_64"))
{
arch = "x86_64"; arch = "x86_64";
} else if (features.Contains("x86_32")) { }
else if (features.Contains("x86_32"))
{
arch = "x86_32"; arch = "x86_32";
} else if (features.Contains("arm64")) { }
else if (features.Contains("arm64"))
{
arch = "arm64"; arch = "arm64";
} else if (features.Contains("arm32")) { }
else if (features.Contains("arm32"))
{
arch = "arm32"; arch = "arm32";
} }
CompileAssembliesForDesktop(exporter, platform, isDebug, arch, aotOpts, aotTempDir, outputDataDir, assembliesPrepared, bclDir); CompileAssembliesForDesktop(exporter, platform, isDebug, arch, aotOpts, aotTempDir, outputDataDir, assembliesPrepared, bclDir);