Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ALinq / TakeQueryOptionExpression.cs / 1 / 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. /// // 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
- Version.cs
- ContentPropertyAttribute.cs
- ElementsClipboardData.cs
- AccessDataSourceDesigner.cs
- DirectionalLight.cs
- JournalEntryStack.cs
- DoubleAnimationBase.cs
- ToolboxItemSnapLineBehavior.cs
- LabelLiteral.cs
- srgsitem.cs
- ActivityWithResultValueSerializer.cs
- SqlTopReducer.cs
- StorageMappingItemCollection.cs
- Switch.cs
- JsonWriter.cs
- DataServiceHost.cs
- ClientRoleProvider.cs
- RunInstallerAttribute.cs
- TypeLibraryHelper.cs
- DataSourceCache.cs
- EUCJPEncoding.cs
- SapiRecognizer.cs
- AssemblyBuilder.cs
- InputProcessorProfilesLoader.cs
- XmlnsDefinitionAttribute.cs
- _UriSyntax.cs
- ControlValuePropertyAttribute.cs
- streamingZipPartStream.cs
- XmlExpressionDumper.cs
- InputLanguageEventArgs.cs
- StyleModeStack.cs
- XmlSchemaCompilationSettings.cs
- MailMessageEventArgs.cs
- EllipseGeometry.cs
- EmptyElement.cs
- XmlCompatibilityReader.cs
- OptimizerPatterns.cs
- OleDbCommand.cs
- MissingFieldException.cs
- DataColumnCollection.cs
- WhitespaceRuleReader.cs
- TextPointerBase.cs
- ToolStripItemEventArgs.cs
- BamlLocalizableResourceKey.cs
- IImplicitResourceProvider.cs
- AnimationStorage.cs
- ControlType.cs
- MbpInfo.cs
- ResourcesGenerator.cs
- FormViewCommandEventArgs.cs
- FormsAuthenticationModule.cs
- SplitContainer.cs
- Exceptions.cs
- SecurityTokenResolver.cs
- ExtendedPropertyCollection.cs
- CodeMethodInvokeExpression.cs
- JoinQueryOperator.cs
- SweepDirectionValidation.cs
- ListViewSortEventArgs.cs
- PopupRootAutomationPeer.cs
- HwndHost.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ResourceAssociationTypeEnd.cs
- InvokeMethodDesigner.xaml.cs
- BamlRecords.cs
- CallSite.cs
- DataControlField.cs
- DispatcherFrame.cs
- TransactionFlowElement.cs
- FileNotFoundException.cs
- Bold.cs
- DataGridViewSelectedCellCollection.cs
- StreamResourceInfo.cs
- AsymmetricAlgorithm.cs
- xmlglyphRunInfo.cs
- PaintValueEventArgs.cs
- EncodingNLS.cs
- ThreadLocal.cs
- TheQuery.cs
- WebControlAdapter.cs
- DrawingAttributesDefaultValueFactory.cs
- XmlComment.cs
- TreeNodeStyle.cs
- Assert.cs
- Fx.cs
- CodeMethodInvokeExpression.cs
- DataGridViewCheckBoxCell.cs
- ClientScriptItem.cs
- UniformGrid.cs
- GridViewColumn.cs
- DataColumnMappingCollection.cs
- GuidelineCollection.cs
- __TransparentProxy.cs
- mediaclock.cs
- InvalidEnumArgumentException.cs
- QuaternionRotation3D.cs
- AddToCollection.cs
- Ticks.cs
- ThemeableAttribute.cs
- ConnectionStringEditor.cs