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
- ContainsRowNumberChecker.cs
- UInt16Storage.cs
- BinaryReader.cs
- HttpRawResponse.cs
- CodeTypeMemberCollection.cs
- ShadowGlyph.cs
- NavigatorOutput.cs
- PermissionToken.cs
- ZeroOpNode.cs
- ComplexLine.cs
- bindurihelper.cs
- XmlQueryStaticData.cs
- ToolStripComboBox.cs
- UserUseLicenseDictionaryLoader.cs
- baseshape.cs
- Int32EqualityComparer.cs
- BadImageFormatException.cs
- ApplicationFileParser.cs
- ContextStaticAttribute.cs
- GetWinFXPath.cs
- ColorKeyFrameCollection.cs
- ComponentFactoryHelpers.cs
- SourceInterpreter.cs
- autovalidator.cs
- SerialReceived.cs
- DispatcherTimer.cs
- SmtpCommands.cs
- PackWebRequest.cs
- SHA1.cs
- ComponentConverter.cs
- PackWebResponse.cs
- MemoryPressure.cs
- DependencyObjectCodeDomSerializer.cs
- GradientStop.cs
- ProgressChangedEventArgs.cs
- FolderBrowserDialog.cs
- TextViewSelectionProcessor.cs
- HttpRequestCacheValidator.cs
- Visitor.cs
- PageBuildProvider.cs
- SmtpDateTime.cs
- Dictionary.cs
- EventLogPermissionEntry.cs
- MailWebEventProvider.cs
- DesignerValidationSummaryAdapter.cs
- RegionInfo.cs
- HashSetEqualityComparer.cs
- FontFamilyValueSerializer.cs
- ToolBar.cs
- GuidelineSet.cs
- RenderData.cs
- ImportCatalogPart.cs
- RegisteredHiddenField.cs
- EditingCommands.cs
- ProcessModule.cs
- Stackframe.cs
- ConfigurationErrorsException.cs
- DBSqlParserColumnCollection.cs
- TCEAdapterGenerator.cs
- PathGeometry.cs
- externdll.cs
- MaskedTextBoxTextEditorDropDown.cs
- ClipboardProcessor.cs
- MaskedTextProvider.cs
- DataObjectMethodAttribute.cs
- ForEachDesigner.xaml.cs
- OleDbErrorCollection.cs
- SerializationSectionGroup.cs
- ErrorWrapper.cs
- InstancePersistenceCommand.cs
- HijriCalendar.cs
- TextServicesProperty.cs
- WebScriptMetadataMessage.cs
- BackgroundWorker.cs
- XmlNodeList.cs
- Int16.cs
- ToolStripControlHost.cs
- DataGridViewColumnCollection.cs
- AssertFilter.cs
- StructuralCache.cs
- DataView.cs
- TimeSpanParse.cs
- MetadataException.cs
- XmlCollation.cs
- Point4DValueSerializer.cs
- ConfigurationSection.cs
- SiteMapDataSource.cs
- AndCondition.cs
- WeakReferenceList.cs
- ReflectionHelper.cs
- ToolStripItemTextRenderEventArgs.cs
- CapabilitiesState.cs
- BrowserCapabilitiesCodeGenerator.cs
- DataGridViewTextBoxCell.cs
- CachedFontFamily.cs
- WebPartConnectionsConfigureVerb.cs
- FederatedMessageSecurityOverHttpElement.cs
- HtmlDocument.cs
- TableCell.cs
- DoWorkEventArgs.cs