private void Stop(StopMessage obj) { //signal stop externalError = new ApplicationException("Stop processing invoked by the service"); forceExceptionalStop = true; //cleanup disposable resources }
public void Update() { //Thread.Sleep(1); StopMessage message = new StopMessage(); c++; system.Tick(); if (c % 10 == 0) //send stop message every 10 updates system.Send(message); }
static void StopMessageSample() { var widget = new StopMessage("txt") { Text = "-- Press to Continue --" }; Player.Mount(widget); Console.WriteLine("--END--"); }
public void Update() { //Thread.Sleep(1); StopMessage message = new StopMessage(); c++; system.Tick(); if (c % 10 == 0) //send stop message every 10 updates { system.Send(message); } }
public void Stop(StopMessage msg) { //cleanup disposable resources if (timerRefreshFromWebApi != null) { timerRefreshFromWebApi.Stop(); timerRefreshFromWebApi.Dispose(); } if (hangfireServer != null) { hangfireServer.SendStop(); hangfireServer.Dispose(); } logger.Trace("LanCopyController Stopped"); }
private void DoStop(StopMessage obj) { //cleanup disposable resources if (timerRetryPingSignalR != null) { timerRetryPingSignalR.Stop(); timerRetryPingSignalR.Dispose(); } if (connSignalR != null) { connSignalR.Stop(); connSignalR.Dispose(); } logger.Trace("SignalRController Stopped"); }
public void StopMessageTest() { var canvas = new Canvas(20, 10, '#'); var graphics = new Graphics(canvas); var widget = new StopMessage("demo"); widget.Text = "Hello World"; widget.Draw(graphics); widget.TextAlign = Align.Center; widget.Draw(graphics); widget.TextAlign = Align.Right; widget.Draw(graphics); Assert.Equal("Hello World#########", canvas.Map[0]); Assert.Equal("#####Hello World####", canvas.Map[1]); Assert.Equal("#########Hello World", canvas.Map[2]); Assert.Equal(3, canvas.Rows); }
public static Message ParseMessage(string message) { Message returnMessage; try { JObject o = JObject.Parse(message); var type = (string)o["Type"]; if (type.Equals("Control")) { returnMessage = new ControlMessage(o); } else if (type.Equals("Start")) { returnMessage = new StartMessage(o); } else if (type.Equals("Stop")) { returnMessage = new StopMessage(o); } else if (type.Equals("Blink")) { returnMessage = new BlinkMessage(o); } else { returnMessage = new Message(null); } } catch (Exception e) { returnMessage = new Message(null); } return returnMessage; }
public async Task StopAsync(ISender sender, params Application[] applications) { IEnumerable <Application> apps = applications; if (apps?.Any() != true) { var status = await CheckStatusAsync(sender); apps = status.Applications; if (apps?.Any() != true) { return; } } foreach (var application in apps) { var msg = new StopMessage { SessionId = application.SessionId }; var response = await sender.SendAsync <ReceiverStatusMessage>(Namespace, msg, DestinationId); await OnMessageReceivedAsync(sender, response); } IsConnected = false; }
public void Handle(StopMessage message) { }
public override void Handle(StopMessage message) { base.Handle(new StopMessage()); _inputHoritzontal = 0; _inputVertical = 0; vector = Vector2.zero; }
public void Handle(StopMessage message) { StopPlaybackAction(); }
public void Stop(StopMessage m) { this.Controller.Stop(); }
public void OnStopMessage(StopMessage stopMessage) { pilotApi.SetPower(0); }
public override void Handle(StopMessage message) { }
private void Stop(StopMessage obj) { //TODO - implement cancelation }