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
- DataControlCommands.cs
- IncomingWebRequestContext.cs
- AnnouncementEndpoint.cs
- ItemType.cs
- KnownAssembliesSet.cs
- CodeSnippetExpression.cs
- ObjectItemLoadingSessionData.cs
- GrabHandleGlyph.cs
- AppSettingsExpressionEditor.cs
- DataGridTextBoxColumn.cs
- CompilationPass2TaskInternal.cs
- SqlDataRecord.cs
- ReflectPropertyDescriptor.cs
- DBBindings.cs
- XmlSchemaType.cs
- Hashtable.cs
- SafeProcessHandle.cs
- CodeTypeReferenceCollection.cs
- OutputCacheSettingsSection.cs
- ChannelServices.cs
- BuildProviderUtils.cs
- EllipseGeometry.cs
- ProtocolsConfigurationHandler.cs
- Material.cs
- DropSourceBehavior.cs
- SerializerWriterEventHandlers.cs
- TableItemPattern.cs
- UriTemplateCompoundPathSegment.cs
- TemplateBamlTreeBuilder.cs
- ErrorFormatterPage.cs
- AggregateNode.cs
- PrinterSettings.cs
- ViewStateChangedEventArgs.cs
- HttpHandlerAction.cs
- Section.cs
- QilLoop.cs
- CatalogPartCollection.cs
- InvalidPropValue.cs
- EnvelopedPkcs7.cs
- SerializerProvider.cs
- AlphabeticalEnumConverter.cs
- EdmPropertyAttribute.cs
- FileDialog_Vista.cs
- SpeakInfo.cs
- BrowserDefinitionCollection.cs
- Solver.cs
- WebPermission.cs
- Localizer.cs
- LocalizationComments.cs
- SpanIndex.cs
- SoapEnumAttribute.cs
- FrameworkElementFactoryMarkupObject.cs
- X509CertificateInitiatorClientCredential.cs
- ConfigViewGenerator.cs
- WindowsFormsLinkLabel.cs
- SmtpFailedRecipientsException.cs
- SystemTcpStatistics.cs
- DescendantBaseQuery.cs
- X509Certificate2Collection.cs
- ItemAutomationPeer.cs
- DataGridHeaderBorder.cs
- Mapping.cs
- ZoomPercentageConverter.cs
- NullableDecimalMinMaxAggregationOperator.cs
- TypeUnloadedException.cs
- TreeIterator.cs
- CommentAction.cs
- Point3DCollection.cs
- UnsupportedPolicyOptionsException.cs
- NetCodeGroup.cs
- HandlerBase.cs
- SiteIdentityPermission.cs
- safesecurityhelperavalon.cs
- ContentControl.cs
- MSG.cs
- HierarchicalDataBoundControl.cs
- VisualBrush.cs
- SystemMulticastIPAddressInformation.cs
- DataControlLinkButton.cs
- ExecutionContext.cs
- DiagnosticsConfiguration.cs
- UserControlDocumentDesigner.cs
- RecordsAffectedEventArgs.cs
- DecoderBestFitFallback.cs
- ToolStripSplitButton.cs
- ConfigurationSectionCollection.cs
- ClientTargetCollection.cs
- FlowLayout.cs
- TextRunCache.cs
- BinaryConverter.cs
- AssemblyBuilder.cs
- DataGridViewControlCollection.cs
- RoleManagerSection.cs
- HtmlHead.cs
- BaseDataBoundControl.cs
- PriorityQueue.cs
- ColorKeyFrameCollection.cs
- UniqueID.cs
- XmlNavigatorStack.cs
- WorkItem.cs