Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ALinq / ResourceExpression.cs / 1 / ResourceExpression.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Base class for expressions representing resources
//
//
// @owner [....]
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
///
/// Abstract base class for expressions that support Query Options
///
internal abstract class ResourceExpression : Expression
{
/// Singleton InputReferenceExpression that should be used to indicate a reference to this element of the resource path
internal InputReferenceExpression inputRef;
/// expand paths
private List expandPaths;
/// custom query options
private Dictionary customQueryOptions;
///
/// Creates a Resource expression
///
/// the return type of the expression
internal ResourceExpression(ExpressionType nodeType, Type type, List expandPaths, Dictionary customQueryOptions)
: base(nodeType, type)
{
this.expandPaths = expandPaths ?? new List();
this.customQueryOptions = customQueryOptions ?? new Dictionary();
}
abstract internal ResourceExpression Cast(Type type);
abstract internal bool HasQueryOptions { get; }
abstract internal Type ResourceType { get; }
///
/// Does this expression produce at most 1 resource?
///
abstract internal bool IsSingleton { get; }
///
/// Expand query option for ResourceSet
///
internal virtual List ExpandPaths
{
get { return this.expandPaths; }
set { this.expandPaths = value; }
}
///
/// custom query options for ResourceSet
///
internal virtual Dictionary CustomQueryOptions
{
get { return this.customQueryOptions; }
set { this.customQueryOptions = value; }
}
///
/// Creates an that refers to this component of the resource path.
/// The returned expression is guaranteed to be reference-equal (object.ReferenceEquals)
/// to any other InputReferenceExpression that also refers to this resource path component.
///
/// The InputReferenceExpression that refers to this resource path component
internal InputReferenceExpression CreateReference()
{
if (this.inputRef == null)
{
this.inputRef = new InputReferenceExpression(this.ResourceType, this);
}
return this.inputRef;
}
}
}
// 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
- XmlSchemaNotation.cs
- RTLAwareMessageBox.cs
- BasePattern.cs
- WebPartConnectionsConfigureVerb.cs
- ObjectIDGenerator.cs
- CodeAttributeArgument.cs
- MimePart.cs
- CqlWriter.cs
- FigureParaClient.cs
- HttpGetProtocolImporter.cs
- Vector3DConverter.cs
- PnrpPermission.cs
- MessageEnumerator.cs
- BooleanConverter.cs
- DataMemberAttribute.cs
- NetworkStream.cs
- RuntimeConfigLKG.cs
- SHA1CryptoServiceProvider.cs
- SecurityKeyIdentifier.cs
- CodeActivityMetadata.cs
- Point3D.cs
- Simplifier.cs
- TableDesigner.cs
- SequentialOutput.cs
- DrawingContextDrawingContextWalker.cs
- GlobalAclOperationRequirement.cs
- IPAddressCollection.cs
- RootBrowserWindowAutomationPeer.cs
- XhtmlBasicObjectListAdapter.cs
- ControlAdapter.cs
- ApplicationBuildProvider.cs
- HelpKeywordAttribute.cs
- JsonWriter.cs
- BevelBitmapEffect.cs
- GrammarBuilderWildcard.cs
- EntityDesignerDataSourceView.cs
- DataIdProcessor.cs
- itemelement.cs
- ClientOptions.cs
- SmiContext.cs
- DomainUpDown.cs
- DataGridItemAttachedStorage.cs
- TraceUtility.cs
- EdmItemError.cs
- TranslateTransform3D.cs
- sqlinternaltransaction.cs
- HasCopySemanticsAttribute.cs
- GestureRecognitionResult.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DataBindingHandlerAttribute.cs
- TypeUtil.cs
- RegionInfo.cs
- HyperLinkStyle.cs
- Propagator.JoinPropagator.cs
- XmlLanguageConverter.cs
- ConfigurationSchemaErrors.cs
- KerberosTicketHashIdentifierClause.cs
- SafeCryptoHandles.cs
- Trace.cs
- Base64Encoder.cs
- ForceCopyBuildProvider.cs
- SevenBitStream.cs
- InstanceDescriptor.cs
- EndEvent.cs
- TextRenderingModeValidation.cs
- XomlCompilerParameters.cs
- CommonEndpointBehaviorElement.cs
- SkipQueryOptionExpression.cs
- SpeechDetectedEventArgs.cs
- LoginView.cs
- Stopwatch.cs
- BCLDebug.cs
- TemplateBindingExpressionConverter.cs
- DynamicFilter.cs
- FontStretchConverter.cs
- PreProcessInputEventArgs.cs
- ArglessEventHandlerProxy.cs
- TemplateEditingService.cs
- ColorTransformHelper.cs
- ProvidePropertyAttribute.cs
- _AuthenticationState.cs
- TableLayoutStyleCollection.cs
- IndexedEnumerable.cs
- ProxyAttribute.cs
- BackStopAuthenticationModule.cs
- CompositeActivityValidator.cs
- RegexWorker.cs
- DoubleAnimationClockResource.cs
- ImageListStreamer.cs
- CodeAccessSecurityEngine.cs
- MetadataItemEmitter.cs
- SchemaEntity.cs
- AsyncCompletedEventArgs.cs
- TextServicesCompartmentEventSink.cs
- PointAnimationBase.cs
- RulePatternOps.cs
- TreeNodeBindingDepthConverter.cs
- AggregateNode.cs
- DesigntimeLicenseContextSerializer.cs
- HatchBrush.cs