public override async Task RunAsync(string[] args) { string pluginPath = string.Format("msbuild/plugin/{0}/Plugin.dll", Path.GetFileName(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))); await using Communicator communicator = Initialize( ref args, new Dictionary <string, string>() { { "Ice.Plugin.DispatchPlugin", $"{pluginPath}:ZeroC.Ice.Test.Interceptor.DispatchPluginFactory" } }); await communicator.ActivateAsync(); communicator.SetProperty("TestAdapter.Endpoints", GetTestEndpoint(0)); ObjectAdapter adapter = communicator.CreateObjectAdapter("TestAdapter"); adapter.Add("test", new MyObject()); await DispatchInterceptors.ActivateAsync(adapter); ServerReady(); await communicator.WaitForShutdownAsync(); }
public override async Task RunAsync(string[] args) { await Communicator.ActivateAsync(); Communicator.SetProperty("TestAdapter.Endpoints", GetTestEndpoint(0)); ObjectAdapter adapter = Communicator.CreateObjectAdapter("TestAdapter"); adapter.Add("test", new AsyncMyObject()); await DispatchInterceptors.ActivateAsync(adapter); ServerReady(); await Communicator.ShutdownComplete; }