using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; using System.Threading.Tasks; namespace JsonRPC4.Router { public class JsonBytesRpcParameter : IRpcParameter { public RpcParameterType Type { get; } private Memory bytes { get; } private JsonSerializerOptions serializerOptions { get; } public JsonBytesRpcParameter(RpcParameterType type, Memory bytes, JsonSerializerOptions serializerOptions = null) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) Type = type; this.bytes = bytes; this.serializerOptions = serializerOptions; } public bool TryGetValue(Type type, out object value) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) try { value = JsonSerializer.Deserialize(this.bytes.Span, type, this.serializerOptions); return true; } catch (Exception) { value = null; return false; } } } }