internal override MiResult NativeMoveNext(OperationHandle operationHandle, out CimClass currentItem, out bool moreResults, out MiResult operationResult, out string errorMessage, out InstanceHandle errorDetailsHandle) { ClassHandle classHandle = null; currentItem = null; MiResult @class = OperationMethods.GetClass(operationHandle, out classHandle, out moreResults, out operationResult, out errorMessage, out errorDetailsHandle); if (classHandle != null && !classHandle.IsInvalid) { if (!base.ShortenLifetimeOfResults) { classHandle = classHandle.Clone(); } currentItem = new CimClass(classHandle); } return(@class); }
internal override MiResult NativeMoveNext(OperationHandle operationHandle, out CimSubscriptionResult currentItem, out bool moreResults, out MiResult operationResult, out string errorMessage, out InstanceHandle errorDetailsHandle) { InstanceHandle instanceHandle = null; string str = null; string str1 = null; currentItem = null; MiResult indication = OperationMethods.GetIndication(operationHandle, out instanceHandle, out str, out str1, out moreResults, out operationResult, out errorMessage, out errorDetailsHandle); if (instanceHandle != null && !instanceHandle.IsInvalid) { if (!base.ShortenLifetimeOfResults) { instanceHandle = instanceHandle.Clone(); } currentItem = new CimSubscriptionResult(instanceHandle, str, str1); } return(indication); }
internal override MiResult NativeMoveNext(OperationHandle operationHandle, out CimInstance currentItem, out bool moreResults, out MiResult operationResult, out string errorMessage, out InstanceHandle errorDetailsHandle) { InstanceHandle instanceHandle = null; currentItem = null; MiResult instance = OperationMethods.GetInstance(operationHandle, out instanceHandle, out moreResults, out operationResult, out errorMessage, out errorDetailsHandle); if (instanceHandle != null && !instanceHandle.IsInvalid) { if (!base.ShortenLifetimeOfResults) { instanceHandle = instanceHandle.Clone(); } currentItem = new CimInstance(instanceHandle, null); currentItem.SetCimSessionComputerName(this._CimSessionComputerName); currentItem.SetCimSessionInstanceId(this._CimSessionInstanceID); } return(instance); }
internal void Cancel(CancellationMode cancellationMode) { lock (this._cancellationModeLock) { if (this._cancellationMode != CancellationMode.IgnoreCancellationRequests) { this._cancellationMode = cancellationMode; } else { return; } } lock (this._cancelVsCloseLock) { if (this._handle != null) { MiResult miResult = OperationMethods.Cancel(this._handle, MiCancellationReason.None); CimException.ThrowIfMiResultFailure(miResult); } } this.Cancelled.SafeInvoke <EventArgs>(this, EventArgs.Empty); }