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
- Token.cs
- LocationChangedEventArgs.cs
- ToolStripCustomTypeDescriptor.cs
- SingleStorage.cs
- AutomationTextAttribute.cs
- IntSecurity.cs
- ResourceProperty.cs
- ListControlDesigner.cs
- EFAssociationProvider.cs
- StoreContentChangedEventArgs.cs
- ReadingWritingEntityEventArgs.cs
- NavigationEventArgs.cs
- HwndStylusInputProvider.cs
- FixedSOMLineRanges.cs
- ToolStripDropTargetManager.cs
- LoadGrammarCompletedEventArgs.cs
- ListenDesigner.cs
- XmlEventCache.cs
- DataViewManager.cs
- StringBuilder.cs
- QueueSurrogate.cs
- xml.cs
- ConfigurationElementCollection.cs
- NativeMethods.cs
- EntityDescriptor.cs
- TdsParser.cs
- StickyNote.cs
- TrustManagerPromptUI.cs
- TemplateModeChangedEventArgs.cs
- SqlCommandSet.cs
- KeyTime.cs
- ContextBase.cs
- log.cs
- Material.cs
- NavigationWindowAutomationPeer.cs
- AutomationElement.cs
- COM2PictureConverter.cs
- TreeView.cs
- Util.cs
- _SingleItemRequestCache.cs
- ColorConvertedBitmap.cs
- Byte.cs
- PropertyBuilder.cs
- DataServiceRequest.cs
- TargetParameterCountException.cs
- PreviewKeyDownEventArgs.cs
- ActivityWithResultWrapper.cs
- ISFClipboardData.cs
- ResolveCriteria11.cs
- VectorCollectionValueSerializer.cs
- Clock.cs
- FileVersionInfo.cs
- CodeSnippetTypeMember.cs
- StringUtil.cs
- JsonFormatMapping.cs
- LookupBindingPropertiesAttribute.cs
- SqlInfoMessageEvent.cs
- CapabilitiesRule.cs
- IxmlLineInfo.cs
- AppDomainGrammarProxy.cs
- ContractAdapter.cs
- UrlMapping.cs
- ServiceDocument.cs
- ResourceDictionaryCollection.cs
- OdbcPermission.cs
- ToggleProviderWrapper.cs
- DesignTimeParseData.cs
- SafeRegistryHandle.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- BuilderElements.cs
- MultilineStringEditor.cs
- SelectionPattern.cs
- _Events.cs
- LabelLiteral.cs
- XamlReader.cs
- HttpClientProtocol.cs
- TextAutomationPeer.cs
- HTMLTagNameToTypeMapper.cs
- AuthorizationRuleCollection.cs
- TextPointer.cs
- Subset.cs
- RealizedColumnsBlock.cs
- EntitySqlQueryBuilder.cs
- XslVisitor.cs
- AutomationAttributeInfo.cs
- Identity.cs
- CopyCodeAction.cs
- IOException.cs
- DataBoundControl.cs
- OleDbMetaDataFactory.cs
- FlowLayout.cs
- ActionFrame.cs
- util.cs
- X509SecurityTokenAuthenticator.cs
- KnownBoxes.cs
- WSSecurityPolicy11.cs
- WindowsListViewGroupSubsetLink.cs
- WindowsTooltip.cs
- SplitterCancelEvent.cs
- AlternateViewCollection.cs