Exemple #1
0
        public ServerScript()
        {
            LogHelper.LogAction = Debug.WriteLine;

            _remoteCallService = new RemoteCallService(EventHandlers, new []
            {
                new ExampleServerRemote()
            });

            _remoteCallService.Start();

            CallClient();
        }
Exemple #2
0
        public async void OnResourceStart(string resourceName)
        {
            if (API.GetCurrentResourceName() != resourceName)
            {
                return;
            }

            LogHelper.LogAction = Debug.WriteLine;

            _remoteCallService = new RemoteCallService(EventHandlers, new [] { new ExampleClientRemote() });
            _remoteCallService.Start();


            //await remoteCallService.CallRemoteMethod<IExampleServerRemote>(r => r.StringParameter("test param"));

            API.RegisterCommand("getTime", new Action(GetTimeCommand), false);
        }