public void Send(FieldData data) { lock (_lockObject) { _currentState.Send(data); } }
private void HandleResponse(FieldData data, INatterConnection connection) { if (data.ContainsKey(DataField)) { _count++; _lastResult = int.Parse(data.GetStringValue(DataField)); Console.WriteLine("Last number was: {0}", _lastResult); if (_lastResult == EndNumber) { connection.Close(); } else { Send(connection, _lastResult + 1); } } }
public void Send(FieldData data) { throw new Exception("Cannot send. Please connect."); }
private void Send(INatterConnection connection, int num) { var data = new FieldData(); data.Add(DataField, num.ToString()); connection.Send(data); }
private void OnData(INatterConnection connection, FieldData data) { if (_onData != null) { _onData(connection, data); } }
public void Send(FieldData data) { _actions.SendData(data); }
public void SendData(FieldData data) { try { var message = MessageType.CreateDataMessage(ConnectionIdRaw, CreateNewId(), data.GetFields()); SendMessage(message); } catch (Exception ex) { OnError(ex); } }
public void Send(FieldData data) { _stateManager.Send(data); }
public void OnData(FieldData data) { if (_onData != null) { var onData = new Task(() => _onData(this, data)); onData.Start(); } }