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
- ValidationManager.cs
- TextRangeBase.cs
- ParallelLoopState.cs
- CommandBinding.cs
- Vector3DAnimation.cs
- ConfigXmlSignificantWhitespace.cs
- _CommandStream.cs
- ConfigurationProperty.cs
- SqlTypeSystemProvider.cs
- ImageList.cs
- CommonGetThemePartSize.cs
- DefaultBinder.cs
- PasswordRecovery.cs
- ListDataHelper.cs
- ElementMarkupObject.cs
- GridToolTip.cs
- ColumnReorderedEventArgs.cs
- GPPOINTF.cs
- ArrayElementGridEntry.cs
- UnrecognizedPolicyAssertionElement.cs
- Viewport3DVisual.cs
- ElementMarkupObject.cs
- PhysicalOps.cs
- PositiveTimeSpanValidator.cs
- ModuleElement.cs
- MailAddressCollection.cs
- DesignerForm.cs
- SmiXetterAccessMap.cs
- MultiSelector.cs
- BaseCollection.cs
- SafeNativeMethods.cs
- HtmlInputSubmit.cs
- FixedDocumentPaginator.cs
- RoleManagerSection.cs
- ListViewGroupItemCollection.cs
- DPCustomTypeDescriptor.cs
- QilLiteral.cs
- LayoutTable.cs
- XmlNodeReader.cs
- altserialization.cs
- CodeFieldReferenceExpression.cs
- TextBoxAutoCompleteSourceConverter.cs
- LicenseManager.cs
- GroupBoxRenderer.cs
- VirtualPathProvider.cs
- WorkflowShape.cs
- QueueException.cs
- EnumerableRowCollection.cs
- XmlAnyElementAttribute.cs
- CompoundFileIOPermission.cs
- SmiGettersStream.cs
- SafeLocalMemHandle.cs
- SystemIcmpV6Statistics.cs
- RectConverter.cs
- BitmapInitialize.cs
- DeferredTextReference.cs
- Pair.cs
- ProcessProtocolHandler.cs
- New.cs
- ScaleTransform3D.cs
- CacheVirtualItemsEvent.cs
- DbBuffer.cs
- ArgumentsParser.cs
- ColumnResizeAdorner.cs
- ServiceHttpModule.cs
- DoubleLinkListEnumerator.cs
- ClientData.cs
- NumberFormatInfo.cs
- ColumnMapTranslator.cs
- DesignerView.xaml.cs
- ControlIdConverter.cs
- WebBaseEventKeyComparer.cs
- HostProtectionPermission.cs
- DbDataAdapter.cs
- DesignerTransaction.cs
- FieldInfo.cs
- XmlCodeExporter.cs
- ResourceDescriptionAttribute.cs
- AsmxEndpointPickerExtension.cs
- Column.cs
- COMException.cs
- StylusButtonCollection.cs
- TripleDES.cs
- CommandBindingCollection.cs
- EntityModelSchemaGenerator.cs
- QuaternionConverter.cs
- Rotation3DKeyFrameCollection.cs
- WebPartManager.cs
- ObjectPersistData.cs
- XmlnsCache.cs
- MatrixCamera.cs
- WebControlsSection.cs
- BindingList.cs
- DialogResultConverter.cs
- _Events.cs
- FormsAuthenticationCredentials.cs
- LicenseException.cs
- RSAOAEPKeyExchangeDeformatter.cs
- _IPv6Address.cs
- TemplatedMailWebEventProvider.cs