public static void EnumerateASync(CimSession cimSession, string cimNamespace, string cimClassName) { // Check Arguments if (cimNamespace == null) { throw new ArgumentNullException("cimNamespace"); } if (cimClassName == null) { throw new ArgumentNullException("cimClassName"); } try { IObservable<CimInstance> enumeratedInstances = cimSession.EnumerateInstancesAsync(cimNamespace, cimClassName, 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); } }