private void CreateChannel() { var channel = new Channel(OnMessageReceived, OnChannelConnected, OnChannelDisconnected); mChannel = channel; mPayloadStore = new PayloadStore(); mTypeInfoStore = new TypeInfoStore(typeToNotify => SendEvent(channel, new EventMessage { Type = typeToNotify })); mValueRenderer = new ValueRenderer(mPayloadStore, mTypeInfoStore); mChannel.Start(); mStore.SinkEvents(new StoreEventSink(mChannel, mValueRenderer)); }
private void OnChannelDisconnected() { mConnectedEvent.Reset(); mStore.StopMonitoringAll(); mChannel?.Dispose(); mChannel = null; mValueRenderer = null; mPayloadStore = null; mFirstUnsentInstrumentationIndex = 0; CreateChannel(); }
public ValueRenderer(PayloadStore store, TypeInfoStore typeInfoStore) { mStore = store; mTypeInfoStore = typeInfoStore; }