using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading.Tasks; namespace JsonRPC4.Router { internal class StaticRpcMethodProvider : IRpcMethodProvider { // Token: 0x1700003E RID: 62 // (get) Token: 0x060000B0 RID: 176 RVA: 0x00003488 File Offset: 0x00001688 private List baseMethods { get; } // Token: 0x1700003F RID: 63 // (get) Token: 0x060000B1 RID: 177 RVA: 0x00003490 File Offset: 0x00001690 private Dictionary> methods { get; } // Token: 0x060000B2 RID: 178 RVA: 0x00003498 File Offset: 0x00001698 public StaticRpcMethodProvider(List baseMethods, Dictionary> methods) { this.baseMethods = baseMethods; this.methods = methods; } // Token: 0x060000B3 RID: 179 RVA: 0x000034B0 File Offset: 0x000016B0 public bool TryGetByPath(RpcPath path, out IReadOnlyList methods) { if (path == null) { methods = this.baseMethods; return true; } List list; if (this.methods.TryGetValue(path, out list)) { methods = list; return true; } methods = null; return false; } } }