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
- DataServiceStreamResponse.cs
- BindingWorker.cs
- XmlSchemaSubstitutionGroup.cs
- EntityDescriptor.cs
- CodePrimitiveExpression.cs
- NumberEdit.cs
- WebPartCancelEventArgs.cs
- ServicePointManagerElement.cs
- RouteItem.cs
- DESCryptoServiceProvider.cs
- DeviceContexts.cs
- ScriptRegistrationManager.cs
- ObjectToIdCache.cs
- ProcessHost.cs
- SoapInteropTypes.cs
- ProcessStartInfo.cs
- Aes.cs
- ImageSourceTypeConverter.cs
- xdrvalidator.cs
- Exceptions.cs
- sqlcontext.cs
- ServiceInstallComponent.cs
- SystemDropShadowChrome.cs
- EditorPartCollection.cs
- XmlCustomFormatter.cs
- ErrorRuntimeConfig.cs
- MediaSystem.cs
- FieldMetadata.cs
- EntityAdapter.cs
- WmlCommandAdapter.cs
- ConfigurationSectionGroupCollection.cs
- ModelPropertyImpl.cs
- ImageBrush.cs
- BitmapCacheBrush.cs
- ObjectDataSourceStatusEventArgs.cs
- PriorityBinding.cs
- WebPartManager.cs
- PointKeyFrameCollection.cs
- DispatcherObject.cs
- CodeArgumentReferenceExpression.cs
- WS2007HttpBinding.cs
- FrameworkElementFactory.cs
- TokenBasedSet.cs
- ClientScriptItemCollection.cs
- SuppressedPackageProperties.cs
- HttpClientCertificate.cs
- DictionaryEntry.cs
- PropertyChangedEventManager.cs
- DefaultCompensation.cs
- BodyWriter.cs
- GridViewColumnHeaderAutomationPeer.cs
- ComponentResourceKeyConverter.cs
- WindowsTokenRoleProvider.cs
- TypeBuilder.cs
- BitmapFrame.cs
- CollectionAdapters.cs
- LinkLabel.cs
- FrameworkRichTextComposition.cs
- IdentifierService.cs
- Bits.cs
- TransactionInterop.cs
- QilValidationVisitor.cs
- CalendarAutoFormatDialog.cs
- CodeNamespace.cs
- HtmlEmptyTagControlBuilder.cs
- SegmentTree.cs
- BindingWorker.cs
- SuspendDesigner.cs
- EventManager.cs
- DSASignatureFormatter.cs
- TextOnlyOutput.cs
- ConnectivityStatus.cs
- HtmlInputFile.cs
- SafeCryptoHandles.cs
- KernelTypeValidation.cs
- RequestTimeoutManager.cs
- PagedDataSource.cs
- MergePropertyDescriptor.cs
- SqlHelper.cs
- ToolstripProfessionalRenderer.cs
- InvokeAction.cs
- SafeProcessHandle.cs
- FieldDescriptor.cs
- SiteMapNodeCollection.cs
- DataBinder.cs
- TableItemStyle.cs
- HandleExceptionArgs.cs
- SqlDataSourceSummaryPanel.cs
- PipelineModuleStepContainer.cs
- HyperLinkField.cs
- HorizontalAlignConverter.cs
- SelectionEditor.cs
- TextDocumentView.cs
- ProtocolInformationWriter.cs
- DelegatingTypeDescriptionProvider.cs
- RegexParser.cs
- DeviceContext.cs
- PreservationFileReader.cs
- CompilerWrapper.cs
- IndexObject.cs