Esempio n. 1
0
 object IDataContractSurrogate.GetDeserializedObject(object obj, Type targetType)
 {
     if (prevSurrogate != null)
     {
         return(prevSurrogate.GetDeserializedObject(obj, targetType));
     }
     return(obj);
 }
 internal static object GetDeserializedObject(IDataContractSurrogate surrogate, object obj, Type objType, Type memberType)
 {
     if (obj == null)
         return null;
     if (DataContract.GetBuiltInDataContract(objType) != null)
         return obj;
     return surrogate.GetDeserializedObject(obj, memberType);
 }
 public object GetDeserializedObject(object obj, Type targetType)
 {
     if (obj is DetectorSurrogate)
     {
         DetectorSurrogate detectorSurrogate = obj as DetectorSurrogate;
         return(detectorSurrogate.GetDetector(_detectorFactory));
     }
     return(_dataContractSurrogate.GetDeserializedObject(obj, targetType));
 }
 internal static object GetDeserializedObject(IDataContractSurrogate surrogate, object obj, Type objType, Type memberType)
 {
     if (obj == null)
     {
         return(null);
     }
     if (DataContract.GetBuiltInDataContract(objType) != null)
     {
         return(obj);
     }
     return(surrogate.GetDeserializedObject(obj, memberType));
 }
Esempio n. 5
0
 public object GetDeserializedObject(object obj, Type targetType)
 {
     return(_baseSerializer != null?_baseSerializer.GetDeserializedObject(obj, targetType) : obj);
 }