public void ResetSdkClient(AtemSdkClientWrapper client, bool dispose) { if (!dispose) { lock (_updatingClients) _updatingClients.Add(client); void TmpHandler(object o) { client.OnSdkStateChange -= TmpHandler; lock (_updatingClients) _updatingClients.Remove(client); lock (_sdkClients) _sdkClients.Enqueue(client); } client.OnSdkStateChange += TmpHandler; Server.ResetClient(client.Id); } else { client.Dispose(); } }
public AtemTestHelper(AtemSdkClientWrapper client, ITestOutputHelper output, AtemMockServer mockServer, AtemStateBuilderSettings stateSettings) { _mockServer = mockServer; SdkClient = client; Output = output; StateSettings = stateSettings; SyncStates(); _mockServer.LibReceive += LibAtemReceive; AssertStatesMatch(); }