Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ALinq / NavigationPropertySingletonExpression.cs / 3 / NavigationPropertySingletonExpression.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Respresents a navigation to a singleton property. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Client { using System; using System.Linq; using System.Linq.Expressions; using System.Collections.Generic; using System.Diagnostics; ///ResourceSet Expression internal class NavigationPropertySingletonExpression : ResourceExpression { ///source expression private readonly Expression source; ///property member name private readonly Expression memberExpression; ////// Creates a NavigationPropertySingletonExpression expression /// /// the return type of the expression /// the source expression /// property member name /// expand paths for resource set /// custom query options for resourcse set internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, ListexpandPaths, Dictionary customQueryOptions) : base((ExpressionType)ResourceExpressionType.ResourceNavigationPropertySingleton, type, expandPaths, customQueryOptions) { this.source = source; this.memberExpression = memberExpression; } /// /// Gets the member expression. /// internal MemberExpression MemberExpression { get { return (MemberExpression)this.memberExpression; } } ////// Gets the source expression. /// internal Expression Source { get { return this.source; } } ////// The resource type of the singe instance produced by this singleton navigation. /// internal override Type ResourceType { get { return this.memberExpression.Type; } } ////// Singleton navigation properties always produce at most 1 result /// internal override bool IsSingleton { get { return true; } } ////// Does Singleton navigation have query options. /// internal override bool HasQueryOptions { get { return this.ExpandPaths.Count > 0 || this.CustomQueryOptions.Count > 0; } } ////// Cast changes the type of the ResourceExpression /// /// new type ///new NavigationPropertySingletonExpression internal override ResourceExpression Cast(Type type) { NavigationPropertySingletonExpression rse = new NavigationPropertySingletonExpression( type, this.source, this.MemberExpression, this.ExpandPaths.ToList(), this.CustomQueryOptions.ToDictionary(kvp => kvp.Key, kvp => kvp.Value)); return rse; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Respresents a navigation to a singleton property. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Client { using System; using System.Linq; using System.Linq.Expressions; using System.Collections.Generic; using System.Diagnostics; ///ResourceSet Expression internal class NavigationPropertySingletonExpression : ResourceExpression { ///source expression private readonly Expression source; ///property member name private readonly Expression memberExpression; ////// Creates a NavigationPropertySingletonExpression expression /// /// the return type of the expression /// the source expression /// property member name /// expand paths for resource set /// custom query options for resourcse set internal NavigationPropertySingletonExpression(Type type, Expression source, Expression memberExpression, ListexpandPaths, Dictionary customQueryOptions) : base((ExpressionType)ResourceExpressionType.ResourceNavigationPropertySingleton, type, expandPaths, customQueryOptions) { this.source = source; this.memberExpression = memberExpression; } /// /// Gets the member expression. /// internal MemberExpression MemberExpression { get { return (MemberExpression)this.memberExpression; } } ////// Gets the source expression. /// internal Expression Source { get { return this.source; } } ////// The resource type of the singe instance produced by this singleton navigation. /// internal override Type ResourceType { get { return this.memberExpression.Type; } } ////// Singleton navigation properties always produce at most 1 result /// internal override bool IsSingleton { get { return true; } } ////// Does Singleton navigation have query options. /// internal override bool HasQueryOptions { get { return this.ExpandPaths.Count > 0 || this.CustomQueryOptions.Count > 0; } } ////// Cast changes the type of the ResourceExpression /// /// new type ///new NavigationPropertySingletonExpression internal override ResourceExpression Cast(Type type) { NavigationPropertySingletonExpression rse = new NavigationPropertySingletonExpression( type, this.source, this.MemberExpression, this.ExpandPaths.ToList(), this.CustomQueryOptions.ToDictionary(kvp => kvp.Key, kvp => kvp.Value)); return rse; } } } // 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
- FlowDecisionLabelFeature.cs
- LinkLabelLinkClickedEvent.cs
- XmlSchemaAny.cs
- RSAProtectedConfigurationProvider.cs
- InkCollectionBehavior.cs
- SessionState.cs
- ListViewItemSelectionChangedEvent.cs
- PanelDesigner.cs
- ColorKeyFrameCollection.cs
- DiagnosticTraceSource.cs
- CodeTypeReferenceExpression.cs
- ComplusEndpointConfigContainer.cs
- CmsInterop.cs
- _ConnectionGroup.cs
- DurableInstance.cs
- _RequestCacheProtocol.cs
- DataGridItemEventArgs.cs
- DataGridViewCell.cs
- OdbcEnvironmentHandle.cs
- ToolBarPanel.cs
- TemplatePropertyEntry.cs
- FloatMinMaxAggregationOperator.cs
- BulletedListEventArgs.cs
- DataList.cs
- HwndSourceKeyboardInputSite.cs
- XmlSchemaObjectCollection.cs
- DotNetATv1WindowsLogEntryDeserializer.cs
- WebDescriptionAttribute.cs
- Icon.cs
- DesignerOptions.cs
- ManagedWndProcTracker.cs
- EntityProviderFactory.cs
- DataRowCollection.cs
- AccessibleObject.cs
- CompositeCollection.cs
- XsltException.cs
- CustomErrorsSectionWrapper.cs
- FixedSOMFixedBlock.cs
- StylusEventArgs.cs
- DataObjectSettingDataEventArgs.cs
- SizeLimitedCache.cs
- UnsafeNativeMethods.cs
- AttributeData.cs
- SQLInt32Storage.cs
- ZoomPercentageConverter.cs
- ExtensibleClassFactory.cs
- ParsedAttributeCollection.cs
- _ChunkParse.cs
- SafeUserTokenHandle.cs
- EncoderReplacementFallback.cs
- RubberbandSelector.cs
- UserUseLicenseDictionaryLoader.cs
- HMACMD5.cs
- FormView.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- XmlConvert.cs
- ConfigurationStrings.cs
- SiteMapSection.cs
- PerformanceCounterManager.cs
- ListItem.cs
- ExpressionEditor.cs
- ScalarConstant.cs
- OperationGenerator.cs
- AutomationElementIdentifiers.cs
- EventMap.cs
- ClonableStack.cs
- Aggregates.cs
- RowToParametersTransformer.cs
- TraceUtility.cs
- RawStylusInputCustomDataList.cs
- WebControlsSection.cs
- CodePrimitiveExpression.cs
- QualificationDataItem.cs
- ListViewAutomationPeer.cs
- Compensation.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- ResourcePermissionBase.cs
- DiagnosticTraceSource.cs
- CornerRadiusConverter.cs
- URI.cs
- DrawingGroup.cs
- XPathScanner.cs
- CustomAttributeBuilder.cs
- WebPartCloseVerb.cs
- SiteMapProvider.cs
- CustomError.cs
- ContextInformation.cs
- WebServiceTypeData.cs
- QilInvoke.cs
- SizeChangedInfo.cs
- HashStream.cs
- DependsOnAttribute.cs
- XamlWriter.cs
- HostedHttpRequestAsyncResult.cs
- SemanticTag.cs
- ByteArrayHelperWithString.cs
- ExtensibleClassFactory.cs
- AsymmetricAlgorithm.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- dataprotectionpermission.cs