public static ClientStateBuilder AddState(this ClientBuilder self) { self.Configure(s => { s.AddSingleton <ClientStateManager>(); }); self.AddMiddleware <ClientStateMiddleware>(); return(new ClientStateBuilder(self)); }
public static ClientPeerBuilder AddPeers(this ClientBuilder self) { self.AddMiddleware <ClientPeerMiddleware>(); self.Configure(s => s.AddSingleton <PeerCollection>()); return(new ClientPeerBuilder(self)); }