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
- EntitySetBaseCollection.cs
- HttpConfigurationSystem.cs
- CustomCategoryAttribute.cs
- VirtualPathUtility.cs
- ClientBase.cs
- AsymmetricKeyExchangeDeformatter.cs
- NGCSerializer.cs
- AsymmetricKeyExchangeFormatter.cs
- _ListenerAsyncResult.cs
- SocketPermission.cs
- HttpHandlersSection.cs
- BinaryObjectInfo.cs
- SinglePageViewer.cs
- CommonObjectSecurity.cs
- XmlSchemaGroupRef.cs
- WizardSideBarListControlItemEventArgs.cs
- GeometryHitTestResult.cs
- SignerInfo.cs
- EncodingDataItem.cs
- PrintPageEvent.cs
- MethodCallConverter.cs
- OdbcFactory.cs
- Compiler.cs
- SQLInt16Storage.cs
- AbandonedMutexException.cs
- WebResourceAttribute.cs
- GradientBrush.cs
- EntityDataSourceUtil.cs
- linebase.cs
- OperationPickerDialog.cs
- PropertyKey.cs
- OciEnlistContext.cs
- InheritedPropertyChangedEventArgs.cs
- ObjectStateEntryDbDataRecord.cs
- DataSvcMapFileSerializer.cs
- PixelFormat.cs
- AutoScrollExpandMessageFilter.cs
- HandlerWithFactory.cs
- NativeRightsManagementAPIsStructures.cs
- InstanceStoreQueryResult.cs
- ContentFilePart.cs
- Utilities.cs
- OutputCacheProfileCollection.cs
- CodeAttributeDeclarationCollection.cs
- TextWriter.cs
- ConcurrentDictionary.cs
- Quad.cs
- DataSourceControlBuilder.cs
- SchemaEntity.cs
- OrderedDictionaryStateHelper.cs
- StreamWithDictionary.cs
- SystemColorTracker.cs
- FacetEnabledSchemaElement.cs
- LinkTarget.cs
- CommonXSendMessage.cs
- ProfileGroupSettings.cs
- WinFormsSecurity.cs
- SqlReferenceCollection.cs
- OpacityConverter.cs
- XmlElementAttributes.cs
- CompletionProxy.cs
- XmlTypeMapping.cs
- SessionKeyExpiredException.cs
- Activator.cs
- SpecialFolderEnumConverter.cs
- OwnerDrawPropertyBag.cs
- StylusShape.cs
- TdsParserHelperClasses.cs
- ConstraintEnumerator.cs
- SemanticResultKey.cs
- CalendarDesigner.cs
- AnnotationHighlightLayer.cs
- OleDbDataReader.cs
- WebHostedComPlusServiceHost.cs
- RadioButtonList.cs
- ComponentCollection.cs
- FontWeights.cs
- SpecularMaterial.cs
- StandardBindingCollectionElement.cs
- DataGridViewCellCollection.cs
- CheckBox.cs
- KnownBoxes.cs
- RepeaterDesigner.cs
- FigureHelper.cs
- TrustLevelCollection.cs
- AsymmetricKeyExchangeDeformatter.cs
- SoapSchemaMember.cs
- NetworkStream.cs
- TraceContextEventArgs.cs
- FontStyleConverter.cs
- KnownBoxes.cs
- DispatcherFrame.cs
- QilReference.cs
- DataGridViewRowCancelEventArgs.cs
- ItemsControlAutomationPeer.cs
- Int16.cs
- XD.cs
- BooleanAnimationBase.cs
- ControlValuePropertyAttribute.cs
- FilePresentation.cs