Add Session readonly field to TelegramClient

Add Session readonly field which let user read session properties like current logged-in user's Username & etc.
This commit is contained in:
Mojtaba Tajik 2019-10-03 08:41:27 +03:30
parent c4dbc1e349
commit 8716d7f919

View file

@ -29,6 +29,11 @@ namespace TLSharp.Core
private List<TLDcOption> dcOptions; private List<TLDcOption> dcOptions;
private TcpClientConnectionHandler _handler; private TcpClientConnectionHandler _handler;
public Session Session
{
get { return _session; }
}
public TelegramClient(int apiId, string apiHash, public TelegramClient(int apiId, string apiHash,
ISessionStore store = null, string sessionUserId = "session", TcpClientConnectionHandler handler = null) ISessionStore store = null, string sessionUserId = "session", TcpClientConnectionHandler handler = null)
{ {