Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / Common.cs / 1305376 / Common.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Common defintions and functions for the server and client lib // //--------------------------------------------------------------------- #if ASTORIA_CLIENT namespace System.Data.Services.Client #else namespace System.Data.Services #endif { using System.Linq; using System.Diagnostics; using System.Globalization; using System.IO; using System.Text; using System.Xml; ////// Common defintions and functions for the server and client lib /// internal static class CommonUtil { ////// List of types unsupported by the client /// private static readonly Type[] unsupportedTypes = new Type[] { #if !ASTORIA_LIGHT // System.Dynamic & tuples not available (as of SL 2.0) typeof(System.Dynamic.IDynamicMetaObjectProvider), typeof(System.Tuple<>), // 1-Tuple typeof(System.Tuple<,>), // 2-Tuple typeof(System.Tuple<,,>), // 3-Tuple typeof(System.Tuple<,,,>), // 4-Tuple typeof(System.Tuple<,,,,>), // 5-Tuple typeof(System.Tuple<,,,,,>), // 6-Tuple typeof(System.Tuple<,,,,,,>), // 7-Tuple typeof(System.Tuple<,,,,,,,>) // 8-Tuple #endif }; ////// Test whether a type is unsupported by the client lib /// /// The type to test ///Returns true if the type is not supported internal static bool IsUnsupportedType(Type type) { if (type.IsGenericType) { type = type.GetGenericTypeDefinition(); } if (unsupportedTypes.Any(t => t.IsAssignableFrom(type))) { return true; } Debug.Assert(!type.FullName.StartsWith("System.Tuple", StringComparison.Ordinal), "System.Tuple is not blocked by unsupported type check"); return false; } } } // 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
- IndicFontClient.cs
- WebPartsSection.cs
- DispatcherProcessingDisabled.cs
- Debug.cs
- RequestQueue.cs
- DispatcherHookEventArgs.cs
- ButtonDesigner.cs
- XmlEncoding.cs
- MarkerProperties.cs
- ColorConverter.cs
- TemplateControlCodeDomTreeGenerator.cs
- SqlDataSourceQueryEditor.cs
- CommunicationObjectManager.cs
- ActiveXSite.cs
- DataStreamFromComStream.cs
- SessionPageStatePersister.cs
- DocumentAutomationPeer.cs
- SafeLibraryHandle.cs
- TextDocumentView.cs
- SqlDataSourceSummaryPanel.cs
- WorkflowFileItem.cs
- CodeIdentifiers.cs
- ObjectTag.cs
- Line.cs
- DbDataRecord.cs
- HtmlElement.cs
- SizeAnimationBase.cs
- SimpleApplicationHost.cs
- Signature.cs
- MenuRendererStandards.cs
- MDIClient.cs
- DbDataReader.cs
- SemanticTag.cs
- DataSetFieldSchema.cs
- CapacityStreamGeometryContext.cs
- XmlSerializerNamespaces.cs
- OperationDescriptionCollection.cs
- ConfigurationSettings.cs
- SafeNativeMethods.cs
- MasterPageParser.cs
- NativeMethods.cs
- SqlDataSourceConfigureSortForm.cs
- objectquery_tresulttype.cs
- AssemblyHash.cs
- LinkDescriptor.cs
- SubpageParagraph.cs
- FlowDocumentPageViewerAutomationPeer.cs
- DropShadowBitmapEffect.cs
- KeyedHashAlgorithm.cs
- DES.cs
- XmlObjectSerializerContext.cs
- FileDialogCustomPlacesCollection.cs
- BufferBuilder.cs
- LinqDataSourceContextEventArgs.cs
- DiagnosticsConfiguration.cs
- OutputCacheSettings.cs
- MenuItem.cs
- TableRow.cs
- ProjectionPruner.cs
- TrackingParameters.cs
- UIElementIsland.cs
- InputReportEventArgs.cs
- SqlNamer.cs
- XmlDsigSep2000.cs
- Choices.cs
- ScrollProviderWrapper.cs
- ToolZone.cs
- CompensatableTransactionScopeActivityDesigner.cs
- _Events.cs
- OdbcCommand.cs
- OverflowException.cs
- StyleCollection.cs
- WizardPanel.cs
- TextTreeTextBlock.cs
- BackgroundWorker.cs
- DetailsViewUpdateEventArgs.cs
- VisualStyleRenderer.cs
- StringComparer.cs
- WebBrowserNavigatingEventHandler.cs
- HtmlCommandAdapter.cs
- ExceptionHandlers.cs
- PassportAuthenticationModule.cs
- SignalGate.cs
- RootProfilePropertySettingsCollection.cs
- SystemIPAddressInformation.cs
- AssemblyFilter.cs
- DefaultCommandConverter.cs
- Scripts.cs
- EasingKeyFrames.cs
- RenderingBiasValidation.cs
- ContextConfiguration.cs
- MembershipValidatePasswordEventArgs.cs
- ImageFormatConverter.cs
- TrackPoint.cs
- ConfigurationSectionGroupCollection.cs
- HelloOperationCD1AsyncResult.cs
- TextUtf8RawTextWriter.cs
- Vector3dCollection.cs
- EntityDataSourceDataSelection.cs
- MatrixTransform3D.cs