public static async Task <TelegramClient> Connect( Some <Session> session, ISessionStore?store = null, TgCallMiddlewareChain?callMiddlewareChain = null, TcpClientConnectionHandler?tcpClientConnectionHandler = null ) { store ??= new FileSessionStore("session.dat"); var connectInfo = ConnectInfo.FromSession(session); return(await Connect(connectInfo, store, callMiddlewareChain, tcpClientConnectionHandler)); }