Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ALinq / SkipQueryOptionExpression.cs / 2 / SkipQueryOptionExpression.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Respresents a skip 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 skip query option. /// [DebuggerDisplay("SkipQueryOptionExpression {SkipAmount}")] internal class SkipQueryOptionExpression : QueryOptionExpression { ///amount to skip private ConstantExpression skipAmount; ////// Creates a SkipQueryOption expression /// /// the return type of the expression /// the query option value internal SkipQueryOptionExpression(Type type, ConstantExpression skipAmount) : base((ExpressionType)ResourceExpressionType.SkipQueryOption, type) { this.skipAmount = skipAmount; } ////// query option value /// internal ConstantExpression SkipAmount { get { return this.skipAmount; } } ////// 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.skipAmount != null, "this.skipAmount != null"); Debug.Assert( this.skipAmount.Type == typeof(int), "this.skipAmount.Type == typeof(int) -- otherwise it wouldn't have matched the Enumerable.Skip(source, int count) signature"); int thisValue = (int)this.skipAmount.Value; int previousValue = (int)((SkipQueryOptionExpression)previous).skipAmount.Value; return new SkipQueryOptionExpression(this.Type, Expression.Constant(thisValue + previousValue, typeof(int))); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //expression with this one. /// // Copyright (c) Microsoft Corporation. All rights reserved. // //// Respresents a skip 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 skip query option. /// [DebuggerDisplay("SkipQueryOptionExpression {SkipAmount}")] internal class SkipQueryOptionExpression : QueryOptionExpression { ///amount to skip private ConstantExpression skipAmount; ////// Creates a SkipQueryOption expression /// /// the return type of the expression /// the query option value internal SkipQueryOptionExpression(Type type, ConstantExpression skipAmount) : base((ExpressionType)ResourceExpressionType.SkipQueryOption, type) { this.skipAmount = skipAmount; } ////// query option value /// internal ConstantExpression SkipAmount { get { return this.skipAmount; } } ////// 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.skipAmount != null, "this.skipAmount != null"); Debug.Assert( this.skipAmount.Type == typeof(int), "this.skipAmount.Type == typeof(int) -- otherwise it wouldn't have matched the Enumerable.Skip(source, int count) signature"); int thisValue = (int)this.skipAmount.Value; int previousValue = (int)((SkipQueryOptionExpression)previous).skipAmount.Value; return new SkipQueryOptionExpression(this.Type, Expression.Constant(thisValue + previousValue, typeof(int))); } } } // 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
- NotSupportedException.cs
- AtlasWeb.Designer.cs
- BuildResultCache.cs
- VisualCollection.cs
- XmlFormatReaderGenerator.cs
- BitmapScalingModeValidation.cs
- Hashtable.cs
- InvokeMethodActivity.cs
- RichTextBox.cs
- EnumerationRangeValidationUtil.cs
- StrokeCollectionConverter.cs
- HttpDebugHandler.cs
- ReaderWriterLockWrapper.cs
- CommandHelper.cs
- FrameworkElement.cs
- TextDecorationCollectionConverter.cs
- WizardPanel.cs
- SqlColumnizer.cs
- WeakReferenceEnumerator.cs
- FormParameter.cs
- CodeTypeReferenceCollection.cs
- TimelineGroup.cs
- AsyncSerializedWorker.cs
- InvalidTimeZoneException.cs
- SecurityTokenRequirement.cs
- IriParsingElement.cs
- ResourceDescriptionAttribute.cs
- Debug.cs
- ISO2022Encoding.cs
- DPTypeDescriptorContext.cs
- TrackingAnnotationCollection.cs
- XmlReflectionImporter.cs
- SocketPermission.cs
- DataGridAutoFormat.cs
- InfoCardCryptoHelper.cs
- TextEffectCollection.cs
- UserNameSecurityTokenProvider.cs
- UnhandledExceptionEventArgs.cs
- SizeAnimationClockResource.cs
- RouteParameter.cs
- TextMessageEncodingBindingElement.cs
- ArrayWithOffset.cs
- OperationParameterInfo.cs
- HttpApplicationFactory.cs
- Models.cs
- FontCollection.cs
- ExpressionEditor.cs
- TimersDescriptionAttribute.cs
- AssociationSet.cs
- IsolatedStorageFileStream.cs
- WebPartDisplayMode.cs
- Size.cs
- DataListGeneralPage.cs
- DirectoryInfo.cs
- codemethodreferenceexpression.cs
- WorkerProcess.cs
- IssuedTokenClientElement.cs
- SQLBoolean.cs
- DbMetaDataColumnNames.cs
- OracleParameterBinding.cs
- ErrorStyle.cs
- ErrorHandler.cs
- EntityDescriptor.cs
- Model3D.cs
- DesignerListAdapter.cs
- WebControlAdapter.cs
- FunctionImportElement.cs
- ClientRoleProvider.cs
- OleDbConnectionInternal.cs
- assemblycache.cs
- mansign.cs
- FileDataSourceCache.cs
- Stylesheet.cs
- PrintPreviewGraphics.cs
- BufferBuilder.cs
- XamlToRtfWriter.cs
- FormViewInsertedEventArgs.cs
- RawTextInputReport.cs
- Button.cs
- RelationshipEndMember.cs
- MetadataSerializer.cs
- NetworkCredential.cs
- HttpModulesSection.cs
- UniformGrid.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- XmlQueryTypeFactory.cs
- CommandManager.cs
- StylusPlugInCollection.cs
- NamedObject.cs
- MultiPropertyDescriptorGridEntry.cs
- PeerName.cs
- ClientConfigurationSystem.cs
- MobileControlDesigner.cs
- SoapConverter.cs
- RightNameExpirationInfoPair.cs
- AttributeQuery.cs
- TextTrailingWordEllipsis.cs
- MsmqIntegrationReceiveParameters.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- DefaultExpressionVisitor.cs