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
- MetadataSource.cs
- InstanceLockLostException.cs
- DateRangeEvent.cs
- CodeDirectionExpression.cs
- AutoSizeToolBoxItem.cs
- RtfToken.cs
- HelpEvent.cs
- WmlTextBoxAdapter.cs
- PrintDialog.cs
- XsdDuration.cs
- DockAndAnchorLayout.cs
- Cursors.cs
- HtmlMeta.cs
- AsyncPostBackErrorEventArgs.cs
- HostedHttpContext.cs
- PackagePartCollection.cs
- MouseGestureValueSerializer.cs
- WSHttpTransportSecurityElement.cs
- DrawingCollection.cs
- ControlEvent.cs
- MethodExpr.cs
- HashCodeCombiner.cs
- MetadataCollection.cs
- XmlNode.cs
- HtmlFormParameterReader.cs
- MetaModel.cs
- DiscoveryClientProtocol.cs
- DataServiceSaveChangesEventArgs.cs
- CodeMethodReturnStatement.cs
- nulltextnavigator.cs
- QilTypeChecker.cs
- StringSorter.cs
- XmlAttributes.cs
- RecognitionResult.cs
- SerializationStore.cs
- MonitorWrapper.cs
- WebUtility.cs
- TableProviderWrapper.cs
- OdbcDataAdapter.cs
- ApplyImportsAction.cs
- QuaternionConverter.cs
- ItemList.cs
- TdsParserHelperClasses.cs
- DecimalAnimationUsingKeyFrames.cs
- DbProviderFactory.cs
- ToolStripRenderer.cs
- XappLauncher.cs
- IpcManager.cs
- CollectionViewSource.cs
- InternalPermissions.cs
- BindableTemplateBuilder.cs
- MemoryStream.cs
- EmptyControlCollection.cs
- _TLSstream.cs
- ObjRef.cs
- GenericParameterDataContract.cs
- PersonalizationStateInfo.cs
- CreateUserWizardStep.cs
- InputDevice.cs
- SafeRightsManagementQueryHandle.cs
- SystemEvents.cs
- TemplatedWizardStep.cs
- UpdatePanelTriggerCollection.cs
- RegisteredDisposeScript.cs
- TargetConverter.cs
- RenamedEventArgs.cs
- HttpConfigurationSystem.cs
- HttpInputStream.cs
- XmlSchemaComplexContentExtension.cs
- Registry.cs
- ApplicationGesture.cs
- X509IssuerSerialKeyIdentifierClause.cs
- HtmlUtf8RawTextWriter.cs
- PassportPrincipal.cs
- SoapCodeExporter.cs
- DataGridState.cs
- EntityUtil.cs
- DbMetaDataCollectionNames.cs
- SingleBodyParameterMessageFormatter.cs
- SetterBaseCollection.cs
- KeyTimeConverter.cs
- WorkflowMarkupSerializer.cs
- AxisAngleRotation3D.cs
- StringBuilder.cs
- PropertyMappingExceptionEventArgs.cs
- WorkflowDesignerColors.cs
- InternalsVisibleToAttribute.cs
- StrongNamePublicKeyBlob.cs
- DeferredTextReference.cs
- GeneralTransformGroup.cs
- PartitionResolver.cs
- DocumentSequence.cs
- Enum.cs
- ConstructorBuilder.cs
- BitmapEncoder.cs
- WebExceptionStatus.cs
- RuleInfoComparer.cs
- CacheSection.cs
- DrawingBrush.cs
- SoapEnumAttribute.cs