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
- DesignerHelpers.cs
- IntSumAggregationOperator.cs
- SecurityProtocol.cs
- KeyNotFoundException.cs
- FragmentNavigationEventArgs.cs
- ScriptIgnoreAttribute.cs
- SectionInformation.cs
- TransformerConfigurationWizardBase.cs
- BinaryMessageEncodingElement.cs
- RootBrowserWindowAutomationPeer.cs
- ItemContainerGenerator.cs
- VarRefManager.cs
- DataTableNewRowEvent.cs
- HandlerFactoryWrapper.cs
- FormatException.cs
- Process.cs
- dataprotectionpermissionattribute.cs
- TimeoutException.cs
- XmlSchemaAnnotation.cs
- Span.cs
- ResourceIDHelper.cs
- WebPartConnectionsConfigureVerb.cs
- PartitionerQueryOperator.cs
- InternalRelationshipCollection.cs
- DataList.cs
- FlowNode.cs
- RequestQueryParser.cs
- DetailsViewDeletedEventArgs.cs
- AddInControllerImpl.cs
- MultipleViewPatternIdentifiers.cs
- GestureRecognitionResult.cs
- ListBindingConverter.cs
- TableParagraph.cs
- TypeDescriptionProvider.cs
- CacheSection.cs
- PositiveTimeSpanValidator.cs
- IBuiltInEvidence.cs
- FormCollection.cs
- SafeWaitHandle.cs
- MultidimensionalArrayItemReference.cs
- SqlXml.cs
- BitConverter.cs
- ToolStripItemTextRenderEventArgs.cs
- PatternMatcher.cs
- WSDualHttpSecurity.cs
- CustomTypeDescriptor.cs
- JsonSerializer.cs
- ExpressionContext.cs
- Formatter.cs
- XmlRawWriterWrapper.cs
- SettingsPropertyValue.cs
- NumericExpr.cs
- NullPackagingPolicy.cs
- GeneralTransform.cs
- ToolStripSettings.cs
- IPEndPoint.cs
- SimpleBitVector32.cs
- ViewCellSlot.cs
- validation.cs
- Annotation.cs
- PathTooLongException.cs
- FixUpCollection.cs
- BindingList.cs
- DbConnectionFactory.cs
- ListViewTableRow.cs
- TypeDelegator.cs
- XPathPatternParser.cs
- RsaSecurityTokenAuthenticator.cs
- PromptStyle.cs
- ECDiffieHellmanCngPublicKey.cs
- PreloadedPackages.cs
- DataGridViewCellValidatingEventArgs.cs
- XmlSchemaNotation.cs
- Rect.cs
- ToolBarOverflowPanel.cs
- DeviceContext.cs
- TemplateNameScope.cs
- TypedDatasetGenerator.cs
- FixedDocument.cs
- ViewBase.cs
- KnownTypes.cs
- ChtmlFormAdapter.cs
- QuaternionAnimationUsingKeyFrames.cs
- MimeMultiPart.cs
- ProfileBuildProvider.cs
- PerformanceCounterPermissionAttribute.cs
- StreamReader.cs
- PropertyEmitterBase.cs
- ColumnHeaderConverter.cs
- Point3DAnimationUsingKeyFrames.cs
- StreamInfo.cs
- SaveFileDialog.cs
- RuleProcessor.cs
- FilteredDataSetHelper.cs
- FilterableAttribute.cs
- ShapingWorkspace.cs
- OdbcConnection.cs
- PolicyUnit.cs
- odbcmetadatacollectionnames.cs
- SettingsSection.cs