public static bool TryDecode(this IOwnerTokenCodec codec, string tokenStr, out OwnerToken token) { try { token = codec.Decode(tokenStr); return(true); } catch { token = null; return(false); } }
public bool TryDecode(IOwnerTokenCodec codec, string tokenStr, out OwnerToken token) { try { token = codec.Decode(tokenStr); return(true); } catch (Exception ex) { token = null; _logger.LogTrace(ex.ToString()); return(false); } }