예제 #1
0
        private void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            Task.WaitAll(_sendTasks.Select(t => t.AsTask()).ToArray());

            _tSource.Cancel();

            _listener.Wait();

            _instance = null;
        }
예제 #2
0
 public static IoTHubService Instance()
 {
     return(_instance ?? (_instance = new IoTHubService()));
 }