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
- RepeatBehaviorConverter.cs
- DataBindingHandlerAttribute.cs
- XmlWriterTraceListener.cs
- DataObjectSettingDataEventArgs.cs
- ResolveDuplexCD1AsyncResult.cs
- Site.cs
- ProxyElement.cs
- DiscoveryProxy.cs
- SchemaNotation.cs
- AutomationEventArgs.cs
- OpCopier.cs
- SystemNetHelpers.cs
- IndexerNameAttribute.cs
- GuidConverter.cs
- SubpageParagraph.cs
- ObjectDataSourceFilteringEventArgs.cs
- RestHandler.cs
- EntityContainerEmitter.cs
- AbstractDataSvcMapFileLoader.cs
- GeometryGroup.cs
- StructuredProperty.cs
- SafeJobHandle.cs
- InstanceContextManager.cs
- MarkupWriter.cs
- SqlWorkflowInstanceStore.cs
- WindowsListBox.cs
- TreeNodeStyle.cs
- GeneralTransform3D.cs
- PartialClassGenerationTask.cs
- CorrelationManager.cs
- ListItemViewControl.cs
- BaseAsyncResult.cs
- ContentPresenter.cs
- SafeTimerHandle.cs
- SQLDecimalStorage.cs
- OptimalBreakSession.cs
- WebConfigurationManager.cs
- HMACSHA512.cs
- SystemResourceKey.cs
- WindowsUserNameCachingSecurityTokenAuthenticator.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- CommentAction.cs
- TemplateApplicationHelper.cs
- ProxyHwnd.cs
- UnmanagedMarshal.cs
- ExecutionEngineException.cs
- SoapObjectWriter.cs
- InteropAutomationProvider.cs
- SpecialFolderEnumConverter.cs
- ApplicationTrust.cs
- BrowserCapabilitiesFactory.cs
- EntityDataSourceContextDisposingEventArgs.cs
- Baml2006Reader.cs
- CodeDomConfigurationHandler.cs
- ServiceDesigner.xaml.cs
- Bezier.cs
- TableLayoutStyleCollection.cs
- OperationBehaviorAttribute.cs
- oledbconnectionstring.cs
- TextServicesCompartment.cs
- SharedDp.cs
- CodeTypeOfExpression.cs
- PolyBezierSegment.cs
- FactoryMaker.cs
- ObjectKeyFrameCollection.cs
- DataFieldConverter.cs
- HtmlWindowCollection.cs
- HtmlInputPassword.cs
- OptimalTextSource.cs
- UserControl.cs
- FontFamilyIdentifier.cs
- EdmEntityTypeAttribute.cs
- XmlNullResolver.cs
- MailAddress.cs
- WriteLine.cs
- DataGridRowAutomationPeer.cs
- SendMailErrorEventArgs.cs
- CompilerWrapper.cs
- SchemaDeclBase.cs
- HotSpotCollection.cs
- _DisconnectOverlappedAsyncResult.cs
- XmlObjectSerializer.cs
- TypeLibConverter.cs
- RelationshipFixer.cs
- DbExpressionBuilder.cs
- TreeIterators.cs
- CharacterMetricsDictionary.cs
- SafeArrayTypeMismatchException.cs
- XmlSchemaGroupRef.cs
- MetadataWorkspace.cs
- Lazy.cs
- BufferedReadStream.cs
- XmlRawWriter.cs
- TextContainerHelper.cs
- FactoryMaker.cs
- StandardCommands.cs
- HttpResponseBase.cs
- LambdaCompiler.Binary.cs
- WorkflowServiceAttributesTypeConverter.cs
- AspCompat.cs