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
- XmlIlGenerator.cs
- TrackBarRenderer.cs
- SkewTransform.cs
- KeyValueConfigurationElement.cs
- ServiceOperation.cs
- XmlNodeChangedEventManager.cs
- BrowserInteropHelper.cs
- MatrixValueSerializer.cs
- FamilyTypefaceCollection.cs
- ClickablePoint.cs
- TypeBrowser.xaml.cs
- RecordsAffectedEventArgs.cs
- ChangePassword.cs
- HttpStreams.cs
- PerspectiveCamera.cs
- SettingsAttributeDictionary.cs
- _TransmitFileOverlappedAsyncResult.cs
- PopupRoot.cs
- RoleBoolean.cs
- StackSpiller.Temps.cs
- PageBuildProvider.cs
- ObjectTypeMapping.cs
- XmlSchemaGroupRef.cs
- ForceCopyBuildProvider.cs
- StringPropertyBuilder.cs
- CodeExpressionRuleDeclaration.cs
- _HeaderInfoTable.cs
- WaitHandle.cs
- OutputCacheSettings.cs
- StylusPoint.cs
- DataGridViewRowStateChangedEventArgs.cs
- Privilege.cs
- SoapObjectReader.cs
- OdbcReferenceCollection.cs
- RuntimeResourceSet.cs
- KoreanCalendar.cs
- SystemIPGlobalProperties.cs
- ThemeableAttribute.cs
- XmlUtf8RawTextWriter.cs
- CfgParser.cs
- PkcsUtils.cs
- ArgumentValidation.cs
- DataContractJsonSerializer.cs
- DataRowExtensions.cs
- Asn1IntegerConverter.cs
- SupportsEventValidationAttribute.cs
- TransformerConfigurationWizardBase.cs
- XPathScanner.cs
- ContainerTracking.cs
- DocumentEventArgs.cs
- FixedSOMSemanticBox.cs
- PointLight.cs
- MappingMetadataHelper.cs
- JournalEntryStack.cs
- DetailsViewPagerRow.cs
- EventSinkActivityDesigner.cs
- InternalConfigRoot.cs
- RepeaterCommandEventArgs.cs
- XmlSchemaExternal.cs
- LocalizationCodeDomSerializer.cs
- ClientScriptManagerWrapper.cs
- OleServicesContext.cs
- ByteStack.cs
- View.cs
- RoutedPropertyChangedEventArgs.cs
- CleanUpVirtualizedItemEventArgs.cs
- BigInt.cs
- AddInContractAttribute.cs
- DateTimeSerializationSection.cs
- XmlUnspecifiedAttribute.cs
- DeleteWorkflowOwnerCommand.cs
- ShaderEffect.cs
- HttpClientChannel.cs
- DayRenderEvent.cs
- HttpRuntime.cs
- ButtonChrome.cs
- ObjectAssociationEndMapping.cs
- RecordConverter.cs
- Brush.cs
- OdbcException.cs
- Dictionary.cs
- ChtmlSelectionListAdapter.cs
- Decoder.cs
- CatalogPartCollection.cs
- HttpCapabilitiesEvaluator.cs
- __Filters.cs
- ToolboxComponentsCreatedEventArgs.cs
- InstrumentationTracker.cs
- ConsumerConnectionPointCollection.cs
- ModifierKeysConverter.cs
- MobileControlDesigner.cs
- CheckBoxPopupAdapter.cs
- PreservationFileReader.cs
- StringFunctions.cs
- EventHandlersStore.cs
- DetailsView.cs
- SqlError.cs
- CroppedBitmap.cs
- CheckableControlBaseAdapter.cs
- TextDpi.cs