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
- WebControlParameterProxy.cs
- X509CertificateRecipientServiceCredential.cs
- XmlObjectSerializerWriteContextComplex.cs
- WindowsFormsHost.cs
- PointLight.cs
- PieceNameHelper.cs
- SharedPerformanceCounter.cs
- Int32Collection.cs
- ClientBuildManager.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ValueSerializerAttribute.cs
- UserControlBuildProvider.cs
- DecodeHelper.cs
- TreeIterators.cs
- ADConnectionHelper.cs
- ILGenerator.cs
- TextPointer.cs
- XmlAttributes.cs
- UpdatePanelTriggerCollection.cs
- HtmlTernaryTree.cs
- ServiceMetadataContractBehavior.cs
- DataFormats.cs
- EnumMember.cs
- ReflectPropertyDescriptor.cs
- CodeGeneratorOptions.cs
- TreeView.cs
- _DigestClient.cs
- LinqDataView.cs
- TreeView.cs
- CellIdBoolean.cs
- Visitors.cs
- UserControlAutomationPeer.cs
- Subordinate.cs
- ScriptBehaviorDescriptor.cs
- DuplexClientBase.cs
- InvokerUtil.cs
- Win32MouseDevice.cs
- RadioButton.cs
- VarInfo.cs
- RangeContentEnumerator.cs
- BlockUIContainer.cs
- SeverityFilter.cs
- DesignerSerializerAttribute.cs
- NetSectionGroup.cs
- IntAverageAggregationOperator.cs
- ListControlConvertEventArgs.cs
- ByteFacetDescriptionElement.cs
- InvalidDataException.cs
- XamlInt32CollectionSerializer.cs
- AnnotationAdorner.cs
- PageCodeDomTreeGenerator.cs
- RegexRunnerFactory.cs
- ThreadStateException.cs
- ReachDocumentPageSerializer.cs
- UIElement.cs
- SinglePageViewer.cs
- Publisher.cs
- SrgsGrammar.cs
- ReferenceService.cs
- SqlClientPermission.cs
- HwndHostAutomationPeer.cs
- UInt16Storage.cs
- HwndKeyboardInputProvider.cs
- XsltSettings.cs
- RegistrationContext.cs
- MediaCommands.cs
- _ConnectOverlappedAsyncResult.cs
- RotateTransform.cs
- SafeHandles.cs
- DnsPermission.cs
- RemotingServices.cs
- TableColumnCollectionInternal.cs
- UIElement3D.cs
- ChannelFactoryRefCache.cs
- activationcontext.cs
- CapabilitiesPattern.cs
- Scene3D.cs
- CaseInsensitiveOrdinalStringComparer.cs
- FontFamilyConverter.cs
- RequestQueryProcessor.cs
- ReaderWriterLockWrapper.cs
- EditorAttribute.cs
- HttpContextWrapper.cs
- DisableDpiAwarenessAttribute.cs
- ListView.cs
- TabItemWrapperAutomationPeer.cs
- Viewport2DVisual3D.cs
- RenderCapability.cs
- AsyncResult.cs
- PreProcessInputEventArgs.cs
- LoadGrammarCompletedEventArgs.cs
- ObjectDataSourceChooseTypePanel.cs
- Point.cs
- DataServiceProcessingPipeline.cs
- ListCardsInFileRequest.cs
- NameValueSectionHandler.cs
- DesignerTextViewAdapter.cs
- DynamicRouteExpression.cs
- DbTransaction.cs
- XmlSchemaSimpleType.cs