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
- CookieParameter.cs
- RenderContext.cs
- DataGridViewLinkCell.cs
- ClientSponsor.cs
- SymLanguageType.cs
- DynamicResourceExtensionConverter.cs
- EdmComplexPropertyAttribute.cs
- ActivityValidator.cs
- CachingHintValidation.cs
- ContextMenuStrip.cs
- ToolboxItemCollection.cs
- SessionIDManager.cs
- CharEntityEncoderFallback.cs
- GridViewColumnCollection.cs
- RsaSecurityTokenAuthenticator.cs
- TextEditor.cs
- MailMessage.cs
- MimeMapping.cs
- MimeBasePart.cs
- InputMethodStateTypeInfo.cs
- CustomAttribute.cs
- Documentation.cs
- COM2IProvidePropertyBuilderHandler.cs
- ToolStripItemEventArgs.cs
- ButtonChrome.cs
- InProcStateClientManager.cs
- _NegoStream.cs
- ParameterElementCollection.cs
- Random.cs
- PageFunction.cs
- EntityDataSourceEntityTypeFilterItem.cs
- ApplicationActivator.cs
- Header.cs
- ToolStripDropDownClosingEventArgs.cs
- XmlEntity.cs
- BinaryConverter.cs
- MessageSecurityVersion.cs
- DataGridViewComboBoxColumn.cs
- StandardOleMarshalObject.cs
- PhysicalAddress.cs
- DurableEnlistmentState.cs
- SurrogateSelector.cs
- HitTestWithPointDrawingContextWalker.cs
- TextDecorationCollection.cs
- HwndSource.cs
- FrameworkName.cs
- CellParaClient.cs
- PartialCachingAttribute.cs
- WrappedDispatcherException.cs
- InitializingNewItemEventArgs.cs
- CommandConverter.cs
- HttpListener.cs
- Base64Encoder.cs
- Grid.cs
- Stack.cs
- MessageQueue.cs
- DateTimeParse.cs
- ReflectionHelper.cs
- StyleXamlTreeBuilder.cs
- Variable.cs
- ExchangeUtilities.cs
- ArgumentOutOfRangeException.cs
- AuthenticationServiceManager.cs
- ReadWriteObjectLock.cs
- ResourceExpressionBuilder.cs
- EntityDataSourceState.cs
- PrintPageEvent.cs
- CurrentChangedEventManager.cs
- RelOps.cs
- ContainerControl.cs
- ComponentCommands.cs
- BaseProcessor.cs
- ProfileEventArgs.cs
- PropertyFilterAttribute.cs
- OleDbEnumerator.cs
- SqlDataSourceCommandEventArgs.cs
- SelectedDatesCollection.cs
- OdbcDataReader.cs
- CodeMemberEvent.cs
- EventProperty.cs
- ColorContextHelper.cs
- FixedFlowMap.cs
- ConnectionOrientedTransportManager.cs
- PolyBezierSegment.cs
- RenderingEventArgs.cs
- XmlWrappingWriter.cs
- DbProviderSpecificTypePropertyAttribute.cs
- KnownBoxes.cs
- InfoCardArgumentException.cs
- ProfileGroupSettings.cs
- DocumentViewerBaseAutomationPeer.cs
- DocumentProperties.cs
- HGlobalSafeHandle.cs
- DesignerSerializationOptionsAttribute.cs
- EntitySetBaseCollection.cs
- ActivationWorker.cs
- MDIControlStrip.cs
- KeyEventArgs.cs
- WindowsListViewSubItem.cs
- SystemWebExtensionsSectionGroup.cs