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
- GenericWebPart.cs
- SoapSchemaImporter.cs
- FontStretches.cs
- FloatAverageAggregationOperator.cs
- DefaultParameterValueAttribute.cs
- DesignerVerbCollection.cs
- StickyNoteAnnotations.cs
- CultureSpecificStringDictionary.cs
- SortDescription.cs
- CertificateManager.cs
- QueryParameter.cs
- BitmapFrameEncode.cs
- SharingService.cs
- ASCIIEncoding.cs
- ReaderWriterLockSlim.cs
- DataServiceRequestOfT.cs
- FormViewUpdatedEventArgs.cs
- PropertyTab.cs
- SecurityTokenRequirement.cs
- TraceHandler.cs
- DbReferenceCollection.cs
- Double.cs
- QilStrConcatenator.cs
- SqlInternalConnectionTds.cs
- ViewStateException.cs
- LookupNode.cs
- FixedElement.cs
- SynchronizationLockException.cs
- OutputWindow.cs
- BreakRecordTable.cs
- XmlArrayItemAttribute.cs
- Html32TextWriter.cs
- HtmlImageAdapter.cs
- ChangeProcessor.cs
- LogicalExpr.cs
- WindowHideOrCloseTracker.cs
- OperationDescriptionCollection.cs
- SQLByte.cs
- Quaternion.cs
- DispatcherHookEventArgs.cs
- SqlCacheDependencyDatabase.cs
- DataTransferEventArgs.cs
- PropertyConverter.cs
- UserMapPath.cs
- ComponentResourceKeyConverter.cs
- DataListItemCollection.cs
- PerfProviderCollection.cs
- MasterPageCodeDomTreeGenerator.cs
- ArgumentNullException.cs
- SqlFacetAttribute.cs
- QilInvokeLateBound.cs
- _OverlappedAsyncResult.cs
- TreeViewItem.cs
- SiteMapDesignerDataSourceView.cs
- XsdBuilder.cs
- GenericIdentity.cs
- AxisAngleRotation3D.cs
- MiniCustomAttributeInfo.cs
- SHA1Managed.cs
- SourceLineInfo.cs
- OleServicesContext.cs
- CommonProperties.cs
- SetterTriggerConditionValueConverter.cs
- ThreadPool.cs
- X500Name.cs
- StreamSecurityUpgradeInitiatorBase.cs
- ClientRoleProvider.cs
- PeerObject.cs
- FormViewActionList.cs
- DocumentSchemaValidator.cs
- ReadOnlyDictionary.cs
- XamlReaderHelper.cs
- Keywords.cs
- ProjectionCamera.cs
- PingOptions.cs
- CodeSubDirectoriesCollection.cs
- XmlQualifiedName.cs
- ConfigurationElement.cs
- EntityStoreSchemaGenerator.cs
- FollowerQueueCreator.cs
- Converter.cs
- HttpListenerRequestUriBuilder.cs
- SQLInt64.cs
- ReadOnlyCollection.cs
- CodeDomSerializationProvider.cs
- Rotation3D.cs
- CodeConstructor.cs
- WriteableOnDemandPackagePart.cs
- UiaCoreApi.cs
- AnnotationComponentChooser.cs
- SoundPlayerAction.cs
- TimeSpanValidatorAttribute.cs
- SupportedAddressingMode.cs
- ParameterElement.cs
- NumberAction.cs
- StreamSecurityUpgradeInitiatorBase.cs
- ExponentialEase.cs
- Stack.cs
- XmlSchemaAny.cs
- DoubleAnimation.cs