Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Objects / ELinq / ExpressionVisitorHelpers.cs / 1305376 / ExpressionVisitorHelpers.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Diagnostics; using System.Data; namespace System.Linq.Expressions { // Because we are using the source file for ExpressionVistor from System.Core // we need to add code to facilitate some external calls that ExpressionVisitor makes. // The classes in this file do that. internal static class Error { internal static Exception UnhandledExpressionType(ExpressionType expressionType) { return EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnhandledExpressionType(expressionType)); } internal static Exception UnhandledBindingType(MemberBindingType memberBindingType) { return EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnhandledBindingType(memberBindingType)); } } internal static class ReadOnlyCollectionExtensions { internal static ReadOnlyCollectionToReadOnlyCollection (this IEnumerable sequence) { if (sequence == null) return DefaultReadOnlyCollection .Empty; ReadOnlyCollection col = sequence as ReadOnlyCollection ; if (col != null) return col; return new ReadOnlyCollection (sequence.ToArray()); } private static class DefaultReadOnlyCollection { private static ReadOnlyCollection _defaultCollection; internal static ReadOnlyCollection Empty { get { if (_defaultCollection == null) _defaultCollection = new ReadOnlyCollection (new T[] { }); return _defaultCollection; } } } } } // 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
- WebPartCollection.cs
- QilInvokeLateBound.cs
- SvcMapFileSerializer.cs
- UpdateEventArgs.cs
- DataBindingValueUIHandler.cs
- PrintDialog.cs
- PageCache.cs
- X509Certificate2.cs
- DocumentGrid.cs
- SQLResource.cs
- X509Certificate2Collection.cs
- SymmetricAlgorithm.cs
- WinEventWrap.cs
- PrivilegedConfigurationManager.cs
- PcmConverter.cs
- QilCloneVisitor.cs
- HorizontalAlignConverter.cs
- OrderPreservingPipeliningMergeHelper.cs
- KeysConverter.cs
- Roles.cs
- AuthenticationManager.cs
- Vector.cs
- NumberSubstitution.cs
- FillRuleValidation.cs
- NTAccount.cs
- BidirectionalDictionary.cs
- ImageButton.cs
- RawMouseInputReport.cs
- DataObjectCopyingEventArgs.cs
- CaseCqlBlock.cs
- AnonymousIdentificationSection.cs
- CodeAttributeArgumentCollection.cs
- QuaternionRotation3D.cs
- TextDecorationCollectionConverter.cs
- ToolStripDesignerAvailabilityAttribute.cs
- TypedElement.cs
- DefaultAsyncDataDispatcher.cs
- EditorZone.cs
- OutputCacheProfileCollection.cs
- util.cs
- DataTablePropertyDescriptor.cs
- CalloutQueueItem.cs
- MetadataItemCollectionFactory.cs
- DownloadProgressEventArgs.cs
- Hashtable.cs
- ValidationHelpers.cs
- CommonRemoteMemoryBlock.cs
- SmiSettersStream.cs
- VScrollProperties.cs
- HttpCacheVaryByContentEncodings.cs
- UriExt.cs
- OdbcCommandBuilder.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- RtfToXamlReader.cs
- FilteredDataSetHelper.cs
- LogPolicy.cs
- X509Utils.cs
- SafeSecurityHandles.cs
- Ref.cs
- TablePattern.cs
- CollectionViewGroupRoot.cs
- basevalidator.cs
- BaseCollection.cs
- InvokeDelegate.cs
- InputBindingCollection.cs
- PrePostDescendentsWalker.cs
- TypedRowGenerator.cs
- WmlValidationSummaryAdapter.cs
- BulletedList.cs
- TrackBar.cs
- ListSourceHelper.cs
- ConsumerConnectionPoint.cs
- Currency.cs
- ShapeTypeface.cs
- InputBindingCollection.cs
- Win32Exception.cs
- AdjustableArrowCap.cs
- PropertyPathWorker.cs
- DecimalStorage.cs
- ReflectionHelper.cs
- HuffModule.cs
- RegexFCD.cs
- TextServicesHost.cs
- NegationPusher.cs
- XmlSchemaObjectCollection.cs
- ResourceAssociationSetEnd.cs
- ParenExpr.cs
- ContextStaticAttribute.cs
- XmlObjectSerializerWriteContextComplex.cs
- HierarchicalDataBoundControl.cs
- IPCCacheManager.cs
- ImageListUtils.cs
- CollectionContainer.cs
- EffectiveValueEntry.cs
- GZipStream.cs
- XmlSerializationWriter.cs
- UIServiceHelper.cs
- DependencyPropertyHelper.cs
- MetadataPropertyCollection.cs
- AssemblyBuilderData.cs