public Task CloseAsync() { port.Disconnect(details.Endpoint); port.Dispose(); client.Dispose(); return(Task.CompletedTask); }
public void Dispose() { _port?.Disconnect(_endpoint); _port?.Dispose(); _client?.Dispose(); _endpoint?.Dispose(); _port = null; _client = null; _endpoint = null; }
public Task CloseAsync() { port.Disconnect(details.Endpoint); port.Dispose(); client.Dispose(); details.Dispose(); return(Task.CompletedTask); Connection = MidiPortConnectionState.Closed; }
public Task CloseAsync() { if (details is CoreMidiPortDetails cmDetails) { port.Disconnect(cmDetails.Endpoint); cmDetails.Dispose(); } port.Dispose(); client.Dispose(); Connection = MidiPortConnectionState.Closed; return(Task.CompletedTask); }
/// <summary> /// Releases all currently used MIDI resources. /// </summary> private void Release() { if (_inputEndpoint != null) { _inputPort.Disconnect(_inputEndpoint); _inputEndpoint = null; } if (_outputEndpoint != null) { _outputEndpoint = null; } }
partial void StopMessageReceived() { _port.MessageReceived -= NativePortMessageReceived; _port.Disconnect(_endpoint); }