public Task CloseAsync() { port.Disconnect(details.Endpoint); port.Dispose(); client.Dispose(); return(Task.CompletedTask); }
partial void DisposeNative() { _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 void Dispose() { _port?.Disconnect(_endpoint); _port?.Dispose(); _client?.Dispose(); _endpoint?.Dispose(); _port = null; _client = null; _endpoint = null; }
public Task CloseAsync() { if (details is CoreMidiPortDetails cmDetails) { port.Disconnect(cmDetails.Endpoint); cmDetails.Dispose(); } port.Dispose(); client.Dispose(); Connection = MidiPortConnectionState.Closed; return(Task.CompletedTask); }