From f0ffb693e55ba8b04d92b9948b1891b2c0c5890d Mon Sep 17 00:00:00 2001 From: Mayuki Sawatari Date: Mon, 30 Oct 2023 10:09:24 +0900 Subject: [PATCH] Revert "Merge pull request #701 from Cysharp/feature/RemoveGenerateAttribute" This reverts commit 55ea92f9ac734fc3d86c8d0a6a01cd7aaeea888f, reversing changes made to 0620a27399d8297ce5758c2b3d48703ea8a0c375. --- .../GenerateDefineDebugAttribute.cs | 20 +++++++++++++++++++ .../GenerateIfDirectiveAttribute.cs | 16 +++++++++++++++ .../GenerateDefineDebugAttribute.cs | 20 +++++++++++++++++++ .../GenerateDefineDebugAttribute.cs.meta | 11 ++++++++++ .../GenerateIfDirectiveAttribute.cs | 16 +++++++++++++++ .../GenerateIfDirectiveAttribute.cs.meta | 11 ++++++++++ 6 files changed, 94 insertions(+) create mode 100644 src/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs create mode 100644 src/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs create mode 100644 src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs create mode 100644 src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs.meta create mode 100644 src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs create mode 100644 src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs.meta diff --git a/src/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs b/src/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs new file mode 100644 index 000000000..1965ea622 --- /dev/null +++ b/src/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MagicOnion +{ + /// + /// instruction for moc.exe, surround #if symbol with output code. + /// + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + [Obsolete("GenerateDefineDebug is no longer used from the generator. Use C# '#if' directive instead.")] + public class GenerateDefineDebugAttribute : Attribute + { + public GenerateDefineDebugAttribute() + { + } + } +} diff --git a/src/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs b/src/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs new file mode 100644 index 000000000..fd50cd6fa --- /dev/null +++ b/src/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs @@ -0,0 +1,16 @@ +using System; + +namespace MagicOnion +{ + /// + /// instruction for moc.exe, surround #if symbol with output code. + /// + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + [Obsolete("GenerateIfDirective is no longer used from the generator. Use C# '#if' directive instead.")] + public class GenerateIfDirectiveAttribute : Attribute + { + public GenerateIfDirectiveAttribute(string condition) + { + } + } +} diff --git a/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs new file mode 100644 index 000000000..1965ea622 --- /dev/null +++ b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MagicOnion +{ + /// + /// instruction for moc.exe, surround #if symbol with output code. + /// + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + [Obsolete("GenerateDefineDebug is no longer used from the generator. Use C# '#if' directive instead.")] + public class GenerateDefineDebugAttribute : Attribute + { + public GenerateDefineDebugAttribute() + { + } + } +} diff --git a/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs.meta b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs.meta new file mode 100644 index 000000000..0b318ca66 --- /dev/null +++ b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateDefineDebugAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ab20e13a7e0b6b644a42dbfa3b44afd3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs new file mode 100644 index 000000000..fd50cd6fa --- /dev/null +++ b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs @@ -0,0 +1,16 @@ +using System; + +namespace MagicOnion +{ + /// + /// instruction for moc.exe, surround #if symbol with output code. + /// + [AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)] + [Obsolete("GenerateIfDirective is no longer used from the generator. Use C# '#if' directive instead.")] + public class GenerateIfDirectiveAttribute : Attribute + { + public GenerateIfDirectiveAttribute(string condition) + { + } + } +} diff --git a/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs.meta b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs.meta new file mode 100644 index 000000000..2a03e8acc --- /dev/null +++ b/src/MagicOnion.Client.Unity/Assets/Scripts/MagicOnion/MagicOnion.Abstractions/GenerateIfDirectiveAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a80af65ead286f340a4ddae861c5370f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: