Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Common / internal / materialization / compensatingcollection.cs / 1 / compensatingcollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace System.Data.Common.Internal.Materialization { ////// What we return from our materialization of a collection column must be /// exactly the type that the compilers expected when they generated the /// code that asked for it. This class wraps our enumerators and derives /// from all the possible options, covering all the bases. /// internal class CompensatingCollection: IOrderedQueryable , IOrderedEnumerable { #region private state /// /// The thing we're compensating for /// private readonly IEnumerable_source; /// /// An expression that returns the source as a constant /// private readonly Expression _expression; #endregion #region constructors public CompensatingCollection(IEnumerablesource) { _source = EntityUtil.CheckArgumentNull(source, "source"); _expression = Expression.Constant(source); } #endregion #region IEnumerable Members System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return _source.GetEnumerator(); } #endregion #region IEnumerable Members IEnumerator IEnumerable .GetEnumerator() { return _source.GetEnumerator(); } #endregion #region IOrderedEnumerable Members IOrderedEnumerable IOrderedEnumerable .CreateOrderedEnumerable (Func keySelector, IComparer comparer, bool descending) { throw EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_CreateOrderedEnumerableNotSupported); } #endregion #region IQueryable Members Type IQueryable.ElementType { get { return typeof(TElement); } } Expression IQueryable.Expression { get { return _expression; } } IQueryProvider IQueryable.Provider { get { throw EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnsupportedQueryableMethod); } } #endregion #region IQueryable Members #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace System.Data.Common.Internal.Materialization { ////// What we return from our materialization of a collection column must be /// exactly the type that the compilers expected when they generated the /// code that asked for it. This class wraps our enumerators and derives /// from all the possible options, covering all the bases. /// internal class CompensatingCollection: IOrderedQueryable , IOrderedEnumerable { #region private state /// /// The thing we're compensating for /// private readonly IEnumerable_source; /// /// An expression that returns the source as a constant /// private readonly Expression _expression; #endregion #region constructors public CompensatingCollection(IEnumerablesource) { _source = EntityUtil.CheckArgumentNull(source, "source"); _expression = Expression.Constant(source); } #endregion #region IEnumerable Members System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return _source.GetEnumerator(); } #endregion #region IEnumerable Members IEnumerator IEnumerable .GetEnumerator() { return _source.GetEnumerator(); } #endregion #region IOrderedEnumerable Members IOrderedEnumerable IOrderedEnumerable .CreateOrderedEnumerable (Func keySelector, IComparer comparer, bool descending) { throw EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_CreateOrderedEnumerableNotSupported); } #endregion #region IQueryable Members Type IQueryable.ElementType { get { return typeof(TElement); } } Expression IQueryable.Expression { get { return _expression; } } IQueryProvider IQueryable.Provider { get { throw EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnsupportedQueryableMethod); } } #endregion #region IQueryable Members #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbConnectionPoolOptions.cs
- InternalsVisibleToAttribute.cs
- EdmProviderManifest.cs
- SurrogateSelector.cs
- RecordManager.cs
- HashHelpers.cs
- Terminate.cs
- precedingquery.cs
- QilGenerator.cs
- VersionedStreamOwner.cs
- TemplateControlCodeDomTreeGenerator.cs
- TimeSpanStorage.cs
- TextTreeTextElementNode.cs
- EnumConverter.cs
- ProcessHostFactoryHelper.cs
- StructuredTypeInfo.cs
- TreeNodeStyleCollection.cs
- UntrustedRecipientException.cs
- MenuItemBindingCollection.cs
- _LazyAsyncResult.cs
- Registry.cs
- XPathBinder.cs
- _SecureChannel.cs
- SchemaAttDef.cs
- TreeIterators.cs
- URLMembershipCondition.cs
- WorkflowPersistenceService.cs
- TreeViewCancelEvent.cs
- PageClientProxyGenerator.cs
- DataGridViewBand.cs
- EntityDataSourceStatementEditorForm.cs
- Region.cs
- GenericQueueSurrogate.cs
- MultiBinding.cs
- Helpers.cs
- ConnectivityStatus.cs
- DayRenderEvent.cs
- Mouse.cs
- FontFamilyConverter.cs
- SchemaCollectionCompiler.cs
- DbConnectionInternal.cs
- DataGrid.cs
- ManipulationInertiaStartingEventArgs.cs
- BitmapEffectGroup.cs
- DefaultClaimSet.cs
- ConnectionManagementSection.cs
- figurelength.cs
- SecurityVerifiedMessage.cs
- SelectionPattern.cs
- XmlNullResolver.cs
- SmiConnection.cs
- ServiceDefaults.cs
- MatchingStyle.cs
- AppearanceEditorPart.cs
- SchemaExporter.cs
- AsynchronousChannel.cs
- VisualStyleElement.cs
- HwndHost.cs
- MailMessageEventArgs.cs
- AuthenticationManager.cs
- ReferenceList.cs
- DataSourceHelper.cs
- ByteViewer.cs
- GatewayDefinition.cs
- EnumBuilder.cs
- ExceptionTrace.cs
- RegistrationProxy.cs
- TabControlEvent.cs
- Span.cs
- SmtpDateTime.cs
- EventProxy.cs
- ColumnWidthChangedEvent.cs
- StateMachineWorkflow.cs
- ExcludeFromCodeCoverageAttribute.cs
- PenContexts.cs
- RegistrySecurity.cs
- DoubleCollection.cs
- ReverseInheritProperty.cs
- CaseStatementProjectedSlot.cs
- MatrixConverter.cs
- DataPagerFieldItem.cs
- XmlSerializerObjectSerializer.cs
- TextRunCacheImp.cs
- ComboBoxItem.cs
- SamlAuthenticationClaimResource.cs
- MultilineStringConverter.cs
- ActivityStatusChangeEventArgs.cs
- WorkflowControlClient.cs
- DataStorage.cs
- TextBoxDesigner.cs
- DPTypeDescriptorContext.cs
- _ChunkParse.cs
- CustomServiceCredentials.cs
- InheritanceContextHelper.cs
- ConfigsHelper.cs
- EventLogException.cs
- RbTree.cs
- CustomWebEventKey.cs
- ElapsedEventArgs.cs
- WebScriptMetadataMessage.cs