internal static bool TryHandle(string response, ISubject <AuthenticationResponse> subject) { if (!BitmexJsonSerializer.ContainsValue(response, "authKey")) { return(false); } var parsed = BitmexJsonSerializer.Deserialize <AuthenticationResponse>(response); subject.OnNext(parsed); return(true); }
internal static bool TryHandle(string response, ISubject <BookResponse> subject) { if (!BitmexJsonSerializer.ContainsValue(response, "orderBookL2")) { return(false); } var parsed = BitmexJsonSerializer.Deserialize <BookResponse>(response); subject.OnNext(parsed); return(true); }