Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / ALinq / SkipQueryOptionExpression.cs / 1305376 / 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
- StrokeDescriptor.cs
- XmlSerializerFactory.cs
- Type.cs
- ConfigurationPermission.cs
- SmtpNtlmAuthenticationModule.cs
- InputLangChangeRequestEvent.cs
- XmlDocument.cs
- XPathDocumentNavigator.cs
- ComponentCommands.cs
- ParserStreamGeometryContext.cs
- DocumentationServerProtocol.cs
- TextRangeAdaptor.cs
- LicenseException.cs
- CodeGen.cs
- FixedTextView.cs
- RangeValueProviderWrapper.cs
- Accessible.cs
- ConcurrentBag.cs
- ProfileEventArgs.cs
- XmlIgnoreAttribute.cs
- BamlVersionHeader.cs
- WorkflowOperationContext.cs
- OrderedDictionary.cs
- GPRECT.cs
- EpmAttributeNameBuilder.cs
- _OverlappedAsyncResult.cs
- Privilege.cs
- TableLayoutPanelCodeDomSerializer.cs
- XmlUtf8RawTextWriter.cs
- DataViewManagerListItemTypeDescriptor.cs
- XmlWriter.cs
- CodeAttributeDeclaration.cs
- ActiveXContainer.cs
- WmlPhoneCallAdapter.cs
- ResXDataNode.cs
- DataBoundControlAdapter.cs
- FlowLayout.cs
- PeerNameRegistration.cs
- ArglessEventHandlerProxy.cs
- SubclassTypeValidatorAttribute.cs
- ContentDisposition.cs
- CssStyleCollection.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- CaretElement.cs
- MissingMemberException.cs
- MarshalDirectiveException.cs
- SqlHelper.cs
- RtfControls.cs
- EncoderFallback.cs
- TextRangeEditLists.cs
- WhitespaceReader.cs
- BaseResourcesBuildProvider.cs
- TouchEventArgs.cs
- SqlDataReaderSmi.cs
- SizeF.cs
- SmiRequestExecutor.cs
- FtpRequestCacheValidator.cs
- WebPartManager.cs
- PathSegmentCollection.cs
- SerialErrors.cs
- TrackingWorkflowEventArgs.cs
- DependsOnAttribute.cs
- CreateUserWizard.cs
- QilReplaceVisitor.cs
- GridViewRowPresenterBase.cs
- TextProperties.cs
- GacUtil.cs
- BaseAutoFormat.cs
- WindowsTitleBar.cs
- WmpBitmapEncoder.cs
- ObjectRef.cs
- HtmlHead.cs
- SystemIPInterfaceProperties.cs
- RoutedEventValueSerializer.cs
- BulletedList.cs
- Identity.cs
- XmlSchemaSimpleTypeUnion.cs
- ComponentConverter.cs
- SystemWebSectionGroup.cs
- DataDocumentXPathNavigator.cs
- Int32Animation.cs
- ConfigurationSectionGroup.cs
- ListViewHitTestInfo.cs
- TreeViewImageIndexConverter.cs
- StyleSheetComponentEditor.cs
- PageHandlerFactory.cs
- ActivitiesCollection.cs
- WarningException.cs
- SmtpLoginAuthenticationModule.cs
- EntityDataSourceValidationException.cs
- EndpointConfigContainer.cs
- GridErrorDlg.cs
- DictionaryManager.cs
- SspiSecurityToken.cs
- ConfigXmlWhitespace.cs
- StreamInfo.cs
- HwndSource.cs
- XpsFilter.cs
- UriTemplateLiteralQueryValue.cs
- AppSettingsExpressionBuilder.cs