Microsoft.ManagementConsole.View.GetPropertyPages C# (CSharp) Method

GetPropertyPages() private method

private GetPropertyPages ( int sheetId, long selectionId, IRequestStatus requestStatus ) : void
sheetId int
selectionId long
requestStatus IRequestStatus
return void
        internal void GetPropertyPages(int sheetId, long selectionId, IRequestStatus requestStatus)
        {
            if (requestStatus == null)
            {
                throw new ArgumentNullException("requestStatus");
            }
            PropertyPageCollection propertyPageCollection = new PropertyPageCollection();
            SyncStatus status = new SyncStatus(requestStatus);
            try
            {
                if ((this.SelectionData.SelectionCardinality == SelectionCardinality.None) || (selectionId != this.SelectionData.Id))
                {
                    TraceSources.ExecutiveSource.TraceEvent(TraceEventType.Warning, 12, "Request for pages for sheet {0} in view {1} selection id {2} ignored since selection has changed.", new object[] { sheetId, this._viewInstanceId, selectionId });
                    requestStatus.ProcessResponse(new PropertyPagesResponse());
                    return;
                }
                this.OnAddPropertyPages(propertyPageCollection);
                PropertyPagesResponse response = new PropertyPagesResponse();
                response.SetPropertyPages(propertyPageCollection.ToPropertyPageInfoArray());
                requestStatus.ProcessResponse(response);
            }
            finally
            {
                status.Close();
            }
            SnapInBase.SnapInInstance.SheetManager.CreatePropertySheet(sheetId, propertyPageCollection, new AuxiliarySelectionData(this.SelectionData));
        }