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
- WebBrowserUriTypeConverter.cs
- TriggerCollection.cs
- TaiwanLunisolarCalendar.cs
- CaseInsensitiveHashCodeProvider.cs
- controlskin.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- ApplicationException.cs
- WebProxyScriptElement.cs
- RtType.cs
- MemberProjectedSlot.cs
- MenuItemAutomationPeer.cs
- parserscommon.cs
- ChainOfDependencies.cs
- ImpersonateTokenRef.cs
- ReachSerializationUtils.cs
- Tablet.cs
- SafeCryptContextHandle.cs
- SingleTagSectionHandler.cs
- TextElementEnumerator.cs
- XmlExtensionFunction.cs
- Native.cs
- CompareInfo.cs
- RouteCollection.cs
- ADConnectionHelper.cs
- HttpServerProtocol.cs
- Int64AnimationUsingKeyFrames.cs
- TypeElement.cs
- BoundPropertyEntry.cs
- FederatedMessageSecurityOverHttpElement.cs
- ProcessHost.cs
- DoubleLinkListEnumerator.cs
- ResourcesChangeInfo.cs
- SchemaCollectionCompiler.cs
- AppSettingsExpressionBuilder.cs
- XmlNullResolver.cs
- TextBox.cs
- VarRefManager.cs
- TextRangeSerialization.cs
- PageCatalogPartDesigner.cs
- ILGenerator.cs
- VariableQuery.cs
- DocumentOrderComparer.cs
- InputLanguageCollection.cs
- Annotation.cs
- DbException.cs
- WinFormsSecurity.cs
- ScrollPattern.cs
- DependencyProperty.cs
- RtType.cs
- XpsFilter.cs
- UIElement.cs
- HyperLink.cs
- OleDbSchemaGuid.cs
- BindingContext.cs
- WSDualHttpBinding.cs
- StringConverter.cs
- WebServiceResponse.cs
- ButtonBaseDesigner.cs
- FlowLayout.cs
- XmlElement.cs
- ParseChildrenAsPropertiesAttribute.cs
- DecimalStorage.cs
- UIntPtr.cs
- CachedCompositeFamily.cs
- VirtualPathUtility.cs
- WindowManager.cs
- D3DImage.cs
- Encoder.cs
- FormDesigner.cs
- ListView.cs
- FontFamilyValueSerializer.cs
- SafeHandles.cs
- Debugger.cs
- QuaternionRotation3D.cs
- RepeatBehaviorConverter.cs
- GridViewEditEventArgs.cs
- StandardCommands.cs
- Size3D.cs
- FormsAuthentication.cs
- DataPagerField.cs
- SortFieldComparer.cs
- ClientBuildManagerCallback.cs
- DataGridCell.cs
- Int32CollectionConverter.cs
- OrCondition.cs
- SoapProtocolImporter.cs
- Point4DValueSerializer.cs
- MachineSettingsSection.cs
- Update.cs
- UserControlFileEditor.cs
- UpdatePanel.cs
- HtmlElementCollection.cs
- QueryPageSettingsEventArgs.cs
- XmlTextAttribute.cs
- ListenDesigner.cs
- AmbientEnvironment.cs
- WebRequestModulesSection.cs
- PassportAuthenticationModule.cs
- StrongNameUtility.cs
- DropShadowBitmapEffect.cs