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
- CustomAttributeSerializer.cs
- HttpCacheVary.cs
- DataStreams.cs
- DocobjHost.cs
- DictionaryTraceRecord.cs
- TableStyle.cs
- StringWriter.cs
- TypeReference.cs
- UnorderedHashRepartitionStream.cs
- SignatureResourcePool.cs
- ValidationError.cs
- MeshGeometry3D.cs
- LinkClickEvent.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SslStream.cs
- DomNameTable.cs
- MessageDecoder.cs
- ZipIOExtraFieldElement.cs
- HeaderLabel.cs
- XmlFileEditor.cs
- StreamedWorkflowDefinitionContext.cs
- webbrowsersite.cs
- tibetanshape.cs
- UDPClient.cs
- ColorAnimation.cs
- PrivateFontCollection.cs
- GlobalItem.cs
- TypeUnloadedException.cs
- CreateUserWizard.cs
- TimeoutException.cs
- TrackingParameters.cs
- DataBoundControlHelper.cs
- IInstanceContextProvider.cs
- EntityProviderFactory.cs
- TrackingSection.cs
- SynchronizationLockException.cs
- EdmConstants.cs
- TransformConverter.cs
- GlobalizationAssembly.cs
- MethodBody.cs
- Semaphore.cs
- HttpServerUtilityWrapper.cs
- Set.cs
- WindowsHyperlink.cs
- TextCollapsingProperties.cs
- ReaderWriterLockWrapper.cs
- EventTask.cs
- SqlUtils.cs
- OdbcHandle.cs
- NumberFormatInfo.cs
- DbDeleteCommandTree.cs
- DoubleAnimationUsingPath.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- XmlSchemaValidationException.cs
- WebBrowserBase.cs
- Compiler.cs
- ImageFormatConverter.cs
- DetailsViewInsertedEventArgs.cs
- HwndSubclass.cs
- FormatStringEditor.cs
- HTTPNotFoundHandler.cs
- RealizationContext.cs
- DependencyObjectProvider.cs
- Models.cs
- XmlDocumentType.cs
- IsolationInterop.cs
- ObjectReaderCompiler.cs
- ForceCopyBuildProvider.cs
- StretchValidation.cs
- ManipulationInertiaStartingEventArgs.cs
- LayoutUtils.cs
- EventProviderWriter.cs
- _ConnectStream.cs
- TypefaceMap.cs
- AttachedAnnotationChangedEventArgs.cs
- DataGridPagerStyle.cs
- Property.cs
- WebPartDisplayModeCollection.cs
- NumberFormatInfo.cs
- MainMenu.cs
- StylusPointPropertyUnit.cs
- BitmapEffectDrawingContextWalker.cs
- HttpCachePolicyWrapper.cs
- WebBrowserBase.cs
- UpdatePanelTrigger.cs
- UrlRoutingHandler.cs
- ExpressionConverter.cs
- OdbcParameter.cs
- TextStore.cs
- FollowerQueueCreator.cs
- RSAOAEPKeyExchangeFormatter.cs
- RuntimeVariablesExpression.cs
- SqlVersion.cs
- OleDbMetaDataFactory.cs
- ComponentCollection.cs
- OdbcError.cs
- Typography.cs
- odbcmetadatafactory.cs
- RuleElement.cs
- PanelContainerDesigner.cs