Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / DataServiceRequestOfT.cs / 1305376 / DataServiceRequestOfT.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// typed request object
//
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
#region Namespaces.
using System;
using System.Diagnostics;
#endregion Namespaces.
///
/// Holds a Uri and type for the request.
///
/// The type to construct for the request results
public sealed class DataServiceRequest : DataServiceRequest
{
#region Private fields.
/// The UriTranslateResult for the request
private readonly QueryComponents queryComponents;
/// The ProjectionPlan for the request (if precompiled in a previous page).
private readonly ProjectionPlan plan;
#endregion Private fields.
#region Constructors.
/// Create a request for a specific Uri
/// The URI for the request.
public DataServiceRequest(Uri requestUri)
{
Util.CheckArgumentNull(requestUri, "requestUri");
Type elementType = typeof(TElement);
elementType = ClientConvert.IsKnownType(elementType) ? elementType : TypeSystem.GetElementType(elementType);
this.queryComponents = new QueryComponents(requestUri, Util.DataServiceVersionEmpty, elementType, null, null);
}
/// Create a request for a specific Uri
/// The query components for the request
/// Projection plan to reuse (possibly null).
internal DataServiceRequest(QueryComponents queryComponents, ProjectionPlan plan)
{
Debug.Assert(queryComponents != null, "queryComponents != null");
this.queryComponents = queryComponents;
this.plan = plan;
}
#endregion Constructors.
/// Element Type
public override Type ElementType
{
get { return typeof(TElement); }
}
/// The URI for the request.
public override Uri RequestUri
{
get { return this.queryComponents.Uri; }
}
/// The ProjectionPlan for the request, if precompiled in a previous page; null otherwise.
internal override ProjectionPlan Plan
{
get
{
return this.plan;
}
}
/// The TranslateResult associated with this request
internal override QueryComponents QueryComponents
{
get
{
return this.queryComponents;
}
}
}
}
// 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
- ToolStripItemRenderEventArgs.cs
- IfJoinedCondition.cs
- Cell.cs
- DesignerPainter.cs
- ObfuscationAttribute.cs
- CharKeyFrameCollection.cs
- ToolStripButton.cs
- SelectionUIHandler.cs
- EntityDataSourceUtil.cs
- EmptyReadOnlyDictionaryInternal.cs
- WhitespaceSignificantCollectionAttribute.cs
- Clipboard.cs
- TargetInvocationException.cs
- TextEditorTyping.cs
- Floater.cs
- BaseServiceProvider.cs
- ExtendLockCommand.cs
- DataSourceConverter.cs
- SafeArchiveContext.cs
- IODescriptionAttribute.cs
- CompressEmulationStream.cs
- SourceChangedEventArgs.cs
- MemberExpression.cs
- UnsafeNativeMethods.cs
- InkCollectionBehavior.cs
- SymmetricCryptoHandle.cs
- ConnectionsZone.cs
- CodeBlockBuilder.cs
- DataGridHyperlinkColumn.cs
- TextBlockAutomationPeer.cs
- DesignTimeSiteMapProvider.cs
- EncryptedPackageFilter.cs
- HttpCacheParams.cs
- ModelPropertyCollectionImpl.cs
- SymmetricAlgorithm.cs
- SqlNodeAnnotation.cs
- TimeSpanValidator.cs
- RenderDataDrawingContext.cs
- ColorMap.cs
- ScriptingScriptResourceHandlerSection.cs
- SecureConversationDriver.cs
- CollectionConverter.cs
- GridViewRowPresenter.cs
- TypographyProperties.cs
- GestureRecognitionResult.cs
- TypeUtil.cs
- RuntimeHelpers.cs
- XmlStreamStore.cs
- WindowsListView.cs
- SystemFonts.cs
- Bezier.cs
- ProtocolsConfigurationHandler.cs
- JsonFormatWriterGenerator.cs
- SingleAnimation.cs
- Int32Rect.cs
- DesignerSerializationVisibilityAttribute.cs
- ResXFileRef.cs
- ObjectCloneHelper.cs
- WebPartCancelEventArgs.cs
- Buffer.cs
- MsmqInputSessionChannelListener.cs
- WorkflowDesignerMessageFilter.cs
- DataGridViewDesigner.cs
- BoundField.cs
- webeventbuffer.cs
- AbsoluteQuery.cs
- NamespaceQuery.cs
- InputLanguageEventArgs.cs
- ShutDownListener.cs
- SqlCharStream.cs
- SpecialNameAttribute.cs
- StyleSelector.cs
- InputMethod.cs
- ConnectionProviderAttribute.cs
- SafePointer.cs
- Pkcs7Recipient.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- OleDbDataReader.cs
- UdpTransportSettingsElement.cs
- DrawingVisual.cs
- xml.cs
- DockAndAnchorLayout.cs
- VisualTarget.cs
- WebBrowserHelper.cs
- AttributeExtensions.cs
- AmbientProperties.cs
- LassoHelper.cs
- PropertyToken.cs
- StringUtil.cs
- DataGridRow.cs
- Hyperlink.cs
- TableAutomationPeer.cs
- SelectedDatesCollection.cs
- ScriptManagerProxy.cs
- PasswordTextContainer.cs
- ConfigurationSettings.cs
- StylusPlugin.cs
- PropertyMapper.cs
- ZipIOExtraField.cs
- ScrollEventArgs.cs