//Открыть периодический поток public PeriodicThread OpenPeriodicThread(int id, string name, double periodMinutes, double lateMainutes = 0) { var t = new PeriodicThread(this, id, name, new AppIndicator(), periodMinutes, lateMainutes); Threads.Add(id, t, true); return(t); }
public void StartInvalidArgumentTest() { var t = new PeriodicThread(); Assert.Throws <ArgumentNullException>(() => t.Start(null, () => 0, false)); Assert.Throws <ArgumentNullException>(() => t.Start(() => { }, null, false)); }
private ResponseType HandleResponse(PeriodicThread requester = null) { var command = (ResponseType)this.c.ReceiveByte(); switch (command) { case ResponseType.FramebufferUpdate: requester?.Signal(); if (!this.HandleFramebufferUpdate()) { command = ResponseType.DesktopSize; } break; case ResponseType.SetColorMapEntries: this.HandleSetColorMapEntries(); break; case ResponseType.Bell: this.HandleBell(); break; case ResponseType.ReceiveClipboardData: this.HandleReceiveClipboardData(); break; default: VncStream.Require( false, "Unsupported command.", VncFailureReason.UnrecognizedProtocolElement); break; } return(command); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PeriodicThread obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }