Files
acceptance-tests
data
debian
docs
external
ikvm-native
libgc
llvm
m4
man
mcs
build
class
Accessibility
Commons.Xml.Relaxng
Cscompmgd
CustomMarshalers
Facades
I18N
IBM.Data.DB2
ICSharpCode.SharpZipLib
Microsoft.Build
Microsoft.Build.Engine
Microsoft.Build.Framework
Microsoft.Build.Tasks
Microsoft.Build.Utilities
Microsoft.CSharp
Microsoft.NuGet.Build.Tasks
Microsoft.VisualC
Microsoft.Web.Infrastructure
MicrosoftAjaxLibrary
Mono.Btls.Interface
Mono.C5
Mono.CSharp
Mono.Cairo
Mono.Cecil
Mono.Cecil.Mdb
Mono.CodeContracts
Mono.CompilerServices.SymbolWriter
Mono.Data.Sqlite
Mono.Data.Tds
Mono.Debugger.Soft
Mono.Http
Mono.Management
Mono.Messaging
Mono.Messaging.RabbitMQ
Mono.Options
Mono.Parallel
Mono.Posix
Mono.Profiler.Log
Mono.Runtime.Tests
Mono.Security
Mono.Security.Win32
Mono.Simd
Mono.Tasklets
Mono.WebBrowser
Mono.XBuild.Tasks
Novell.Directory.Ldap
PEAPI
RabbitMQ.Client
SMDiagnostics
System
System.ComponentModel.Composition.4.5
System.ComponentModel.DataAnnotations
System.Configuration
System.Configuration.Install
System.Core
System.Data
System.Data.DataSetExtensions
System.Data.Entity
System.Data.Linq
System.Data.OracleClient
System.Data.Services
System.Data.Services.Client
System.Deployment
System.Design
System.DirectoryServices
System.DirectoryServices.Protocols
System.Drawing
System.Drawing.Design
System.Dynamic
System.EnterpriseServices
System.IO.Compression
System.IO.Compression.FileSystem
System.IdentityModel
System.IdentityModel.Selectors
System.Json
System.Json.Microsoft
System.Management
System.Messaging
System.Net
System.Net.Http
System.Net.Http.Formatting
System.Net.Http.WebRequest
System.Net.Http.WinHttpHandler
System.Numerics
System.Numerics.Vectors
System.Private.CoreLib
System.Reactive.Core
System.Reactive.Debugger
System.Reactive.Experimental
System.Reactive.Interfaces
System.Reactive.Linq
System.Reactive.Observable.Aliases
System.Reactive.PlatformServices
System.Reactive.Providers
System.Reactive.Runtime.Remoting
System.Reactive.Windows.Forms
System.Reactive.Windows.Threading
System.Reflection.Context
System.Runtime.Caching
System.Runtime.CompilerServices.Unsafe
System.Runtime.DurableInstancing
System.Runtime.Remoting
System.Runtime.Serialization
System.Runtime.Serialization.Formatters.Soap
System.Security
System.ServiceModel
System.ServiceModel.Activation
System.ServiceModel.Discovery
System.ServiceModel.Internals
System.ServiceModel.Routing
System.ServiceModel.Web
System.ServiceProcess
System.Threading.Tasks.Dataflow
System.Transactions
System.Web
System.Web.Abstractions
System.Web.ApplicationServices
System.Web.DynamicData
System.Web.Extensions
System.Web.Extensions.Design
System.Web.Http
System.Web.Http.SelfHost
System.Web.Http.WebHost
System.Web.Mobile
System.Web.Mvc3
System.Web.Razor
System.Web.RegularExpressions
System.Web.Routing
System.Web.Services
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor
System.Windows
System.Windows.Forms
System.Windows.Forms.DataVisualization
System.Workflow.Activities
System.Workflow.ComponentModel
System.Workflow.Runtime
System.XML
System.Xaml
System.Xml.Linq
System.Xml.Serialization
SystemWebTestShim
WebMatrix.Data
WindowsBase
aot-compiler
corlib
dlr
doc
legacy
lib
monodoc
notes
reference-assemblies
referencesource
SMDiagnostics
System
System.Activities
System.Activities.Core.Presentation
System.Activities.DurableInstancing
System.Activities.Presentation
System.ComponentModel.DataAnnotations
System.Configuration
System.Core
System.Data
System.Data.DataSetExtensions
System.Data.Entity
System.Data.Entity.Design
System.Data.Linq
System.Data.SqlXml
System.IdentityModel
System.IdentityModel.Selectors
System.Net
System.Numerics
System.Runtime.Caching
System.Runtime.DurableInstancing
System.Runtime.Serialization
System.ServiceModel
InternalApis
Serialization
System
Collections
ServiceModel
Activation
Administration
Channels
ComIntegration
Configuration
Description
CallbackDebugBehavior.cs
CallbackTimeoutsBehavior.cs
ClientClassGenerator.cs
ClientCredentials.cs
ClientUriBehavior.cs
ConfigLoader.cs
ConfigWriter.cs
ContractDescription.cs
DataContractSerializerMessageContractImporter.cs
DataContractSerializerOperationBehavior.cs
DataContractSerializerOperationGenerator.cs
DispatcherBuilder.cs
DispatcherSynchronizationBehavior.cs
FaultDescription.cs
FaultDescriptionCollection.cs
GetResponse.cs
IContractBehavior.cs
IContractBehaviorAttribute.cs
IContractResolver.cs
IEndpointBehavior.cs
IMetadataExchange.cs
IOperationBehavior.cs
IOperationContractGenerationExtension.cs
IPolicyExportExtension.cs
IPolicyImportExtension.cs
IServiceBehavior.cs
IServiceContractGenerationExtension.cs
IWsdlExportExtension.cs
IWsdlImportExtension.cs
ImportedPolicyConversionContext.cs
ListenUriMode.cs
MessageBodyDescription.cs
MessageContractExporter.cs
MessageContractImporter.cs.REMOVED.git-id
MessageDescription.cs
MessageDescriptionCollection.cs
MessageDirection.cs
MessageHeaderDescription.cs
MessageHeaderDescriptionCollection.cs
MessagePartDescription.cs
MessagePartDescriptionCollection.cs
MessagePropertyDescription.cs
MessagePropertyDescriptionCollection.cs
MetadataConversionError.cs
MetadataExchangeBindings.cs
MetadataExchangeClient.cs
MetadataExporter.cs
MetadataImporter.cs
MetadataImporterQuotas.cs
MetadataLocation.cs
MetadataReference.cs
MetadataResolver.cs
MetadataSection.cs
MetadataSet.cs
MetadataStrings.cs
MustUnderstandBehavior.cs
NetDataContractSerializerOperationBehavior.cs
OperationContractGenerationContext.cs
OperationDescription.cs
OperationDescriptionCollection.cs
OperationGenerator.cs
ParameterXPathQueryGenerator.cs
PolicyAssertionCollection.cs
PolicyConversionContext.cs
PolicyReader.cs
PolicyVersion.cs
PrincipalPermissionMode.cs
SchemaHelper.cs
ServiceAuthenticationBehavior.cs
ServiceAuthorizationBehavior.cs
ServiceContractGenerationContext.cs
ServiceContractGenerationOptions.cs
ServiceContractGenerator.cs
ServiceCredentials.cs
ServiceDebugBehavior.cs
ServiceDescription.cs
ServiceEndpoint.cs
ServiceEndpointCollection.cs
ServiceMetadataBehavior.cs
ServiceMetadataContractBehavior.cs
ServiceMetadataEndpoint.cs
ServiceMetadataExtension.cs
ServiceReflector.cs
ServiceSecurityAuditBehavior.cs
ServiceThrottlingBehavior.cs
ServiceTimeoutsBehavior.cs
SoapHelper.cs
SynchronousReceiveBehavior.cs
TaskOperationDescriptionValidator.cs
TransactedBatchingBehavior.cs
TypeLoader.cs.REMOVED.git-id
TypedMessageConverter.cs
UniqueCodeIdentifierScope.cs
UseRequestHeadersForMetadataAddressBehavior.cs
WsdlContractConversionContext.cs
WsdlEndpointConversionContext.cs
WsdlExporter.cs
WsdlHelper.cs
WsdlImporter.cs.REMOVED.git-id
XmlSerializerOperationBehavior.cs
XmlSerializerOperationGenerator.cs
Diagnostics
Dispatcher
MsmqIntegration
PeerResolvers
Security
Syndication
Transactions
XamlIntegration
ActionMismatchAddressingException.cs
ActionNotSupportedException.cs
AddressAccessDeniedException.cs
AddressAlreadyInUseException.cs
AddressFilterMode.cs
AppContextDefaultValues.Default.cs
AuditLevel.cs
AuditLogLocation.cs
BasicHttpBinding.cs
BasicHttpContextBinding.cs
BasicHttpMessageCredentialType.cs
BasicHttpMessageSecurity.cs
BasicHttpSecurity.cs
BasicHttpSecurityMode.cs
BasicHttpsBinding.cs
BasicHttpsSecurity.cs
BasicHttpsSecurityMode.cs
CacheSetting.cs
CallbackBehaviorAttribute.cs
ChannelFactory.cs
ChannelFactoryRefCache.cs
ChannelTerminatedException.cs
ClientBase.cs
CommunicationException.cs
CommunicationObjectAbortedException.cs
CommunicationObjectFaultedException.cs
CommunicationState.cs
ConcurrencyMode.cs
ConfigurationEndpointTrait.cs
DXD.cs
DataContractFormatAttribute.cs
DeadLetterQueue.cs
DeliveryRequirementsAttribute.cs
DnsEndpointIdentity.cs
DuplexChannelFactory.cs
DuplexClientBase.cs
EmptyArray.cs
EndpointAddress.cs
EndpointAddress10.cs
EndpointAddressAugust2004.cs
EndpointIdentity.cs
EndpointNotFoundException.cs
EndpointTrait.cs
EnvelopeVersion.cs
ExceptionDetail.cs
ExceptionMapper.cs
ExtensionCollection.cs
FaultCode.cs
FaultCodeConstants.cs
FaultContractAttribute.cs
FaultException.cs
FaultImportOptions.cs
FaultReason.cs
FaultReasonText.cs
FederatedMessageSecurityOverHttp.cs
GeneralEndpointIdentity.cs
HostnameComparisonMode.cs
HttpBindingBase.cs
HttpClientCredentialType.cs
HttpProxyCredentialType.cs
HttpTransportSecurity.cs
IChannelBaseProxy.cs
IClientChannel.cs
ICommunicationObject.cs
IContextChannel.cs
IContextSessionProvider.cs
IDefaultCommunicationTimeouts.cs
IDuplexContextChannel.cs
IExtensibleObject.cs
IExtension.cs
IExtensionCollection.cs
IOnlineStatus.cs
IOperationContractAttributeProvider.cs
IServiceChannel.cs
ImpersonationOption.cs
InstanceContext.cs
InstanceContextMode.cs
InvalidMessageContractException.cs
KeyedByTypeCollection.cs
LocalAppContextSwitches.cs
MessageBodyMemberAttribute.cs
MessageContractAttribute.cs
MessageContractMemberAttribute.cs
MessageCredentialType.cs
MessageHeaderArrayAttribute.cs
MessageHeaderAttribute.cs
MessageHeaderException.cs
MessageHeaderT.cs
MessageParameterAttribute.cs
MessagePropertyAttribute.cs
MessageSecurityOverHttp.cs
MessageSecurityOverMsmq.cs
MessageSecurityOverTcp.cs
MessageSecurityVersion.cs
MostlySingletonList.cs
MsmqAuthenticationMode.cs
MsmqBindingBase.cs
MsmqEncryptionAlgorithm.cs
MsmqException.cs
MsmqPoisonMessageException.cs
MsmqSecureHashAlgorithm.cs
MsmqTransportSecurity.cs
MustUnderstandSoapException.cs
NamedPipeTransportSecurity.cs
NetHttpBinding.cs
NetHttpMessageEncoding.cs
NetHttpMessageEncodingHelper.cs
NetHttpsBinding.cs
NetMsmqBinding.cs
NetMsmqSecurity.cs
NetMsmqSecurityMode.cs
NetNamedPipeBinding.cs
NetNamedPipeSecurity.cs
NetNamedPipeSecurityMode.cs
NetPeerTcpBinding.cs
NetTcpBinding.cs
NetTcpContextBinding.cs
NetTcpSecurity.cs
NonDualMessageSecurityOverHttp.cs
OSEnvironmentHelper.cs
OSVersion.cs
OperationBehaviorAttribute.cs
OperationContext.cs
OperationContextScope.cs
OperationContractAttribute.cs
OperationFormatStyle.cs
OperationFormatUse.cs
PeerHopCountAttribute.cs
PeerMessageOrigination.cs
PeerMessagePropagation.cs
PeerMessagePropagationFilter.cs
PeerNode.cs
PeerNodeAddress.cs
PeerResolver.cs
PeerSecuritySettings.cs
PeerTransportCredentialType.cs
PeerTransportSecuritySettings.cs
PoisonMessageException.cs
Pool.cs
ProgrammaticEndpointTrait.cs
ProtocolException.cs
QueueTransferProtocol.cs
QueuedDeliveryRequirementsMode.cs
QuotaExceededException.cs
ReceiveContextEnabledAttribute.cs
ReceiveErrorHandling.cs
ReleaseInstanceMode.cs
ReliableMessagingVersion.cs
ReliableSession.cs
RsaEndpointIdentity.cs
SecurityMode.cs
ServerTooBusyException.cs
ServiceActivationException.cs
ServiceAuthenticationManager.cs
ServiceAuthorizationManager.cs
ServiceBehaviorAttribute.cs
ServiceChannelManager.cs
ServiceConfiguration.cs
ServiceContractAttribute.cs
ServiceDefaults.cs
ServiceEndpointTrait.cs
ServiceHost.cs
ServiceKnownTypeAttribute.cs
ServiceModelAppSettings.cs
ServiceModelAttributeTargets.cs
ServiceModelDictionary.cs
ServiceModelStrings.cs
ServiceModelStringsVersion1.cs
ServiceSecurityContext.cs
SessionMode.cs
SpnEndpointIdentity.cs
StringUtil.cs
SynchronizedCollection.cs
SynchronizedDisposablePool.cs
SynchronizedKeyedCollection.cs
SynchronizedReadOnlyCollection.cs
TcpClientCredentialType.cs
TcpTransportSecurity.cs
ThreadTrace.cs
TimeSpanHelper.cs
TransactionFlowAttribute.cs
TransactionFlowOption.cs
TransactionProtocol.cs
TransferMode.cs
UnifiedSecurityMode.cs
UnknownMessageReceivedEventArgs.cs
UpnEndpointIdentity.cs
UriSchemeKeyedCollection.cs
WS2007FederationHttpBinding.cs
WS2007HttpBinding.cs
WSAddressing10ProblemHeaderQNameFault.cs
WSDualHttpBinding.cs
WSDualHttpSecurity.cs
WSDualHttpSecurityMode.cs
WSFederationHttpBinding.cs
WSFederationHttpSecurity.cs
WSFederationHttpSecurityMode.cs
WSHttpBinding.cs
WSHttpBindingBase.cs
WSHttpContextBinding.cs
WSHttpSecurity.cs
WSMessageEncoding.cs
WrappedDispatcherException.cs
X509CertificateEndpointIdentity.cs
XD.cs.REMOVED.git-id
XPathMessageQuery.cs
XmlBuffer.cs
XmlSerializerFormatAttribute.cs
XmlUtil.cs
UriTemplate.cs
UriTemplateCompoundPathSegment.cs
UriTemplateEquivalenceComparer.cs
UriTemplateHelpers.cs
UriTemplateLiteralPathSegment.cs
UriTemplateLiteralQueryValue.cs
UriTemplateMatch.cs
UriTemplateMatchException.cs
UriTemplatePartType.cs
UriTemplatePathPartiallyEquivalentSet.cs
UriTemplatePathSegment.cs
UriTemplateQueryValue.cs
UriTemplateTable.cs
UriTemplateTableMatchCandidate.cs
UriTemplateTrieIntraNodeLocation.cs
UriTemplateTrieLocation.cs
UriTemplateTrieNode.cs
UriTemplateVariablePathSegment.cs
UriTemplateVariableQueryValue.cs
AssemblyInfo.cs
System.ServiceModel.txt.REMOVED.git-id
TD.Designer.cs.REMOVED.git-id
System.ServiceModel.Activation
System.ServiceModel.Activities
System.ServiceModel.Channels
System.ServiceModel.Discovery
System.ServiceModel.Internals
System.ServiceModel.Routing
System.ServiceModel.WasHosting
System.ServiceModel.Web
System.Web
System.Web.ApplicationServices
System.Web.DataVisualization
System.Web.DynamicData
System.Web.Entity
System.Web.Entity.Design
System.Web.Extensions
System.Web.Mobile
System.Web.Routing
System.Web.Services
System.Workflow.Activities
System.Workflow.ComponentModel
System.Workflow.Runtime
System.WorkflowServices
System.Xaml.Hosting
System.Xml
System.Xml.Linq
XamlBuildTask
mscorlib
LICENSE.txt
PATENTS.TXT
README.Mono.md
README.md
test-helpers
LICENSE
Makefile
Open.snk
README
ecma.pub
mono.pub
mono.snk
msfinal.pub
reactive.pub
silverlight.pub
winfx.pub
winfx3.pub
docs
errors
ilasm
jay
mcs
packages
tests
tools
AUTHORS
COPYING
INSTALL.txt
Makefile
MonoIcon.png
README
ScalableMonoIcon.svg
mkinstalldirs
mk
mono
msvc
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

192 lines
7.8 KiB
C#

//----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
namespace System.ServiceModel.Description
{
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime;
using System.Xml;
using System.Xml.Schema;
static class SchemaHelper
{
static internal void AddElementForm(XmlSchemaElement element, XmlSchema schema)
{
if (schema.ElementFormDefault != XmlSchemaForm.Qualified)
element.Form = XmlSchemaForm.Qualified;
}
static internal void AddElementToSchema(XmlSchemaElement element, XmlSchema schema, XmlSchemaSet schemaSet)
{
XmlSchemaElement existingElement = (XmlSchemaElement)schema.Elements[new XmlQualifiedName(element.Name, schema.TargetNamespace)];
if (existingElement != null)
{
if (element.SchemaType == existingElement.SchemaType && element.SchemaTypeName == existingElement.SchemaTypeName)
return;
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SFxConflictingGlobalElement, element.Name, schema.TargetNamespace, GetTypeName(element), GetTypeName(existingElement))));
}
schema.Items.Add(element);
if (!element.SchemaTypeName.IsEmpty)
AddImportToSchema(element.SchemaTypeName.Namespace, schema);
schemaSet.Reprocess(schema);
}
static internal void AddImportToSchema(string ns, XmlSchema schema)
{
if (NamespacesEqual(ns, schema.TargetNamespace)
|| NamespacesEqual(ns, XmlSchema.Namespace)
|| NamespacesEqual(ns, XmlSchema.InstanceNamespace))
return;
foreach (object item in schema.Includes)
{
if (item is XmlSchemaImport && NamespacesEqual(ns, ((XmlSchemaImport)item).Namespace))
return;
}
XmlSchemaImport import = new XmlSchemaImport();
if (ns != null && ns.Length > 0)
import.Namespace = ns;
schema.Includes.Add(import);
}
static internal void AddTypeToSchema(XmlSchemaType type, XmlSchema schema, XmlSchemaSet schemaSet)
{
XmlSchemaType existingType = (XmlSchemaType)schema.SchemaTypes[new XmlQualifiedName(type.Name, schema.TargetNamespace)];
if (existingType != null)
{
if (existingType == type)
return;
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SFxConflictingGlobalType, type.Name, schema.TargetNamespace)));
}
schema.Items.Add(type);
schemaSet.Reprocess(schema);
}
static internal XmlSchema GetSchema(string ns, XmlSchemaSet schemaSet)
{
if (ns == null) { ns = String.Empty; }
ICollection schemas = schemaSet.Schemas();
foreach (XmlSchema existingSchema in schemas)
{
if ((existingSchema.TargetNamespace == null && ns.Length == 0) || ns.Equals(existingSchema.TargetNamespace))
return existingSchema;
}
XmlSchema schema = new XmlSchema();
schema.ElementFormDefault = XmlSchemaForm.Qualified;
if (ns.Length > 0)
schema.TargetNamespace = ns;
schemaSet.Add(schema);
return schema;
}
static string GetTypeName(XmlSchemaElement element)
{
if (element.SchemaType != null)
return "anonymous";
if (!element.SchemaTypeName.IsEmpty)
return element.SchemaTypeName.ToString();
return String.Empty;
}
// Compare XmlSchemaElement properties set by WsdlExporter: do not check element QName,
// this code only called for elements with matching name and namespace
internal static bool IsMatch(XmlSchemaElement e1, XmlSchemaElement e2)
{
// this code only called for elements with matching name and namespace
Fx.Assert(e1.Name == e2.Name, "");
// Anonymous types never match
if (e1.SchemaType != null || e2.SchemaType != null)
return false;
if (e1.SchemaTypeName != e2.SchemaTypeName)
return false;
// do not need to check parent Schema.ElementFormDefault: see AddElementForm in this class.
if (e1.Form != e2.Form)
return false;
if (e1.IsNillable != e2.IsNillable)
return false;
return true;
}
static internal bool NamespacesEqual(string ns1, string ns2)
{
if (ns1 == null || ns1.Length == 0)
return (ns2 == null || ns2.Length == 0);
else
return ns1 == ns2;
}
static internal void Compile(XmlSchemaSet schemaSet, Collection<MetadataConversionError> errors)
{
ValidationEventHandler validationEventHandler = new ValidationEventHandler(delegate(object sender, ValidationEventArgs args)
{
HandleSchemaValidationError(sender, args, errors);
}
);
schemaSet.ValidationEventHandler += validationEventHandler;
schemaSet.Compile();
schemaSet.ValidationEventHandler -= validationEventHandler;
}
static internal void HandleSchemaValidationError(object sender, ValidationEventArgs args, Collection<MetadataConversionError> errors)
{
MetadataConversionError warning = null;
if (args.Exception != null && args.Exception.SourceUri != null)
{
XmlSchemaException ex = args.Exception;
warning = new MetadataConversionError(SR.GetString(SR.SchemaValidationError, ex.SourceUri, ex.LineNumber, ex.LinePosition, ex.Message));
}
else
{
warning = new MetadataConversionError(SR.GetString(SR.GeneralSchemaValidationError, args.Message));
}
if (!errors.Contains(warning))
errors.Add(warning);
}
static IList<string> xsdValueTypePrimitives = new string[]
{
"boolean", "float", "double", "decimal", "long", "unsignedLong", "int", "unsignedInt", "short", "unsignedShort", "byte", "unsignedByte",
"duration", "dateTime", "integer", "positiveInteger", "negativeInteger", "nonPositiveInteger"
};
static IList<string> dataContractPrimitives = new string[]
{
"char", "guid"
};
static IList<string> xmlSerializerPrimitives = new string[]
{
"char", "guid"
};
static string dataContractSerializerNamespace = "http://schemas.microsoft.com/2003/10/Serialization/";
static string xmlSerializerNamespace = "http://microsoft.com/wsdl/types/";
internal static bool IsElementValueType(XmlSchemaElement element)
{
XmlQualifiedName typeName = element.SchemaTypeName;
if (typeName == null || typeName.IsEmpty)
return false;
if (typeName.Namespace == XmlSchema.Namespace)
return xsdValueTypePrimitives.Contains(typeName.Name);
if (typeName.Namespace == dataContractSerializerNamespace)
return dataContractPrimitives.Contains(typeName.Name);
if (typeName.Namespace == xmlSerializerNamespace)
return dataContractPrimitives.Contains(typeName.Name);
return false;
}
}
}