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 void ClassCallback(OperationCallbackProcessingContext callbackProcessingContext, OperationHandle operationHandle, ClassHandle ClassHandle, bool moreResults, MiResult operationResult, string errorMessage, InstanceHandle errorDetailsHandle) { CimClass cimClass = null; if (ClassHandle != null && !ClassHandle.IsInvalid) { if (!this._shortenLifetimeOfResults) { ClassHandle = ClassHandle.Clone(); } cimClass = new CimClass(ClassHandle); } //using (cimClass) { if (!this._shortenLifetimeOfResults || cimClass == null) { base.ProcessNativeCallback(callbackProcessingContext, cimClass, moreResults, operationResult, errorMessage, errorDetailsHandle); } } }