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
- CodeCompiler.cs
- Form.cs
- FixedStringLookup.cs
- SHA1.cs
- ObjectTypeMapping.cs
- ToolStripComboBox.cs
- ISFTagAndGuidCache.cs
- VectorCollection.cs
- LineInfo.cs
- SelectionWordBreaker.cs
- UserControlDesigner.cs
- CharacterBufferReference.cs
- SafeCertificateStore.cs
- AstTree.cs
- MailWriter.cs
- MimeTypePropertyAttribute.cs
- NameValuePermission.cs
- RawContentTypeMapper.cs
- XmlSerializer.cs
- SafeUserTokenHandle.cs
- DefaultWorkflowLoaderService.cs
- RemotingConfiguration.cs
- GridViewRowCollection.cs
- LambdaCompiler.Generated.cs
- ClientSettingsSection.cs
- ErrorInfoXmlDocument.cs
- MethodBuilder.cs
- CrossSiteScriptingValidation.cs
- StoryFragments.cs
- DataTableReaderListener.cs
- TrackingProfileCache.cs
- AutoGeneratedFieldProperties.cs
- MsmqMessage.cs
- RemotingServices.cs
- EdmValidator.cs
- ObjectReferenceStack.cs
- ColumnResult.cs
- HttpCachePolicy.cs
- DataControlPagerLinkButton.cs
- Thread.cs
- SizeChangedEventArgs.cs
- PointCollectionConverter.cs
- AnnotationAdorner.cs
- XmlDictionary.cs
- ExtensionFile.cs
- BorderSidesEditor.cs
- SqlError.cs
- ClientTargetCollection.cs
- BufferedStream.cs
- URI.cs
- ToolboxItemAttribute.cs
- TreeBuilderXamlTranslator.cs
- Guid.cs
- ActiveXHost.cs
- SelectedCellsChangedEventArgs.cs
- ServiceInfoCollection.cs
- TextReader.cs
- ImageButton.cs
- StackBuilderSink.cs
- TabControlCancelEvent.cs
- Table.cs
- GridViewEditEventArgs.cs
- ZipIOExtraField.cs
- InvokeMethodActivity.cs
- ReferencedAssembly.cs
- indexingfiltermarshaler.cs
- MetadataItemEmitter.cs
- ClipboardData.cs
- ErrorView.xaml.cs
- ProviderCollection.cs
- ListControl.cs
- Rect3D.cs
- handlecollector.cs
- AttachedPropertiesService.cs
- LinqDataSourceStatusEventArgs.cs
- SimpleHandlerBuildProvider.cs
- ThrowHelper.cs
- WebResourceAttribute.cs
- SortKey.cs
- ObjectView.cs
- XmlFormatExtensionPrefixAttribute.cs
- TraceListeners.cs
- FontCollection.cs
- InvokeMemberBinder.cs
- ClickablePoint.cs
- GrammarBuilderPhrase.cs
- DataGridViewTextBoxEditingControl.cs
- MarginCollapsingState.cs
- RenderTargetBitmap.cs
- SchemaTableOptionalColumn.cs
- HTTPNotFoundHandler.cs
- HttpsHostedTransportConfiguration.cs
- RawStylusInput.cs
- StringResourceManager.cs
- ReadOnlyObservableCollection.cs
- NegationPusher.cs
- AdCreatedEventArgs.cs
- XmlRawWriter.cs
- DataGridViewColumnCollection.cs
- RowUpdatedEventArgs.cs