mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Weaver - first switch (#224)
This commit is contained in:
parent
4fee160b6c
commit
c8a0ddb6d3
@ -909,21 +909,20 @@ static void ProcessSiteMethod(ModuleDefinition moduleDef, TypeDefinition td, Met
|
|||||||
{
|
{
|
||||||
foreach (CustomAttribute attr in md.CustomAttributes)
|
foreach (CustomAttribute attr in md.CustomAttributes)
|
||||||
{
|
{
|
||||||
if (attr.Constructor.DeclaringType.ToString() == "Mirror.ServerAttribute")
|
switch (attr.Constructor.DeclaringType.ToString())
|
||||||
{
|
{
|
||||||
|
case "Mirror.ServerAttribute":
|
||||||
InjectServerGuard(moduleDef, td, md, true);
|
InjectServerGuard(moduleDef, td, md, true);
|
||||||
}
|
break;
|
||||||
else if (attr.Constructor.DeclaringType.ToString() == "Mirror.ServerCallbackAttribute")
|
case "Mirror.ServerCallbackAttribute":
|
||||||
{
|
|
||||||
InjectServerGuard(moduleDef, td, md, false);
|
InjectServerGuard(moduleDef, td, md, false);
|
||||||
}
|
break;
|
||||||
else if (attr.Constructor.DeclaringType.ToString() == "Mirror.ClientAttribute")
|
case "Mirror.ClientAttribute":
|
||||||
{
|
|
||||||
InjectClientGuard(moduleDef, td, md, true);
|
InjectClientGuard(moduleDef, td, md, true);
|
||||||
}
|
break;
|
||||||
else if (attr.Constructor.DeclaringType.ToString() == "Mirror.ClientCallbackAttribute")
|
case "Mirror.ClientCallbackAttribute":
|
||||||
{
|
|
||||||
InjectClientGuard(moduleDef, td, md, false);
|
InjectClientGuard(moduleDef, td, md, false);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user