Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- WebPageTraceListener.cs
- SqlError.cs
- XmlSchemaNotation.cs
- DirectoryInfo.cs
- _SslState.cs
- NetworkAddressChange.cs
- UniqueID.cs
- ThicknessAnimationUsingKeyFrames.cs
- TypeConverterAttribute.cs
- PolygonHotSpot.cs
- StringUtil.cs
- ThemeableAttribute.cs
- QueryableDataSourceHelper.cs
- Wildcard.cs
- DecimalConverter.cs
- SymmetricSecurityProtocol.cs
- HostedImpersonationContext.cs
- ValidatorCompatibilityHelper.cs
- CodeArgumentReferenceExpression.cs
- CompositeActivityCodeGenerator.cs
- RowCache.cs
- CodeGenerator.cs
- HierarchicalDataBoundControlAdapter.cs
- VBCodeProvider.cs
- DataMemberAttribute.cs
- ProviderConnectionPoint.cs
- ActivityAction.cs
- MailWebEventProvider.cs
- ConfigXmlText.cs
- Input.cs
- SimpleWebHandlerParser.cs
- HttpContext.cs
- CounterCreationData.cs
- StringUtil.cs
- OrderedDictionary.cs
- BooleanAnimationUsingKeyFrames.cs
- ColorConvertedBitmap.cs
- ContractType.cs
- ThemeableAttribute.cs
- WhitespaceRuleReader.cs
- IFlowDocumentViewer.cs
- TemplateBindingExtensionConverter.cs
- DataSet.cs
- Bezier.cs
- CodeDelegateCreateExpression.cs
- ChildChangedEventArgs.cs
- TracingConnectionInitiator.cs
- MailFileEditor.cs
- RequestCachePolicy.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- InkSerializer.cs
- KeyConverter.cs
- ZipIOExtraFieldZip64Element.cs
- CodeMemberEvent.cs
- DataKey.cs
- CryptoKeySecurity.cs
- CodeGenerator.cs
- JoinElimination.cs
- MsmqInputChannelBase.cs
- EntityContainerEntitySetDefiningQuery.cs
- TdsParameterSetter.cs
- Ray3DHitTestResult.cs
- TextTreeExtractElementUndoUnit.cs
- QueryCreatedEventArgs.cs
- CompleteWizardStep.cs
- XmlSchemaObjectTable.cs
- Parameter.cs
- SynchronizingStream.cs
- SoapCodeExporter.cs
- DataControlFieldHeaderCell.cs
- TraceData.cs
- ServiceEndpoint.cs
- DependentTransaction.cs
- _LazyAsyncResult.cs
- MemberPath.cs
- AdapterDictionary.cs
- PageParser.cs
- xmlfixedPageInfo.cs
- DataRecord.cs
- Vector3DConverter.cs
- PersonalizationStateInfoCollection.cs
- cookiecontainer.cs
- Color.cs
- SessionStateItemCollection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- MutableAssemblyCacheEntry.cs
- DataGridViewControlCollection.cs
- Message.cs
- InlineCollection.cs
- FileLogRecord.cs
- Int32Converter.cs
- Helpers.cs
- WebBrowser.cs
- Wildcard.cs
- ZipPackagePart.cs
- ModelVisual3D.cs
- SecurityKeyUsage.cs
- Propagator.ExtentPlaceholderCreator.cs
- regiisutil.cs
- CompositeKey.cs