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
- IteratorFilter.cs
- ScrollBarRenderer.cs
- ControlBuilder.cs
- EntityDataSourceConfigureObjectContext.cs
- GenericPrincipal.cs
- AuthenticationConfig.cs
- Switch.cs
- UInt16Storage.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- Rect3D.cs
- DataRecordInternal.cs
- FocusWithinProperty.cs
- XmlNamespaceDeclarationsAttribute.cs
- TemplateEditingFrame.cs
- ManagementQuery.cs
- EntityDesignPluralizationHandler.cs
- DecimalStorage.cs
- WebPartUserCapability.cs
- Site.cs
- ScriptServiceAttribute.cs
- ButtonFieldBase.cs
- KeyMatchBuilder.cs
- ECDiffieHellmanPublicKey.cs
- BindingMemberInfo.cs
- XmlSchemaImport.cs
- IsolatedStoragePermission.cs
- PageClientProxyGenerator.cs
- COM2Properties.cs
- XmlMtomWriter.cs
- StagingAreaInputItem.cs
- HttpCacheParams.cs
- TextChangedEventArgs.cs
- SystemIPInterfaceProperties.cs
- DrawingDrawingContext.cs
- ViewManager.cs
- EntityClassGenerator.cs
- ArglessEventHandlerProxy.cs
- TdsParser.cs
- Win32.cs
- Formatter.cs
- QueryPageSettingsEventArgs.cs
- SchemaName.cs
- NavigatorInput.cs
- ObjectListField.cs
- DropShadowBitmapEffect.cs
- MessageHeaderDescription.cs
- CounterCreationDataCollection.cs
- SqlServer2KCompatibilityCheck.cs
- PageVisual.cs
- Typeface.cs
- Vector3DCollection.cs
- SafeNativeMethods.cs
- PropertyBuilder.cs
- NamespaceInfo.cs
- ObjectDataSourceView.cs
- MoveSizeWinEventHandler.cs
- HwndSourceParameters.cs
- StaticSiteMapProvider.cs
- Assembly.cs
- XmlReader.cs
- IgnoreFileBuildProvider.cs
- LiteralLink.cs
- SourceItem.cs
- ShaperBuffers.cs
- KeyedHashAlgorithm.cs
- PackageDigitalSignatureManager.cs
- AdRotatorDesigner.cs
- WindowsToolbar.cs
- ActivityExecutionFilter.cs
- ValidationResult.cs
- MemberHolder.cs
- ButtonChrome.cs
- BinaryUtilClasses.cs
- SecurityRuntime.cs
- FunctionDescription.cs
- AnchoredBlock.cs
- CalendarDay.cs
- GridErrorDlg.cs
- _HTTPDateParse.cs
- AxHostDesigner.cs
- FormatVersion.cs
- FormViewRow.cs
- StaticExtensionConverter.cs
- XmlElementAttributes.cs
- AnimationLayer.cs
- SecurityHelper.cs
- SequentialOutput.cs
- RuleRefElement.cs
- CultureSpecificCharacterBufferRange.cs
- Soap.cs
- SortableBindingList.cs
- HostVisual.cs
- AppDomainUnloadedException.cs
- ProtectedConfiguration.cs
- DBConnectionString.cs
- ScriptManagerProxy.cs
- DependencyObjectCodeDomSerializer.cs
- InProcStateClientManager.cs
- SwitchExpression.cs
- IIS7UserPrincipal.cs