Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- EventMap.cs
- TraceFilter.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- HttpAsyncResult.cs
- XmlAttributeAttribute.cs
- SrgsElementFactory.cs
- Query.cs
- BinaryParser.cs
- Rss20ItemFormatter.cs
- ImageSource.cs
- RewritingSimplifier.cs
- DbConvert.cs
- SendActivityDesigner.cs
- UIntPtr.cs
- ListDictionaryInternal.cs
- WebSysDisplayNameAttribute.cs
- TypedServiceOperationListItem.cs
- SimpleLine.cs
- _NestedMultipleAsyncResult.cs
- SqlCommandSet.cs
- QilUnary.cs
- SrgsElement.cs
- CompositeDataBoundControl.cs
- MediaContext.cs
- securitycriticaldataformultiplegetandset.cs
- ProcessModuleCollection.cs
- TemplateNameScope.cs
- JapaneseCalendar.cs
- EDesignUtil.cs
- ControlIdConverter.cs
- ColorAnimationUsingKeyFrames.cs
- DesignerActionKeyboardBehavior.cs
- ReflectPropertyDescriptor.cs
- DataComponentGenerator.cs
- DataGridViewRowStateChangedEventArgs.cs
- WorkflowRuntimeServicesBehavior.cs
- DataKeyCollection.cs
- InternalConfigEventArgs.cs
- ApplicationSecurityManager.cs
- ListBoxAutomationPeer.cs
- ResXDataNode.cs
- Soap12ServerProtocol.cs
- WindowsIdentity.cs
- FormsIdentity.cs
- PointValueSerializer.cs
- CollectionAdapters.cs
- XmlSchemaComplexType.cs
- HtmlShimManager.cs
- CompilerResults.cs
- PropertyValueUIItem.cs
- SmtpDigestAuthenticationModule.cs
- PackageDigitalSignatureManager.cs
- DataColumnMappingCollection.cs
- DataGridViewColumnStateChangedEventArgs.cs
- LogicalExpressionTypeConverter.cs
- RegexMatch.cs
- DataRecordInternal.cs
- CmsInterop.cs
- ToolStripInSituService.cs
- ArgIterator.cs
- DesignerTransactionCloseEvent.cs
- SafeRegistryHandle.cs
- _CacheStreams.cs
- CellParaClient.cs
- BigInt.cs
- SchemaUtility.cs
- MultipartIdentifier.cs
- SystemMulticastIPAddressInformation.cs
- RowUpdatingEventArgs.cs
- PolyBezierSegmentFigureLogic.cs
- FixedSOMLineRanges.cs
- ItemMap.cs
- WebBrowserSiteBase.cs
- ExpressionBuilderContext.cs
- MembershipSection.cs
- HttpsTransportElement.cs
- ComEventsInfo.cs
- ActivityTypeDesigner.xaml.cs
- ResolveNameEventArgs.cs
- XmlCharacterData.cs
- LineServicesRun.cs
- httpserverutility.cs
- WebPageTraceListener.cs
- SocketManager.cs
- Walker.cs
- CollectionDataContractAttribute.cs
- SqlClientWrapperSmiStreamChars.cs
- PointAnimationUsingPath.cs
- BamlTreeUpdater.cs
- BlobPersonalizationState.cs
- PeerApplicationLaunchInfo.cs
- UInt16Storage.cs
- LineBreakRecord.cs
- SendKeys.cs
- LinkArea.cs
- LogLogRecordEnumerator.cs
- WaitHandleCannotBeOpenedException.cs
- CodeGen.cs
- IgnoreFileBuildProvider.cs
- Font.cs