Exemplo n.º 1
0
 public Task CloseAsync()
 {
     port.Disconnect(details.Endpoint);
     port.Dispose();
     client.Dispose();
     return(Task.CompletedTask);
 }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public void Dispose()
 {
     _port?.Disconnect(_endpoint);
     _port?.Dispose();
     _client?.Dispose();
     _endpoint?.Dispose();
     _port     = null;
     _client   = null;
     _endpoint = null;
 }
Exemplo n.º 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);
 }