public static InferWoopsaType ( |
||
targetType | The .NET type to try to get the WoopsaValueType from | |
resultType | WoopsaValueType | The inferred WoopsaValueType. If the type cannot be inferred, this value will be WoopsaValueType.Null |
Résultat | bool |
private static bool InferWoopsaType(WoopsaConverters customValueTypeConverters, Type type, out WoopsaValueType woopsaValueType, out WoopsaConverter converter) { if (customValueTypeConverters != null) { return(customValueTypeConverters.InferWoopsaType(type, out woopsaValueType, out converter)); } else { converter = WoopsaConverterDefault.Default; return(WoopsaTypeUtils.InferWoopsaType(type, out woopsaValueType)); } }
public virtual bool InferWoopsaType(Type type, out WoopsaValueType woopsaValueType, out WoopsaConverter converter) { WoopsaConverterDescription converterDescription; if (_converterDescriptions.TryGetValue(type, out converterDescription)) { woopsaValueType = converterDescription.WoopsaValueType; converter = converterDescription.Converter; return(true); } else { converter = WoopsaConverterDefault.Default; return(WoopsaTypeUtils.InferWoopsaType(type, out woopsaValueType)); } }