コード例 #1
0
 Type IDataContractSurrogate.GetDataContractType(Type type)
 {
     if (prevSurrogate != null)
     {
         return(prevSurrogate.GetDataContractType(type));
     }
     return(type);
 }
 public Type GetDataContractType(Type type)
 {
     if (typeof(IDetector).IsAssignableFrom(type))
     {
         return(typeof(DetectorSurrogate));
     }
     return(_dataContractSurrogate.GetDataContractType(type));
 }
コード例 #3
0
 internal static Type GetDataContractType(IDataContractSurrogate surrogate, Type type)
 {
     if (DataContract.GetBuiltInDataContract(type) != null)
         return type;
     Type dcType = surrogate.GetDataContractType(type);
     if (dcType == null)
         return type;
     return dcType;
 }
コード例 #4
0
        internal static Type GetDataContractType(IDataContractSurrogate surrogate, Type type)
        {
            if (DataContract.GetBuiltInDataContract(type) != null)
            {
                return(type);
            }
            Type dcType = surrogate.GetDataContractType(type);

            if (dcType == null)
            {
                return(type);
            }
            return(dcType);
        }
コード例 #5
0
 public Type GetDataContractType(Type type)
 {
     return(_baseSerializer != null?_baseSerializer.GetDataContractType(type) : type);
 }