public static bool TryRepeatAs <TObj>(this ILeoVisitor visitor, IDictionary <string, object> keyValueCollections, out TObj result) { result = default; var ret = visitor.TryRepeat(keyValueCollections, out var val); if (!ret) { return(false); } try { result = (TObj)val; return(true); } catch { return(false); } }
public static bool TryRepeatAs <TObj>(this ILeoVisitor visitor, object instance, out TObj result) { result = default; var ret = visitor.TryRepeat(instance, out var val); if (!ret) { return(false); } try { result = (TObj)val; return(true); } catch { return(false); } }
public static bool TryRepeatAs <T>(this ILeoVisitor <T> visitor, IDictionary <string, object> keyValueCollections, out T result) { result = default; return(visitor.TryRepeat(keyValueCollections, out result)); }
public static bool TryRepeatAs <T>(this ILeoVisitor <T> visitor, T instance, out T result) { result = default; return(visitor.TryRepeat(instance, out result)); }