Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Objects / ELinq / ExpressionVisitorHelpers.cs / 1 / 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. //---------------------------------------------------------------------- // // 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
- DateTimeOffsetStorage.cs
- Deserializer.cs
- SequentialActivityDesigner.cs
- PointKeyFrameCollection.cs
- UnauthorizedAccessException.cs
- UnsafeNativeMethodsPenimc.cs
- ObjectTag.cs
- WindowsRichEdit.cs
- StreamWithDictionary.cs
- ControlBindingsCollection.cs
- HtmlProps.cs
- TextAutomationPeer.cs
- ListViewUpdatedEventArgs.cs
- EventLogger.cs
- SqlCrossApplyToCrossJoin.cs
- ActivitySurrogate.cs
- UserValidatedEventArgs.cs
- Handle.cs
- _BasicClient.cs
- dataobject.cs
- ScrollViewerAutomationPeer.cs
- CacheOutputQuery.cs
- OpenFileDialog.cs
- FloaterParagraph.cs
- ObsoleteAttribute.cs
- FocusTracker.cs
- DbMetaDataFactory.cs
- UTF7Encoding.cs
- SiteMapNodeItem.cs
- SingleAnimation.cs
- ECDiffieHellmanCng.cs
- XamlClipboardData.cs
- ItemContainerGenerator.cs
- IUnknownConstantAttribute.cs
- Lasso.cs
- FixedSOMTableCell.cs
- HyperLink.cs
- DocumentCollection.cs
- ScriptingProfileServiceSection.cs
- VariableAction.cs
- ControlType.cs
- OleDbTransaction.cs
- MaskedTextBoxTextEditorDropDown.cs
- IntegerValidatorAttribute.cs
- ItemChangedEventArgs.cs
- Int32AnimationBase.cs
- XmlRawWriterWrapper.cs
- ParallelTimeline.cs
- MethodRental.cs
- DataGridViewColumnStateChangedEventArgs.cs
- ListViewTableCell.cs
- ResolveDuplex11AsyncResult.cs
- RecommendedAsConfigurableAttribute.cs
- TextTreeFixupNode.cs
- SoapMessage.cs
- TableLayoutColumnStyleCollection.cs
- ShortcutKeysEditor.cs
- StackBuilderSink.cs
- ZoneButton.cs
- FileChangeNotifier.cs
- RuntimeWrappedException.cs
- UInt16Storage.cs
- IsolatedStorageFileStream.cs
- AdRotatorDesigner.cs
- ConfigXmlCDataSection.cs
- TraceSection.cs
- DSASignatureDeformatter.cs
- PropertyKey.cs
- DataServiceRequest.cs
- CachedPathData.cs
- JulianCalendar.cs
- SliderAutomationPeer.cs
- EntityClassGenerator.cs
- TreeNodeConverter.cs
- DataGridViewCellConverter.cs
- ActivitiesCollection.cs
- CannotUnloadAppDomainException.cs
- COSERVERINFO.cs
- BreakSafeBase.cs
- CompilationAssemblyInstallComponent.cs
- ParamArrayAttribute.cs
- DateTimeFormatInfoScanner.cs
- MaterialCollection.cs
- MessageSmuggler.cs
- XslUrlEditor.cs
- CommentGlyph.cs
- DesignerContextDescriptor.cs
- PerformanceCounterLib.cs
- InArgumentConverter.cs
- TextTreeDeleteContentUndoUnit.cs
- EntityConnectionStringBuilderItem.cs
- CheckedListBox.cs
- ModelVisual3D.cs
- InnerItemCollectionView.cs
- BamlLocalizabilityResolver.cs
- UICuesEvent.cs
- X509Certificate.cs
- XmlImplementation.cs
- DbModificationClause.cs
- DoubleCollection.cs