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
- ComPlusServiceHost.cs
- SystemGatewayIPAddressInformation.cs
- XPathParser.cs
- ConnectionManagementElementCollection.cs
- MappingModelBuildProvider.cs
- InvariantComparer.cs
- RestHandler.cs
- UICuesEvent.cs
- HasCopySemanticsAttribute.cs
- UnsafeNativeMethods.cs
- MultiTargetingUtil.cs
- GridViewCellAutomationPeer.cs
- EpmSourcePathSegment.cs
- Quaternion.cs
- DataGridViewColumnCollectionDialog.cs
- MatrixTransform3D.cs
- InvokeBinder.cs
- Set.cs
- SystemWebCachingSectionGroup.cs
- ServiceMemoryGates.cs
- ExpressionLexer.cs
- RenderDataDrawingContext.cs
- TreeNodeBinding.cs
- RoutedPropertyChangedEventArgs.cs
- NativeObjectSecurity.cs
- SchemaImporter.cs
- RecipientInfo.cs
- OperationFormatUse.cs
- DataGridViewRowHeaderCell.cs
- PageCatalogPart.cs
- SegmentInfo.cs
- WebContext.cs
- UnknownWrapper.cs
- ConvertEvent.cs
- TableChangeProcessor.cs
- GroupedContextMenuStrip.cs
- XmlEncoding.cs
- ScrollData.cs
- PackageDigitalSignatureManager.cs
- SimpleTableProvider.cs
- Vector3DAnimationUsingKeyFrames.cs
- WebServiceMethodData.cs
- AnnotationResource.cs
- StoreAnnotationsMap.cs
- HttpRequest.cs
- SwitchAttribute.cs
- SpecialNameAttribute.cs
- GridViewColumn.cs
- Parameter.cs
- RotateTransform.cs
- ObjectDataSourceDisposingEventArgs.cs
- DataStreams.cs
- AutomationPatternInfo.cs
- XmlQueryRuntime.cs
- Int32Converter.cs
- WebPartTransformerCollection.cs
- SharedUtils.cs
- CollectionCodeDomSerializer.cs
- NominalTypeEliminator.cs
- CodeCompiler.cs
- MemberDomainMap.cs
- MasterPage.cs
- messageonlyhwndwrapper.cs
- IISUnsafeMethods.cs
- XslUrlEditor.cs
- SqlFileStream.cs
- SecurityContext.cs
- BinHexDecoder.cs
- TdsParserSafeHandles.cs
- EmptyCollection.cs
- HyperLinkField.cs
- RadioButtonPopupAdapter.cs
- ColumnHeader.cs
- DataGridViewColumnCollectionDialog.cs
- ProxyWebPart.cs
- LoadGrammarCompletedEventArgs.cs
- Utils.cs
- SqlBooleanizer.cs
- CompensationToken.cs
- ListSourceHelper.cs
- EventLogTraceListener.cs
- WorkflowInstanceUnhandledExceptionRecord.cs
- ASCIIEncoding.cs
- ListViewContainer.cs
- DataSourceXmlSubItemAttribute.cs
- ComplexTypeEmitter.cs
- OverflowException.cs
- CaseCqlBlock.cs
- AsymmetricSecurityProtocolFactory.cs
- ListBindingConverter.cs
- DynamicScriptObject.cs
- AttributeExtensions.cs
- PageRequestManager.cs
- ResourceReader.cs
- ConditionedDesigner.cs
- NavigatorOutput.cs
- ExpandSegment.cs
- XmlSchemaObjectTable.cs
- SecurityManager.cs
- AssemblyCache.cs