mirror of
https://github.com/StarBeat/JsonRpc.git
synced 2026-03-08 03:55:29 +08:00
18 lines
838 B
C#
18 lines
838 B
C#
|
|
// See https://aka.ms/new-console-template for more information
|
|||
|
|
using CodeGenerator;
|
|||
|
|
using JsonRPC.Protocol;
|
|||
|
|
Console.WriteLine("Hello, World!");
|
|||
|
|
|
|||
|
|
JsonRPCCodeGenerator jsonRPCCodeGenerator = new JsonRPCCodeGenerator((s) => Console.WriteLine(s));
|
|||
|
|
jsonRPCCodeGenerator.LoadAssembly("G:\\Misc\\JsonRPC\\TestInterceptor\\bin\\Debug\\net8.0\\TestInterceptor.dll");
|
|||
|
|
jsonRPCCodeGenerator.ProcessAssembly();
|
|||
|
|
jsonRPCCodeGenerator.WriteModule();
|
|||
|
|
JsonRPC.RPC.Sender.Instance.SetSendFunction((s) =>
|
|||
|
|
{
|
|||
|
|
Console.WriteLine(s);
|
|||
|
|
return JsonRPC.RPC.Receiver.Instance.OnReceive(s);
|
|||
|
|
});
|
|||
|
|
TestInterceptor.Class1.Echo("ss");
|
|||
|
|
Console.WriteLine(TestInterceptor.Class1.Test1());
|
|||
|
|
//typeof(TestInterceptor.Class1).GetMethod("TestInterceptor_Class1__Test_", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public)?.Invoke(null, null);
|