You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on HasReturnValue, to return a value to injection Target.
Currently seems stable, still needs some refactoring and improvements.
Preview:
Injected
[HookAttribute.Hook("Injected.Method3")]
[HasReturnValue]
public static bool InjectedMethod_M(Injected instance)
{
return true;
}
InjectionTarget
public bool Method3()
{
Console.WriteLine("Magic v3");
return true;
}
After injected
https://i.imgur.com/sZ7mpAT.png
ConsoleHelper.WriteError($"Return types of {hook.Method.Name} and {hookAttribute.TargetData.methodDefinition.Name} do not match. They need to match to add the [HasReturnValue] attribute.");
ConsoleHelper.WriteMessage(ConsoleHelper.MessageType.Warning,$"No hook attributes were found. Without hook attributes it cannot inject anything. ({Timer.GetElapsedMs}ms)\r\n");
20
+
ConsoleHelper.WriteMessage(ConsoleHelper.MessageType.Warning,$"No hook attributes were found. Without hook attributes it cannot inject anything. ({Timer.GetElapsedMs}ms)");
ConsoleHelper.WriteError($"Return types of {hook.Method.Name} and {hook.TargetData.methodDefinition.Name} do not match. They need to match to add the [HasReturnValue] attribute.");
0 commit comments