From 94795c50fba6e8e0628302d4a2f39ec75387ed8e Mon Sep 17 00:00:00 2001 From: James Frowen Date: Tue, 19 May 2020 14:07:57 +0100 Subject: [PATCH] Moving weaver comments (#1904) * Moving weaver comments * removing extra line --- Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs | 4 +++- .../Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs | 5 +++-- .../Editor/Weaver/Processors/MonoBehaviourProcessor.cs | 4 +++- .../Editor/Weaver/Processors/NetworkBehaviourProcessor.cs | 4 +++- Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs | 5 ++++- .../Weaver/Processors/ServerClientAttributeProcessor.cs | 5 +++-- .../Editor/Weaver/Processors/SyncDictionaryProcessor.cs | 4 +++- Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs | 4 +++- Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs | 4 +++- Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs | 4 +++- Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs | 4 +++- 11 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs index 23d9cda25..a2e97ed41 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/CommandProcessor.cs @@ -1,9 +1,11 @@ -// all the [Command] code from NetworkBehaviourProcessor in one place using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// Processes [Command] methods in NetworkBehaviour + /// public static class CommandProcessor { const string CmdPrefix = "InvokeCmd"; diff --git a/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs index 82ba84b17..ffd332436 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs @@ -1,11 +1,12 @@ -// this class generates OnSerialize/OnDeserialize when inheriting from MessageBase - using System.Linq; using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// generates OnSerialize/OnDeserialize when inheriting from MessageBase + /// static class MessageClassProcessor { diff --git a/Assets/Mirror/Editor/Weaver/Processors/MonoBehaviourProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/MonoBehaviourProcessor.cs index f78dd4d3b..fafa89ae6 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/MonoBehaviourProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/MonoBehaviourProcessor.cs @@ -1,8 +1,10 @@ -// this class only shows warnings in case we use SyncVars etc. for MonoBehaviour. using Mono.CecilX; namespace Mirror.Weaver { + /// + /// only shows warnings in case we use SyncVars etc. for MonoBehaviour. + /// static class MonoBehaviourProcessor { public static void Process(TypeDefinition td) diff --git a/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs index b0f0e2195..83fc67f59 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs @@ -1,10 +1,12 @@ -// this class processes SyncVars, Cmds, Rpcs, etc. of NetworkBehaviours using System.Collections.Generic; using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// processes SyncVars, Cmds, Rpcs, etc. of NetworkBehaviours + /// class NetworkBehaviourProcessor { readonly List syncVars = new List(); diff --git a/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs index 55eab4913..20e9c2825 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/RpcProcessor.cs @@ -1,8 +1,11 @@ -// all the [Rpc] code from NetworkBehaviourProcessor in one place using Mono.CecilX; using Mono.CecilX.Cil; + namespace Mirror.Weaver { + /// + /// Processes [Rpc] methods in NetworkBehaviour + /// public static class RpcProcessor { public const string RpcPrefix = "InvokeRpc"; diff --git a/Assets/Mirror/Editor/Weaver/Processors/ServerClientAttributeProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/ServerClientAttributeProcessor.cs index c79731af5..0600b04c9 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/ServerClientAttributeProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/ServerClientAttributeProcessor.cs @@ -1,10 +1,11 @@ -// this class processes SyncVars, Cmds, Rpcs, etc. of NetworkBehaviours - using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// processes SyncVars, Cmds, Rpcs, etc. of NetworkBehaviours + /// static class ServerClientAttributeProcessor { public static void ProcessMethodAttributes(TypeDefinition td, MethodDefinition md) diff --git a/Assets/Mirror/Editor/Weaver/Processors/SyncDictionaryProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/SyncDictionaryProcessor.cs index e8b224702..e5acd68d5 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/SyncDictionaryProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/SyncDictionaryProcessor.cs @@ -1,8 +1,10 @@ -// this class generates OnSerialize/OnDeserialize for SyncLists using Mono.CecilX; namespace Mirror.Weaver { + /// + /// generates OnSerialize/OnDeserialize for SyncLists + /// static class SyncDictionaryProcessor { /// diff --git a/Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs index ae2b1a2ee..27f6236be 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/SyncEventProcessor.cs @@ -1,10 +1,12 @@ -// all the SyncEvent code from NetworkBehaviourProcessor in one place using System.Collections.Generic; using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// Processes SyncEvents in NetworkBehaviour + /// public static class SyncEventProcessor { public static MethodDefinition ProcessEventInvoke(TypeDefinition td, EventDefinition ed) diff --git a/Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs index 096bb0a51..67af00e38 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/SyncListProcessor.cs @@ -1,8 +1,10 @@ -// this class generates OnSerialize/OnDeserialize for SyncLists using Mono.CecilX; namespace Mirror.Weaver { + /// + /// generates OnSerialize/OnDeserialize for SyncLists + /// static class SyncListProcessor { /// diff --git a/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs index 9901e0df7..237b4e3a9 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs @@ -1,10 +1,12 @@ -// all the [SyncVar] code from NetworkBehaviourProcessor in one place using System.Collections.Generic; using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// Processes [SyncVar] in NetworkBehaviour + /// public static class SyncVarProcessor { // ulong = 64 bytes diff --git a/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs index c5d1d2138..0da030756 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/TargetRpcProcessor.cs @@ -1,9 +1,11 @@ -// all the [TargetRpc] code from NetworkBehaviourProcessor in one place using Mono.CecilX; using Mono.CecilX.Cil; namespace Mirror.Weaver { + /// + /// Processes [TargetRpc] methods in NetworkBehaviour + /// public static class TargetRpcProcessor { const string TargetRpcPrefix = "InvokeTargetRpc";