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
- Int32RectValueSerializer.cs
- ConfigurationManagerHelperFactory.cs
- TripleDESCryptoServiceProvider.cs
- MailWebEventProvider.cs
- Queue.cs
- AnonymousIdentificationSection.cs
- CodeLinePragma.cs
- ArithmeticException.cs
- JsonSerializer.cs
- Thread.cs
- QuestionEventArgs.cs
- WindowPatternIdentifiers.cs
- BindableAttribute.cs
- Storyboard.cs
- CatalogPartDesigner.cs
- GrammarBuilderWildcard.cs
- CompiledIdentityConstraint.cs
- VisualBrush.cs
- PropertyGridCommands.cs
- DesignTableCollection.cs
- VSWCFServiceContractGenerator.cs
- sqlcontext.cs
- ValidateNames.cs
- DropDownButton.cs
- TrackBarRenderer.cs
- OdbcParameterCollection.cs
- XmlToDatasetMap.cs
- SqlCacheDependencySection.cs
- ImageDrawing.cs
- ListSourceHelper.cs
- WebBrowserNavigatingEventHandler.cs
- EventDescriptor.cs
- InitializingNewItemEventArgs.cs
- DataGridPagerStyle.cs
- TextRunTypographyProperties.cs
- ListSortDescriptionCollection.cs
- _BaseOverlappedAsyncResult.cs
- MultiView.cs
- TextProviderWrapper.cs
- ConfigurationValues.cs
- SqlError.cs
- KeyValuePairs.cs
- Point.cs
- MemoryStream.cs
- DATA_BLOB.cs
- WebConfigurationManager.cs
- xmlformatgeneratorstatics.cs
- HtmlTable.cs
- wgx_commands.cs
- KeyGestureValueSerializer.cs
- DocumentApplicationDocumentViewer.cs
- unsafenativemethodstextservices.cs
- EdmScalarPropertyAttribute.cs
- HtmlDocument.cs
- EnumValAlphaComparer.cs
- Reference.cs
- MDIWindowDialog.cs
- COM2PropertyDescriptor.cs
- DocumentOrderComparer.cs
- CreateUserWizard.cs
- TypeLibConverter.cs
- HyperLink.cs
- CodeAttachEventStatement.cs
- OptimizedTemplateContent.cs
- Rule.cs
- CounterCreationDataCollection.cs
- XmlSchemaAll.cs
- DataStorage.cs
- LocalClientSecuritySettingsElement.cs
- CollectionChangedEventManager.cs
- EntityTypeEmitter.cs
- XmlSchemaCollection.cs
- WpfMemberInvoker.cs
- TextBoxAutoCompleteSourceConverter.cs
- AssemblyBuilder.cs
- SerializationException.cs
- DebuggerAttributes.cs
- PenThreadWorker.cs
- PropertyKey.cs
- OdbcConnectionFactory.cs
- LinearGradientBrush.cs
- BCLDebug.cs
- SafeRegistryHandle.cs
- TextTreeTextNode.cs
- regiisutil.cs
- ControlBindingsCollection.cs
- WebPartConnection.cs
- SecurityElement.cs
- Base64Decoder.cs
- MailWriter.cs
- ChangeInterceptorAttribute.cs
- ConnectionStringsExpressionBuilder.cs
- DataGridToolTip.cs
- Int16Animation.cs
- ViewStateModeByIdAttribute.cs
- Convert.cs
- ResourceContainer.cs
- TrackingStringDictionary.cs
- Resources.Designer.cs
- PointLight.cs