From 514856d8c79bee4a35c61aa08213fd774c7a7ee9 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Thu, 23 Aug 2018 12:49:57 -0400 Subject: [PATCH] [Mono] Move several small related files --- .../cs_files/Attributes/ExportAttribute.cs | 17 +++++++++++++++++ .../{ => Attributes}/GodotMethodAttribute.cs | 0 .../cs_files/{ => Attributes}/RPCAttributes.cs | 0 .../{ => Attributes}/SignalAttribute.cs | 0 .../glue/cs_files/Attributes/ToolAttribute.cs | 7 +++++++ modules/mono/glue/cs_files/ExportAttribute.cs | 17 ----------------- .../{ => Extensions}/NodeExtensions.cs | 0 .../{ => Extensions}/ObjectExtensions.cs | 0 .../ResourceLoaderExtensions.cs | 0 modules/mono/glue/cs_files/IAwaiter.cs | 18 ------------------ .../cs_files/{ => Interfaces}/IAwaitable.cs | 0 .../mono/glue/cs_files/Interfaces/IAwaiter.cs | 18 ++++++++++++++++++ modules/mono/glue/cs_files/StringExtensions.cs | 14 ++++++-------- modules/mono/glue/cs_files/ToolAttribute.cs | 7 ------- 14 files changed, 48 insertions(+), 50 deletions(-) create mode 100644 modules/mono/glue/cs_files/Attributes/ExportAttribute.cs rename modules/mono/glue/cs_files/{ => Attributes}/GodotMethodAttribute.cs (100%) rename modules/mono/glue/cs_files/{ => Attributes}/RPCAttributes.cs (100%) rename modules/mono/glue/cs_files/{ => Attributes}/SignalAttribute.cs (100%) create mode 100644 modules/mono/glue/cs_files/Attributes/ToolAttribute.cs delete mode 100644 modules/mono/glue/cs_files/ExportAttribute.cs rename modules/mono/glue/cs_files/{ => Extensions}/NodeExtensions.cs (100%) rename modules/mono/glue/cs_files/{ => Extensions}/ObjectExtensions.cs (100%) rename modules/mono/glue/cs_files/{ => Extensions}/ResourceLoaderExtensions.cs (100%) delete mode 100644 modules/mono/glue/cs_files/IAwaiter.cs rename modules/mono/glue/cs_files/{ => Interfaces}/IAwaitable.cs (100%) create mode 100644 modules/mono/glue/cs_files/Interfaces/IAwaiter.cs delete mode 100644 modules/mono/glue/cs_files/ToolAttribute.cs diff --git a/modules/mono/glue/cs_files/Attributes/ExportAttribute.cs b/modules/mono/glue/cs_files/Attributes/ExportAttribute.cs new file mode 100644 index 00000000000..6adf0448863 --- /dev/null +++ b/modules/mono/glue/cs_files/Attributes/ExportAttribute.cs @@ -0,0 +1,17 @@ +using System; + +namespace Godot +{ + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAttribute : Attribute + { + private PropertyHint hint; + private string hintString; + + public ExportAttribute(PropertyHint hint = PropertyHint.None, string hintString = "") + { + this.hint = hint; + this.hintString = hintString; + } + } +} diff --git a/modules/mono/glue/cs_files/GodotMethodAttribute.cs b/modules/mono/glue/cs_files/Attributes/GodotMethodAttribute.cs similarity index 100% rename from modules/mono/glue/cs_files/GodotMethodAttribute.cs rename to modules/mono/glue/cs_files/Attributes/GodotMethodAttribute.cs diff --git a/modules/mono/glue/cs_files/RPCAttributes.cs b/modules/mono/glue/cs_files/Attributes/RPCAttributes.cs similarity index 100% rename from modules/mono/glue/cs_files/RPCAttributes.cs rename to modules/mono/glue/cs_files/Attributes/RPCAttributes.cs diff --git a/modules/mono/glue/cs_files/SignalAttribute.cs b/modules/mono/glue/cs_files/Attributes/SignalAttribute.cs similarity index 100% rename from modules/mono/glue/cs_files/SignalAttribute.cs rename to modules/mono/glue/cs_files/Attributes/SignalAttribute.cs diff --git a/modules/mono/glue/cs_files/Attributes/ToolAttribute.cs b/modules/mono/glue/cs_files/Attributes/ToolAttribute.cs new file mode 100644 index 00000000000..d0437409afb --- /dev/null +++ b/modules/mono/glue/cs_files/Attributes/ToolAttribute.cs @@ -0,0 +1,7 @@ +using System; + +namespace Godot +{ + [AttributeUsage(AttributeTargets.Class)] + public class ToolAttribute : Attribute {} +} diff --git a/modules/mono/glue/cs_files/ExportAttribute.cs b/modules/mono/glue/cs_files/ExportAttribute.cs deleted file mode 100644 index e6f569e1bba..00000000000 --- a/modules/mono/glue/cs_files/ExportAttribute.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Godot -{ - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] - public class ExportAttribute : Attribute - { - private PropertyHint hint; - private string hintString; - - public ExportAttribute(PropertyHint hint = PropertyHint.None, string hintString = "") - { - this.hint = hint; - this.hintString = hintString; - } - } -} diff --git a/modules/mono/glue/cs_files/NodeExtensions.cs b/modules/mono/glue/cs_files/Extensions/NodeExtensions.cs similarity index 100% rename from modules/mono/glue/cs_files/NodeExtensions.cs rename to modules/mono/glue/cs_files/Extensions/NodeExtensions.cs diff --git a/modules/mono/glue/cs_files/ObjectExtensions.cs b/modules/mono/glue/cs_files/Extensions/ObjectExtensions.cs similarity index 100% rename from modules/mono/glue/cs_files/ObjectExtensions.cs rename to modules/mono/glue/cs_files/Extensions/ObjectExtensions.cs diff --git a/modules/mono/glue/cs_files/ResourceLoaderExtensions.cs b/modules/mono/glue/cs_files/Extensions/ResourceLoaderExtensions.cs similarity index 100% rename from modules/mono/glue/cs_files/ResourceLoaderExtensions.cs rename to modules/mono/glue/cs_files/Extensions/ResourceLoaderExtensions.cs diff --git a/modules/mono/glue/cs_files/IAwaiter.cs b/modules/mono/glue/cs_files/IAwaiter.cs deleted file mode 100644 index b5aa1a5389d..00000000000 --- a/modules/mono/glue/cs_files/IAwaiter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Runtime.CompilerServices; - -namespace Godot -{ - public interface IAwaiter : INotifyCompletion - { - bool IsCompleted { get; } - - void GetResult(); - } - - public interface IAwaiter : INotifyCompletion - { - bool IsCompleted { get; } - - TResult GetResult(); - } -} diff --git a/modules/mono/glue/cs_files/IAwaitable.cs b/modules/mono/glue/cs_files/Interfaces/IAwaitable.cs similarity index 100% rename from modules/mono/glue/cs_files/IAwaitable.cs rename to modules/mono/glue/cs_files/Interfaces/IAwaitable.cs diff --git a/modules/mono/glue/cs_files/Interfaces/IAwaiter.cs b/modules/mono/glue/cs_files/Interfaces/IAwaiter.cs new file mode 100644 index 00000000000..d3be9d781ca --- /dev/null +++ b/modules/mono/glue/cs_files/Interfaces/IAwaiter.cs @@ -0,0 +1,18 @@ +using System.Runtime.CompilerServices; + +namespace Godot +{ + public interface IAwaiter : INotifyCompletion + { + bool IsCompleted { get; } + + void GetResult(); + } + + public interface IAwaiter : INotifyCompletion + { + bool IsCompleted { get; } + + TResult GetResult(); + } +} diff --git a/modules/mono/glue/cs_files/StringExtensions.cs b/modules/mono/glue/cs_files/StringExtensions.cs index eaeed7b37bd..b58f8bc6a8f 100644 --- a/modules/mono/glue/cs_files/StringExtensions.cs +++ b/modules/mono/glue/cs_files/StringExtensions.cs @@ -1,5 +1,3 @@ -//using System; - using System; using System.Collections.Generic; using System.Globalization; @@ -583,7 +581,7 @@ namespace Godot // public static byte[] Md5Buffer(this string instance) { - return NativeCalls.godot_icall_String_md5_buffer(instance); + return NativeCalls.godot_icall_String_md5_buffer(instance); } // @@ -591,7 +589,7 @@ namespace Godot // public static string Md5Text(this string instance) { - return NativeCalls.godot_icall_String_md5_text(instance); + return NativeCalls.godot_icall_String_md5_text(instance); } // @@ -750,7 +748,7 @@ namespace Godot // public static int Rfind(this string instance, string what, int from = -1) { - return NativeCalls.godot_icall_String_rfind(instance, what, from); + return NativeCalls.godot_icall_String_rfind(instance, what, from); } // @@ -758,7 +756,7 @@ namespace Godot // public static int Rfindn(this string instance, string what, int from = -1) { - return NativeCalls.godot_icall_String_rfindn(instance, what, from); + return NativeCalls.godot_icall_String_rfindn(instance, what, from); } // @@ -777,7 +775,7 @@ namespace Godot public static byte[] Sha256Buffer(this string instance) { - return NativeCalls.godot_icall_String_sha256_buffer(instance); + return NativeCalls.godot_icall_String_sha256_buffer(instance); } // @@ -785,7 +783,7 @@ namespace Godot // public static string Sha256Text(this string instance) { - return NativeCalls.godot_icall_String_sha256_text(instance); + return NativeCalls.godot_icall_String_sha256_text(instance); } // diff --git a/modules/mono/glue/cs_files/ToolAttribute.cs b/modules/mono/glue/cs_files/ToolAttribute.cs deleted file mode 100644 index d8601b5b327..00000000000 --- a/modules/mono/glue/cs_files/ToolAttribute.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; - -namespace Godot -{ - [AttributeUsage(AttributeTargets.Class)] - public class ToolAttribute : Attribute {} -}