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 / SkipQueryOptionExpression.cs / 1 / 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
- SqlDataSourceEnumerator.cs
- Stackframe.cs
- HttpHandlerAction.cs
- CodeDefaultValueExpression.cs
- TextElementEditingBehaviorAttribute.cs
- ActivitySurrogateSelector.cs
- SerializationFieldInfo.cs
- SafeUserTokenHandle.cs
- DispatcherObject.cs
- PropertyToken.cs
- EventLogEntryCollection.cs
- X509IssuerSerialKeyIdentifierClause.cs
- ThreadStateException.cs
- RepeaterItemCollection.cs
- NativeMethods.cs
- StrongNameKeyPair.cs
- ObjectConverter.cs
- FixUpCollection.cs
- HealthMonitoringSectionHelper.cs
- RenderContext.cs
- EmptyQuery.cs
- ListenerConfig.cs
- XmlCustomFormatter.cs
- Expression.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- DataGridLinkButton.cs
- XhtmlCssHandler.cs
- ConfigXmlText.cs
- DispatchWrapper.cs
- HttpCapabilitiesSectionHandler.cs
- DirectoryInfo.cs
- SqlDataRecord.cs
- DataGridViewColumnCollection.cs
- EditingScopeUndoUnit.cs
- peersecurityelement.cs
- MailDefinition.cs
- ClientOptions.cs
- RepeatButton.cs
- IOException.cs
- CalendarData.cs
- DataViewManager.cs
- SoapSchemaImporter.cs
- FileSecurity.cs
- ProjectionPruner.cs
- DataGridViewTextBoxColumn.cs
- ResourceLoader.cs
- AbsoluteQuery.cs
- ListViewInsertionMark.cs
- ConfigurationPermission.cs
- CodeNamespaceImportCollection.cs
- HtmlMeta.cs
- URLMembershipCondition.cs
- TraceProvider.cs
- ToolStripComboBox.cs
- FrameworkReadOnlyPropertyMetadata.cs
- TimeSpanParse.cs
- CodeTryCatchFinallyStatement.cs
- PeerApplication.cs
- DataGridView.cs
- ConditionCollection.cs
- Pkcs7Signer.cs
- TextEndOfSegment.cs
- PriorityQueue.cs
- DataRecordInternal.cs
- SyndicationFeedFormatter.cs
- GestureRecognitionResult.cs
- DataServiceContext.cs
- Size3DConverter.cs
- MatcherBuilder.cs
- GifBitmapDecoder.cs
- TimersDescriptionAttribute.cs
- AnonymousIdentificationSection.cs
- AppLevelCompilationSectionCache.cs
- ValuePattern.cs
- WindowsFormsSynchronizationContext.cs
- DbMetaDataFactory.cs
- TreeNodeEventArgs.cs
- PenThreadWorker.cs
- Asn1IntegerConverter.cs
- StylusPointProperty.cs
- Utility.cs
- UnmanagedMarshal.cs
- JsonReaderWriterFactory.cs
- TextBreakpoint.cs
- GridViewDeleteEventArgs.cs
- SectionVisual.cs
- CodeCommentStatement.cs
- RadioButtonStandardAdapter.cs
- HtmlElement.cs
- PingReply.cs
- Propagator.cs
- MessageBox.cs
- ExpressionLink.cs
- PageWrapper.cs
- LinkedResource.cs
- HtmlTable.cs
- SQLInt32.cs
- Avt.cs
- TypeSystem.cs
- HwndMouseInputProvider.cs