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
- Vector3D.cs
- RectangleConverter.cs
- AddInServer.cs
- ImmComposition.cs
- FormsAuthentication.cs
- Visual3DCollection.cs
- HwndSourceKeyboardInputSite.cs
- CreateUserWizard.cs
- ipaddressinformationcollection.cs
- Size3DConverter.cs
- LocatorManager.cs
- TextTreeObjectNode.cs
- LOSFormatter.cs
- Int32Rect.cs
- CodeTypeReference.cs
- DataGridViewTextBoxEditingControl.cs
- FileDialog_Vista_Interop.cs
- GeneralTransform3DTo2DTo3D.cs
- ToolStripMenuItemCodeDomSerializer.cs
- BoundPropertyEntry.cs
- DataTableReader.cs
- _MultipleConnectAsync.cs
- ControlHelper.cs
- SettingsProperty.cs
- CompilerScope.Storage.cs
- XmlDocumentSerializer.cs
- AppSettingsSection.cs
- PageAdapter.cs
- DataGridRowsPresenter.cs
- Border.cs
- ConfigXmlWhitespace.cs
- EventSinkHelperWriter.cs
- FileLogRecord.cs
- AddInAdapter.cs
- AdornerDecorator.cs
- ActivityCollectionMarkupSerializer.cs
- MemoryStream.cs
- CardSpaceSelector.cs
- DocumentPage.cs
- WebBrowserUriTypeConverter.cs
- ResourcesBuildProvider.cs
- WsdlContractConversionContext.cs
- DrawListViewItemEventArgs.cs
- DataServiceStreamResponse.cs
- EventListenerClientSide.cs
- ActivationServices.cs
- ExpressionPrefixAttribute.cs
- CodeGenerator.cs
- HtmlControlAdapter.cs
- FileReservationCollection.cs
- TokenizerHelper.cs
- HttpDictionary.cs
- XmlDataLoader.cs
- WebPartUtil.cs
- ControlBindingsCollection.cs
- ContractComponent.cs
- MeasureData.cs
- TrustManager.cs
- _SSPIWrapper.cs
- ECDsaCng.cs
- InputReportEventArgs.cs
- SqlVersion.cs
- _LazyAsyncResult.cs
- XsdDataContractExporter.cs
- Odbc32.cs
- TPLETWProvider.cs
- linebase.cs
- SelectionPattern.cs
- WebPartConnectionsConnectVerb.cs
- XmlDictionaryReaderQuotasElement.cs
- Synchronization.cs
- SiteMapDataSource.cs
- WebPartDescription.cs
- DoubleAnimationUsingKeyFrames.cs
- ExceptionTranslationTable.cs
- FirstMatchCodeGroup.cs
- SoapParser.cs
- DtdParser.cs
- Popup.cs
- GACMembershipCondition.cs
- Mouse.cs
- MetadataProperty.cs
- UpDownEvent.cs
- WebConfigurationHostFileChange.cs
- PassportIdentity.cs
- DataGridViewCellPaintingEventArgs.cs
- SqlOuterApplyReducer.cs
- ConfigurationLocation.cs
- MDIClient.cs
- _SingleItemRequestCache.cs
- ComponentChangingEvent.cs
- ListViewItemSelectionChangedEvent.cs
- PropertyOverridesTypeEditor.cs
- QueueNameHelper.cs
- HitTestWithGeometryDrawingContextWalker.cs
- selecteditemcollection.cs
- AssemblyBuilderData.cs
- XamlDesignerSerializationManager.cs
- XamlSerializerUtil.cs
- PassportAuthenticationEventArgs.cs