Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / Providers / DataServicePagingProviderWrapper.cs / 1305376 / DataServicePagingProviderWrapper.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Wrapper for IDataServicePagingProvider discovery by service instance. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Providers { ///Wrapper for IDataServicePagingProvider interface discovery. internal sealed class DataServicePagingProviderWrapper { ///IDataServicePagingProvider interface for the service. private IDataServicePagingProvider pagingProvider; ///Service instance. private IDataService service; ///Was interface already requested. private bool checkedForIDataServicePagingProvider; ///Constructor. /// Service instance. public DataServicePagingProviderWrapper(IDataService serviceInstance) { this.service = serviceInstance; } ///Gives reference to IDataServicePagingProvider interface implemented by the service. public IDataServicePagingProvider PagingProviderInterface { get { if (!this.checkedForIDataServicePagingProvider) { this.pagingProvider = this.service.Provider.GetService(this.service); this.checkedForIDataServicePagingProvider = true; } return this.pagingProvider; } } /// Is custom paging enabled for the service for query processing. public bool IsCustomPagedForQuery { get { return this.PagingProviderInterface != null; } } ///Do we need to handle custom paging during serialization. public bool IsCustomPagedForSerialization { get { if (!this.checkedForIDataServicePagingProvider) { return false; } else { return this.pagingProvider != null; } } } ////// Dispose the pagingProvider provider instance /// internal void DisposeProvider() { if (this.pagingProvider != null) { WebUtil.Dispose(this.pagingProvider); this.pagingProvider = null; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QilTypeChecker.cs
- TextServicesContext.cs
- SelectionEditor.cs
- ByteBufferPool.cs
- ConstantCheck.cs
- AccessedThroughPropertyAttribute.cs
- SimpleApplicationHost.cs
- WebEventTraceProvider.cs
- ResourceAssociationTypeEnd.cs
- FormsAuthenticationEventArgs.cs
- SaveFileDialog.cs
- GetCertificateRequest.cs
- HelpProvider.cs
- webclient.cs
- EventLogPermissionEntryCollection.cs
- BufferedReadStream.cs
- ExeContext.cs
- WebPartZoneBase.cs
- UICuesEvent.cs
- MenuItemBinding.cs
- ResourcesBuildProvider.cs
- AsyncResult.cs
- PopupRootAutomationPeer.cs
- WebBrowserHelper.cs
- EnumerableWrapperWeakToStrong.cs
- ListParagraph.cs
- KoreanLunisolarCalendar.cs
- ContentHostHelper.cs
- WebWorkflowRole.cs
- precedingsibling.cs
- Geometry.cs
- TextSearch.cs
- AxHostDesigner.cs
- IQueryable.cs
- FixedStringLookup.cs
- SequenceDesigner.cs
- TTSEngineProxy.cs
- ProgressBarBrushConverter.cs
- ConnectionPointCookie.cs
- MetadataUtil.cs
- Point3DAnimationBase.cs
- WebPartZoneBase.cs
- XmlnsDictionary.cs
- DirectoryObjectSecurity.cs
- DefaultBindingPropertyAttribute.cs
- InvalidCastException.cs
- CellParagraph.cs
- XhtmlTextWriter.cs
- MessageFault.cs
- Stack.cs
- DictionaryTraceRecord.cs
- OutputWindow.cs
- HtmlMeta.cs
- WCFBuildProvider.cs
- FunctionQuery.cs
- ExtensibleClassFactory.cs
- SqlCacheDependency.cs
- FrameSecurityDescriptor.cs
- TreeViewHitTestInfo.cs
- SqlProcedureAttribute.cs
- MultiSelector.cs
- CryptoApi.cs
- Int32EqualityComparer.cs
- ApplicationSecurityManager.cs
- ObjectSet.cs
- OutputCacheSettings.cs
- DebugHandleTracker.cs
- oledbmetadatacollectionnames.cs
- StructuredType.cs
- HighContrastHelper.cs
- BaseTemplateBuildProvider.cs
- ListViewSortEventArgs.cs
- ZipIOModeEnforcingStream.cs
- WorkflowServiceHost.cs
- HighlightVisual.cs
- Script.cs
- DataTableReader.cs
- PolygonHotSpot.cs
- RawKeyboardInputReport.cs
- SafeEventLogWriteHandle.cs
- UpdateRecord.cs
- EventsTab.cs
- DynamicRendererThreadManager.cs
- ExpandCollapseProviderWrapper.cs
- AuthorizationRuleCollection.cs
- BamlRecords.cs
- XmlSchemaSimpleTypeUnion.cs
- EntityProxyFactory.cs
- DataControlPagerLinkButton.cs
- XmlUtf8RawTextWriter.cs
- IpcChannelHelper.cs
- ArgumentException.cs
- WorkItem.cs
- AdapterUtil.cs
- TextTreeObjectNode.cs
- SafeArrayRankMismatchException.cs
- KeyToListMap.cs
- Brushes.cs
- AssociationSet.cs
- HashJoinQueryOperatorEnumerator.cs