DataContract ResolveDataContractFromKnownTypes(XmlQualifiedName typeName) { DataContract dataContract = PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace); if (dataContract == null) { dataContract = scopedKnownTypes.GetDataContract(typeName); if (dataContract == null) { dataContract = GetDataContractFromSerializerKnownTypes(typeName); } } return(dataContract); }
DataContract ResolveDataContractFromKnownTypes(XmlQualifiedName typeName) { DataContract dataContract = PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace); if (dataContract == null) { if (typeName.Name == Globals.SafeSerializationManagerName && typeName.Namespace == Globals.SafeSerializationManagerNamespace && Globals.TypeOfSafeSerializationManager != null) { return(GetDataContract(Globals.TypeOfSafeSerializationManager)); } dataContract = scopedKnownTypes.GetDataContract(typeName); if (dataContract == null) { dataContract = GetDataContractFromSerializerKnownTypes(typeName); } } return(dataContract); }
private DataContract?ResolveDataContractFromKnownTypes(XmlQualifiedName typeName) => PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace) ?? scopedKnownTypes.GetDataContract(typeName) ?? GetDataContractFromSerializerKnownTypes(typeName);