Example #1
0
 public Task CloseAsync()
 {
     port.Disconnect(details.Endpoint);
     port.Dispose();
     client.Dispose();
     return(Task.CompletedTask);
 }
Example #2
0
 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;
        }
Example #4
0
 public void Dispose()
 {
     _port?.Disconnect(_endpoint);
     _port?.Dispose();
     _client?.Dispose();
     _endpoint?.Dispose();
     _port     = null;
     _client   = null;
     _endpoint = null;
 }
Example #5
0
 public Task CloseAsync()
 {
     if (details is CoreMidiPortDetails cmDetails)
     {
         port.Disconnect(cmDetails.Endpoint);
         cmDetails.Dispose();
     }
     port.Dispose();
     client.Dispose();
     Connection = MidiPortConnectionState.Closed;
     return(Task.CompletedTask);
 }