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
- SizeChangedInfo.cs
- EditBehavior.cs
- HtmlElement.cs
- QuaternionRotation3D.cs
- AdapterUtil.cs
- ScriptReference.cs
- Vector3DAnimation.cs
- InfoCardBinaryReader.cs
- GridViewRowPresenterBase.cs
- DescendantBaseQuery.cs
- DrawingAttributeSerializer.cs
- Int64.cs
- ConnectionManagementElement.cs
- WebBrowserSiteBase.cs
- StrongNameUtility.cs
- AnonymousIdentificationSection.cs
- Literal.cs
- PreservationFileWriter.cs
- RepeatButton.cs
- SkinBuilder.cs
- Serializer.cs
- WmlTextViewAdapter.cs
- File.cs
- IMembershipProvider.cs
- SerializationUtility.cs
- NotifyCollectionChangedEventArgs.cs
- UIElementPropertyUndoUnit.cs
- Exceptions.cs
- SoapFormatterSinks.cs
- PanelDesigner.cs
- PartDesigner.cs
- OdbcConnectionPoolProviderInfo.cs
- TreeNodeMouseHoverEvent.cs
- EdmMember.cs
- PageContentCollection.cs
- TypeConverterHelper.cs
- UniqueID.cs
- Int16Storage.cs
- TextContainerChangeEventArgs.cs
- PropertyExpression.cs
- XmlDocumentSerializer.cs
- ManualWorkflowSchedulerService.cs
- DataList.cs
- ViewLoader.cs
- LinearKeyFrames.cs
- SafeNativeMethodsOther.cs
- hresults.cs
- BeginEvent.cs
- InputScopeNameConverter.cs
- XmlCollation.cs
- InnerItemCollectionView.cs
- Underline.cs
- EntityContainerRelationshipSetEnd.cs
- CollectionBuilder.cs
- StateItem.cs
- MoveSizeWinEventHandler.cs
- FixUp.cs
- HostProtectionException.cs
- HttpStaticObjectsCollectionWrapper.cs
- CmsUtils.cs
- TypeNameHelper.cs
- HideDisabledControlAdapter.cs
- CommonObjectSecurity.cs
- DataRecordInternal.cs
- StylusEventArgs.cs
- LineServices.cs
- HybridCollection.cs
- Win32SafeHandles.cs
- X509Certificate.cs
- XmlSchemaSimpleContentRestriction.cs
- Perspective.cs
- QueryExpr.cs
- AttachedAnnotationChangedEventArgs.cs
- TraceSource.cs
- XamlToRtfParser.cs
- PrintDialog.cs
- TextBoxAutomationPeer.cs
- CryptographicAttribute.cs
- MarginCollapsingState.cs
- EntityDataSourceUtil.cs
- SmiTypedGetterSetter.cs
- XmlAnyElementAttributes.cs
- ReferentialConstraint.cs
- SQLRoleProvider.cs
- SafePEFileHandle.cs
- _Win32.cs
- PathSegment.cs
- NominalTypeEliminator.cs
- counter.cs
- TemplateControl.cs
- GatewayDefinition.cs
- StringAnimationUsingKeyFrames.cs
- WindowsContainer.cs
- RuntimeVariablesExpression.cs
- BrowserInteropHelper.cs
- ListenUriMode.cs
- SystemIPGlobalProperties.cs
- StylusCaptureWithinProperty.cs
- TemplateParser.cs
- CodeDomDesignerLoader.cs