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
- mda.cs
- AttributedMetaModel.cs
- Int64.cs
- SetUserLanguageRequest.cs
- WebEncodingValidatorAttribute.cs
- RangeExpression.cs
- BinaryFormatterWriter.cs
- UTF32Encoding.cs
- SqlCachedBuffer.cs
- XmlNamespaceMappingCollection.cs
- DrawListViewSubItemEventArgs.cs
- IndexExpression.cs
- XmlDataProvider.cs
- MimeMapping.cs
- WorkflowHostingEndpoint.cs
- ErrorStyle.cs
- BitmapScalingModeValidation.cs
- DataServices.cs
- Properties.cs
- UnhandledExceptionEventArgs.cs
- Membership.cs
- MatrixTransform.cs
- Buffer.cs
- FixedHyperLink.cs
- HttpCapabilitiesEvaluator.cs
- SponsorHelper.cs
- TextTreeDeleteContentUndoUnit.cs
- DocumentReference.cs
- RawMouseInputReport.cs
- _LoggingObject.cs
- ByteArrayHelperWithString.cs
- ResetableIterator.cs
- DataSourceXmlAttributeAttribute.cs
- BoundField.cs
- CellParagraph.cs
- DefaultValueConverter.cs
- UserNamePasswordValidator.cs
- ValidationEventArgs.cs
- webclient.cs
- SignatureToken.cs
- DBSqlParser.cs
- TypeBuilder.cs
- DeclaredTypeValidatorAttribute.cs
- ExpandableObjectConverter.cs
- DynamicRendererThreadManager.cs
- webbrowsersite.cs
- XmlSchemaProviderAttribute.cs
- RTLAwareMessageBox.cs
- WindowsPrincipal.cs
- TextBoxBase.cs
- ConnectionManagementSection.cs
- MenuItemStyle.cs
- Lease.cs
- SystemIPGlobalStatistics.cs
- RangeContentEnumerator.cs
- LicFileLicenseProvider.cs
- ParseElementCollection.cs
- DoubleAnimationUsingPath.cs
- MembershipSection.cs
- ServiceInfo.cs
- Attributes.cs
- BasicHttpBindingCollectionElement.cs
- UnsafeNativeMethods.cs
- LinearGradientBrush.cs
- PagePropertiesChangingEventArgs.cs
- ElementHostAutomationPeer.cs
- SecurityContext.cs
- CompatibleComparer.cs
- FrameworkPropertyMetadata.cs
- ContextMenuAutomationPeer.cs
- HtmlInputImage.cs
- ListViewInsertEventArgs.cs
- CaseInsensitiveHashCodeProvider.cs
- MyContact.cs
- MasterPageBuildProvider.cs
- NotSupportedException.cs
- InputBinding.cs
- QueueProcessor.cs
- X509ChainElement.cs
- ListSurrogate.cs
- ObjectDataSourceFilteringEventArgs.cs
- PathStreamGeometryContext.cs
- TextRange.cs
- XmlSchemaSimpleType.cs
- listitem.cs
- HatchBrush.cs
- TreeViewBindingsEditorForm.cs
- SimpleApplicationHost.cs
- BamlLocalizationDictionary.cs
- StructuredProperty.cs
- GenericTextProperties.cs
- KeySplineConverter.cs
- SessionIDManager.cs
- CodeComment.cs
- EventProperty.cs
- StubHelpers.cs
- Msec.cs
- CuspData.cs
- ReturnEventArgs.cs
- WebPartDescription.cs