Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ALinq / TakeQueryOptionExpression.cs / 1305376 / TakeQueryOptionExpression.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Respresents a take query option in resource bound expression tree. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services.Client { using System; using System.Diagnostics; using System.Linq.Expressions; ////// An resource specific expression representing a take query option. /// [DebuggerDisplay("TakeQueryOptionExpression {TakeAmount}")] internal class TakeQueryOptionExpression : QueryOptionExpression { ///amount to skip private ConstantExpression takeAmount; ////// Creates a TakeQueryOption expression /// /// the return type of the expression /// the query option value internal TakeQueryOptionExpression(Type type, ConstantExpression takeAmount) : base((ExpressionType)ResourceExpressionType.TakeQueryOption, type) { this.takeAmount = takeAmount; } ////// query option value /// internal ConstantExpression TakeAmount { get { return this.takeAmount; } } ////// Composes the ///expression with this one when it's specified multiple times. /// to compose. /// /// The expression that results from composing the internal override QueryOptionExpression ComposeMultipleSpecification(QueryOptionExpression previous) { Debug.Assert(previous != null, "other != null"); Debug.Assert(previous.GetType() == this.GetType(), "other.GetType == this.GetType() -- otherwise it's not the same specification"); Debug.Assert(this.takeAmount != null, "this.takeAmount != null"); Debug.Assert( this.takeAmount.Type == typeof(int), "this.takeAmount.Type == typeof(int) -- otherwise it wouldn't have matched the Enumerable.Take(source, int count) signature"); int thisValue = (int)this.takeAmount.Value; int previousValue = (int)((TakeQueryOptionExpression)previous).takeAmount.Value; return (thisValue < previousValue) ? this : previous; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.expression with this one. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DefaultDialogButtons.cs
- CharUnicodeInfo.cs
- AudioFormatConverter.cs
- AppliedDeviceFiltersEditor.cs
- AutoGeneratedFieldProperties.cs
- ConditionedDesigner.cs
- EncryptedData.cs
- AssemblyBuilder.cs
- DataObjectMethodAttribute.cs
- TextServicesCompartmentContext.cs
- FileDialog_Vista.cs
- MailBnfHelper.cs
- WebBrowserEvent.cs
- COM2AboutBoxPropertyDescriptor.cs
- CurrencyWrapper.cs
- AccessDataSourceView.cs
- NameValueConfigurationCollection.cs
- DateTimeAutomationPeer.cs
- ModelItem.cs
- AppearanceEditorPart.cs
- XmlAtomErrorReader.cs
- DocumentOrderQuery.cs
- WpfSharedBamlSchemaContext.cs
- WorkflowApplicationCompletedException.cs
- PatternMatcher.cs
- ColorBlend.cs
- XPathParser.cs
- ConfigurationSectionHelper.cs
- HScrollProperties.cs
- RepeatBehaviorConverter.cs
- OleDbMetaDataFactory.cs
- PrimitiveXmlSerializers.cs
- wgx_render.cs
- DrawingState.cs
- Enum.cs
- SqlUserDefinedAggregateAttribute.cs
- ThrowHelper.cs
- RightsManagementProvider.cs
- HandlerFactoryWrapper.cs
- FileSystemWatcher.cs
- Range.cs
- ZipArchive.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- dbenumerator.cs
- EntitySetDataBindingList.cs
- SerialErrors.cs
- DescendentsWalkerBase.cs
- RequestQueue.cs
- CubicEase.cs
- ImageDrawing.cs
- AppSettingsExpressionBuilder.cs
- LicenseProviderAttribute.cs
- ToolBarButton.cs
- EntityDataSourceColumn.cs
- ClientRuntime.cs
- TableItemPattern.cs
- RtfToken.cs
- SelectionListDesigner.cs
- CodeIdentifier.cs
- MouseButtonEventArgs.cs
- GenericIdentity.cs
- FontCacheUtil.cs
- AlphabeticalEnumConverter.cs
- DataSourceXmlSerializationAttribute.cs
- FixedSOMImage.cs
- SoapException.cs
- UserControlBuildProvider.cs
- XamlSerializerUtil.cs
- DataGridBeginningEditEventArgs.cs
- ServicePointManagerElement.cs
- EntitySqlQueryCacheKey.cs
- CharEnumerator.cs
- TriggerCollection.cs
- Popup.cs
- CodeMemberMethod.cs
- EmbeddedMailObject.cs
- XmlCountingReader.cs
- XhtmlConformanceSection.cs
- WebServiceTypeData.cs
- ControlCachePolicy.cs
- BitmapVisualManager.cs
- XslAstAnalyzer.cs
- ParseElement.cs
- ToolStripItemGlyph.cs
- PathStreamGeometryContext.cs
- XmlSchemaObjectCollection.cs
- PenContexts.cs
- XamlFilter.cs
- shaper.cs
- PrintEvent.cs
- ConfigurationLocationCollection.cs
- InputBindingCollection.cs
- PublisherMembershipCondition.cs
- ZipFileInfoCollection.cs
- WorkflowRuntimeSection.cs
- LoginCancelEventArgs.cs
- TreeWalkHelper.cs
- UnsafeNativeMethods.cs
- DriveNotFoundException.cs
- CodeIndexerExpression.cs