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
- CharKeyFrameCollection.cs
- PkcsUtils.cs
- MarkedHighlightComponent.cs
- SortedList.cs
- UserControlCodeDomTreeGenerator.cs
- XPathDocumentIterator.cs
- FileReader.cs
- CollectionType.cs
- BindingSource.cs
- DragStartedEventArgs.cs
- CheckBoxPopupAdapter.cs
- CLRBindingWorker.cs
- DbFunctionCommandTree.cs
- PinnedBufferMemoryStream.cs
- activationcontext.cs
- CodeVariableReferenceExpression.cs
- JsonSerializer.cs
- Activity.cs
- WebPartEditorCancelVerb.cs
- Int32Collection.cs
- HttpCacheVaryByContentEncodings.cs
- FontFamily.cs
- AcceptorSessionSymmetricMessageSecurityProtocol.cs
- QilStrConcatenator.cs
- RIPEMD160.cs
- StrongName.cs
- WindowsGraphicsCacheManager.cs
- WinFormsSpinner.cs
- CorruptStoreException.cs
- VectorKeyFrameCollection.cs
- SafeSecurityHelper.cs
- StringStorage.cs
- TemplateControlParser.cs
- SectionRecord.cs
- AdapterDictionary.cs
- FileCodeGroup.cs
- PartialCachingAttribute.cs
- CompilerScope.Storage.cs
- WebPartEventArgs.cs
- PreservationFileReader.cs
- filewebresponse.cs
- UriWriter.cs
- ColumnResult.cs
- CommentEmitter.cs
- FileNameEditor.cs
- DefaultEvaluationContext.cs
- TimersDescriptionAttribute.cs
- AnnotationAdorner.cs
- AuthStoreRoleProvider.cs
- Int32EqualityComparer.cs
- DesignerVerb.cs
- PrimaryKeyTypeConverter.cs
- SystemIPAddressInformation.cs
- LocalizeDesigner.cs
- SqlRowUpdatedEvent.cs
- DoWorkEventArgs.cs
- SamlNameIdentifierClaimResource.cs
- CacheRequest.cs
- TextEditorTyping.cs
- DependencyPropertyAttribute.cs
- CompareInfo.cs
- ImageSourceConverter.cs
- DbProviderManifest.cs
- ListenerElementsCollection.cs
- BitmapEffectState.cs
- CultureTable.cs
- RepeatButton.cs
- SpellerStatusTable.cs
- SecurityElement.cs
- DescendantQuery.cs
- SHA1Cng.cs
- XmlSchemaSequence.cs
- StringArrayConverter.cs
- Base64Decoder.cs
- IteratorAsyncResult.cs
- ManipulationLogic.cs
- tibetanshape.cs
- InvalidCastException.cs
- DynamicMethod.cs
- CriticalHandle.cs
- KeyPullup.cs
- DataGridPageChangedEventArgs.cs
- NumericExpr.cs
- SpellerStatusTable.cs
- ResourcePermissionBase.cs
- ProcessThreadDesigner.cs
- MulticastOption.cs
- PropertyTabAttribute.cs
- HttpPostClientProtocol.cs
- RowBinding.cs
- ChannelHandler.cs
- DriveInfo.cs
- FileUpload.cs
- SqlMethodAttribute.cs
- FastEncoder.cs
- XmlSchemaGroup.cs
- HttpListenerResponse.cs
- OpenTypeLayoutCache.cs
- PointValueSerializer.cs
- ReversePositionQuery.cs