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
- SmiMetaDataProperty.cs
- HwndHostAutomationPeer.cs
- DoubleStorage.cs
- XmlAnyElementAttributes.cs
- Timeline.cs
- ThreadBehavior.cs
- FrugalList.cs
- DefaultMemberAttribute.cs
- EntityTemplateUserControl.cs
- lengthconverter.cs
- TabletDeviceInfo.cs
- VScrollProperties.cs
- PeerTransportSecuritySettings.cs
- GridViewCommandEventArgs.cs
- MsmqIntegrationMessageProperty.cs
- ItemsControl.cs
- MatrixAnimationUsingPath.cs
- SQLChars.cs
- FixedSOMPageElement.cs
- MergePropertyDescriptor.cs
- WorkflowDefinitionContext.cs
- PrintControllerWithStatusDialog.cs
- WebPartZoneCollection.cs
- AnimationClockResource.cs
- XmlFormatReaderGenerator.cs
- HttpListenerContext.cs
- QilSortKey.cs
- invalidudtexception.cs
- TemplateControlBuildProvider.cs
- DataGridViewMethods.cs
- ConnectionsZone.cs
- LocalizableResourceBuilder.cs
- UnknownWrapper.cs
- DiscoveryClientDocuments.cs
- wpf-etw.cs
- DataSourceExpressionCollection.cs
- ClickablePoint.cs
- DataColumn.cs
- COM2TypeInfoProcessor.cs
- FlowchartStart.xaml.cs
- ResourceManagerWrapper.cs
- TemplatedAdorner.cs
- MexHttpBindingCollectionElement.cs
- Lazy.cs
- Group.cs
- WebPartVerbsEventArgs.cs
- EncryptedData.cs
- IsolatedStorageFile.cs
- LineServicesRun.cs
- DataGridViewCellStyle.cs
- TabControlAutomationPeer.cs
- TableLayoutSettings.cs
- OverrideMode.cs
- SafeBitVector32.cs
- LogLogRecordEnumerator.cs
- GridItem.cs
- BindableTemplateBuilder.cs
- LingerOption.cs
- DataGridViewToolTip.cs
- Buffer.cs
- LocalizeDesigner.cs
- SafePEFileHandle.cs
- SortKey.cs
- ObjectDataSourceChooseMethodsPanel.cs
- ScriptControlManager.cs
- FilePrompt.cs
- TrackingProfile.cs
- ToolStripItemRenderEventArgs.cs
- ScrollEventArgs.cs
- VarRefManager.cs
- Hashtable.cs
- UDPClient.cs
- ValidationResult.cs
- StorageComplexPropertyMapping.cs
- DesignerActionItem.cs
- DrawListViewSubItemEventArgs.cs
- DbConnectionStringBuilder.cs
- ArgIterator.cs
- SecurityPermission.cs
- printdlgexmarshaler.cs
- FontFamily.cs
- ListBoxItem.cs
- SelectionRange.cs
- PrincipalPermissionMode.cs
- TreeNodeClickEventArgs.cs
- MetafileHeaderEmf.cs
- PhysicalFontFamily.cs
- DependencyObjectCodeDomSerializer.cs
- ObjectListField.cs
- MetadataUtilsSmi.cs
- SolidBrush.cs
- ListArgumentProvider.cs
- ObjectItemCollection.cs
- StatusBarItemAutomationPeer.cs
- DataGridViewComboBoxCell.cs
- UpdateExpressionVisitor.cs
- Win32.cs
- Bits.cs
- FrameworkObject.cs
- errorpatternmatcher.cs