public static void GetInstanceASync(CimSession cimSession, string cimNamespace, string cimClassName) { // Check Arguments if (cimNamespace == null) { throw new ArgumentNullException("cimNamespace"); } if (cimClassName == null) { throw new ArgumentNullException("cimClassName"); } try { CimInstance inputInstance = GetInstanceCore(cimSession, cimNamespace, cimClassName); IObservable<CimInstance> enumeratedInstances = cimSession.GetInstanceAsync(cimNamespace, inputInstance, GetOperationOptions()); TestObserver<CimInstance> observer = new TestObserver<CimInstance>(); IDisposable disposeable = enumeratedInstances.Subscribe(observer); observer.WaitForCompletion(); } catch (CimException ex) { PrintCimException(ex); } catch( Exception ex) { Console.WriteLine(ex.Message); } }