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
- ToolStripItemRenderEventArgs.cs
- GenerateDerivedKeyRequest.cs
- PersonalizablePropertyEntry.cs
- EventDescriptorCollection.cs
- DistinctQueryOperator.cs
- Block.cs
- WindowsSlider.cs
- SerializationBinder.cs
- DataServiceEntityAttribute.cs
- IPCCacheManager.cs
- XPathExpr.cs
- httpapplicationstate.cs
- ValueTypeFixupInfo.cs
- RevocationPoint.cs
- RecommendedAsConfigurableAttribute.cs
- BuildProviderAppliesToAttribute.cs
- log.cs
- OleDbWrapper.cs
- MappingItemCollection.cs
- ThreadExceptionDialog.cs
- AtomMaterializerLog.cs
- TableLayoutStyleCollection.cs
- Encoding.cs
- DefaultPropertyAttribute.cs
- QilSortKey.cs
- ColorTransform.cs
- IconBitmapDecoder.cs
- WmpBitmapDecoder.cs
- TemplateControlBuildProvider.cs
- Unit.cs
- _TransmitFileOverlappedAsyncResult.cs
- XmlName.cs
- XmlSchemaAttribute.cs
- DocumentViewerHelper.cs
- CancelEventArgs.cs
- SimpleType.cs
- SpecularMaterial.cs
- FollowerQueueCreator.cs
- StyleHelper.cs
- CompositeCollection.cs
- DeflateStreamAsyncResult.cs
- TypeConverterHelper.cs
- CompilerCollection.cs
- DocComment.cs
- DelegateBodyWriter.cs
- TypeUsage.cs
- MbpInfo.cs
- CheckBox.cs
- CustomBinding.cs
- PropertyValueChangedEvent.cs
- JavaScriptObjectDeserializer.cs
- Group.cs
- XmlSchemaObject.cs
- Vector3DCollectionConverter.cs
- ObservableDictionary.cs
- DataListCommandEventArgs.cs
- SecurityPermission.cs
- PropertyRecord.cs
- OdbcConnection.cs
- DelegatedStream.cs
- MruCache.cs
- AnimatedTypeHelpers.cs
- BaseParaClient.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- Enum.cs
- updatecommandorderer.cs
- XmlSchemaComplexContentExtension.cs
- FaultImportOptions.cs
- CqlErrorHelper.cs
- ProtocolsConfigurationHandler.cs
- BufferedGraphics.cs
- WSIdentityFaultException.cs
- AnnotationMap.cs
- OperationParameterInfoCollection.cs
- NoClickablePointException.cs
- Panel.cs
- _NtlmClient.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- Serializer.cs
- InfoCardSymmetricAlgorithm.cs
- DnsPermission.cs
- ClientUtils.cs
- PriorityRange.cs
- ScrollViewerAutomationPeer.cs
- ComponentCollection.cs
- TextOutput.cs
- LiteralTextParser.cs
- clipboard.cs
- Rect3DValueSerializer.cs
- SchemaTypeEmitter.cs
- ActivityMetadata.cs
- FormsAuthenticationModule.cs
- DesignSurfaceServiceContainer.cs
- BackgroundWorker.cs
- ImageSourceConverter.cs
- PolygonHotSpot.cs
- GraphicsPath.cs
- EditorZoneAutoFormat.cs
- TypedAsyncResult.cs
- SqlTriggerContext.cs