コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 private DataContract?ResolveDataContractFromKnownTypes(XmlQualifiedName typeName) =>
 PrimitiveDataContract.GetPrimitiveDataContract(typeName.Name, typeName.Namespace) ??
 scopedKnownTypes.GetDataContract(typeName) ??
 GetDataContractFromSerializerKnownTypes(typeName);