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
- HtmlTitle.cs
- basevalidator.cs
- ViewStateChangedEventArgs.cs
- TextElementCollection.cs
- SystemGatewayIPAddressInformation.cs
- ConnectionConsumerAttribute.cs
- ProcessStartInfo.cs
- WindowsUpDown.cs
- DocumentSequence.cs
- Filter.cs
- safesecurityhelperavalon.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ParseHttpDate.cs
- WindowsBrush.cs
- CodeStatement.cs
- GlobalItem.cs
- DelegatingConfigHost.cs
- GatewayIPAddressInformationCollection.cs
- LineServicesCallbacks.cs
- ComboBoxRenderer.cs
- Attribute.cs
- XsdBuilder.cs
- SqlConnectionHelper.cs
- CookieProtection.cs
- IRCollection.cs
- DocumentCollection.cs
- ConcurrentBag.cs
- HttpCacheParams.cs
- AutomationElementCollection.cs
- Rotation3DKeyFrameCollection.cs
- DataSourceProvider.cs
- MailBnfHelper.cs
- IdentityModelDictionary.cs
- XComponentModel.cs
- ToolStripGrip.cs
- RSAPKCS1SignatureFormatter.cs
- HwndTarget.cs
- VisualTarget.cs
- InputScopeConverter.cs
- ButtonPopupAdapter.cs
- GridViewDeleteEventArgs.cs
- ObjectStateManagerMetadata.cs
- XmlSchemaComplexContentExtension.cs
- ElementHostAutomationPeer.cs
- UnsafeNativeMethods.cs
- StyleHelper.cs
- PaintValueEventArgs.cs
- DependencyPropertyAttribute.cs
- PropertyDescriptorComparer.cs
- EventLogHandle.cs
- ColumnWidthChangingEvent.cs
- ChooseAction.cs
- NavigationExpr.cs
- XmlToDatasetMap.cs
- TransformConverter.cs
- WebPartMenu.cs
- ValidatingPropertiesEventArgs.cs
- MetadataHelper.cs
- MessageDirection.cs
- ControlTemplate.cs
- ControlCommandSet.cs
- WindowsFont.cs
- FileLevelControlBuilderAttribute.cs
- TableDetailsRow.cs
- XmlSchemaComplexContentExtension.cs
- QilGeneratorEnv.cs
- TextParagraphView.cs
- MasterPageCodeDomTreeGenerator.cs
- ElementNotAvailableException.cs
- CheckPair.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- DispatcherHooks.cs
- RegistrySecurity.cs
- ETagAttribute.cs
- RewritingSimplifier.cs
- WebPartZoneBase.cs
- TextBoxView.cs
- HtmlAnchor.cs
- FullTextBreakpoint.cs
- Trace.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- PersonalizablePropertyEntry.cs
- ChildTable.cs
- TransactionInterop.cs
- TextEditorParagraphs.cs
- DateTimeFormatInfoScanner.cs
- PopupControlService.cs
- MetadataItem.cs
- Vector3DAnimationBase.cs
- Attributes.cs
- QuaternionAnimation.cs
- _AutoWebProxyScriptWrapper.cs
- ConnectionPoint.cs
- XPathScanner.cs
- NavigationEventArgs.cs
- SqlDataSourceStatusEventArgs.cs
- ScriptReferenceBase.cs
- TextElementCollection.cs
- NumericPagerField.cs