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
- SoapObjectReader.cs
- UTF32Encoding.cs
- BitmapData.cs
- SafeNativeMethods.cs
- HtmlEmptyTagControlBuilder.cs
- MimeTypeMapper.cs
- SortFieldComparer.cs
- StreamWriter.cs
- NotSupportedException.cs
- EdmItemCollection.cs
- TextProperties.cs
- PropertyMetadata.cs
- NoClickablePointException.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- RequestUriProcessor.cs
- HtmlInputRadioButton.cs
- webclient.cs
- Control.cs
- CodeRemoveEventStatement.cs
- DocumentSequence.cs
- DbCommandTree.cs
- XmlImplementation.cs
- ErrorEventArgs.cs
- WebBrowserProgressChangedEventHandler.cs
- DataColumnChangeEvent.cs
- SimpleHandlerBuildProvider.cs
- ControlPaint.cs
- FormsAuthenticationUserCollection.cs
- mactripleDES.cs
- FixUp.cs
- LayoutTable.cs
- TableHeaderCell.cs
- TextLine.cs
- basevalidator.cs
- PackageRelationshipCollection.cs
- HttpHandlerAction.cs
- WorkflowDesignerColors.cs
- NextPreviousPagerField.cs
- ReadOnlyDataSourceView.cs
- IndexedString.cs
- WebPartVerb.cs
- StdValidatorsAndConverters.cs
- ValidationErrorEventArgs.cs
- AsyncPostBackTrigger.cs
- ReliabilityContractAttribute.cs
- SQLDateTimeStorage.cs
- Transform3D.cs
- DataGridViewDataErrorEventArgs.cs
- RuntimeResourceSet.cs
- InternalCache.cs
- ToolboxBitmapAttribute.cs
- UnhandledExceptionEventArgs.cs
- DynamicActivityXamlReader.cs
- GroupBoxAutomationPeer.cs
- Msmq4PoisonHandler.cs
- RestHandler.cs
- ExpressionEditorAttribute.cs
- UpdateCommand.cs
- TextElementEditingBehaviorAttribute.cs
- MutableAssemblyCacheEntry.cs
- ParameterEditorUserControl.cs
- Boolean.cs
- StickyNoteAnnotations.cs
- UriSection.cs
- embossbitmapeffect.cs
- ThemeInfoAttribute.cs
- Publisher.cs
- DataContractSerializerOperationGenerator.cs
- LabelExpression.cs
- Win32Native.cs
- DBAsyncResult.cs
- DataGridViewLayoutData.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SimpleApplicationHost.cs
- NotificationContext.cs
- SqlVisitor.cs
- PageCatalogPart.cs
- Screen.cs
- BamlRecords.cs
- WindowAutomationPeer.cs
- DATA_BLOB.cs
- LiteralTextParser.cs
- OutputChannel.cs
- ColumnMap.cs
- OneOfTypeConst.cs
- RenderingBiasValidation.cs
- ImageDrawing.cs
- ManipulationVelocities.cs
- WebRequest.cs
- ObjectQueryState.cs
- Documentation.cs
- dbdatarecord.cs
- DocumentCollection.cs
- JpegBitmapEncoder.cs
- Configuration.cs
- MobileFormsAuthentication.cs
- UnauthorizedWebPart.cs
- DocumentPage.cs
- ValueChangedEventManager.cs
- ObfuscateAssemblyAttribute.cs