public TreadmillService(ITreadmillAdapter adapter, IUdpService metrics, ILogService log) { _adapter = adapter; _metrics = metrics; _log = log; Task.Run(() => metrics.Serve(HandleMetricsChanged)); }
public ComandosViewModel() { udpService = new UdpService(); Title = "Comando"; Comandos = new ObservableCollection <Comando>(); LoadItemsCommand = new Command(async() => await ExecuteLoadItemsCommand()); }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="messageBufferSize"></param> /// <param name="_protocolHandler"></param> /// <param name="service"></param> /// <exception cref="ArgumentNullException">protocol is null.</exception> /// <exception cref="ArgumentNullException">service is null.</exception> public UdpServer(int port, int messageBufferSize, IUdpProtocolHandler <TMessage> _protocolHandler, IUdpService <TMessage> service) { this._port = port; this._messageBufferSize = messageBufferSize; this._protocolHandler = _protocolHandler ?? throw new ArgumentNullException("protocol"); this._service = service ?? throw new ArgumentNullException("service"); }
public ComandoDetail(ComandoDetailViewModel viewModel) { InitializeComponent(); udpService = new UdpService(); tcpService = new TcpService(); BindingContext = this.viewModel = viewModel; }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="messageBufferSize"></param> /// <param name="protocol"></param> /// <param name="service"></param> /// <exception cref="ArgumentNullException">protocol is null.</exception> /// <exception cref="ArgumentNullException">service is null.</exception> public UdpServer(int port, int messageBufferSize, Protocol.IUdpProtocol<TMessage> protocol, IUdpService<TMessage> service) { if (protocol == null) throw new ArgumentNullException("protocol"); if (service == null) throw new ArgumentNullException("service"); this._port = port; this._messageBufferSize = messageBufferSize; this._protocol = protocol; this._service = service; }
public NovoComando() { InitializeComponent(); udpService = new UdpService(); tcpService = new TcpService(); Comando = new Comando { Send = "@ALTERNAR#", Port = 9999, IP = "192.168.1.250" }; BindingContext = this; }
public ComandoDetail() { InitializeComponent(); Comando = new Comando { Send = "@ALTERNAR", Receive = "Tem alguem ai?" }; udpService = new UdpService(); tcpService = new TcpService(); viewModel = new ComandoDetailViewModel(Comando); BindingContext = viewModel; }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="messageBufferSize"></param> /// <param name="receiveThreads"></param> /// <param name="protocol"></param> /// <param name="service"></param> /// <exception cref="ArgumentOutOfRangeException"></exception> /// <exception cref="ArgumentNullException">protocol is null.</exception> /// <exception cref="ArgumentNullException">service is null.</exception> public UdpServer(int port, int messageBufferSize, int receiveThreads, Protocol.IUdpProtocol <TCommandInfo> protocol, IUdpService <TCommandInfo> service) { if (receiveThreads < 1) { throw new ArgumentOutOfRangeException("receiveThreads"); } if (protocol == null) { throw new ArgumentNullException("protocol"); } if (service == null) { throw new ArgumentNullException("service"); } this._port = port; this._messageBufferSize = messageBufferSize; this._receiveThreads = receiveThreads; this._protocol = protocol; this._service = service; }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="protocol"></param> /// <param name="service"></param> public UdpServer(int port, Protocol.IUdpProtocol <TCommandInfo> protocol, IUdpService <TCommandInfo> service) : this(port, 2048, 1, protocol, service) { }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="_protocolHandler"></param> /// <param name="service"></param> public UdpServer(int port, IUdpProtocolHandler <TMessage> _protocolHandler, IUdpService <TMessage> service) : this(port, 2048, _protocolHandler, service) { }
/// <summary> /// new /// </summary> /// <param name="port"></param> /// <param name="protocol"></param> /// <param name="service"></param> public UdpServer(int port, Protocol.IUdpProtocol <TMessage> protocol, IUdpService <TMessage> service) : this(port, 2048, protocol, service) { }