C# Class Telegram.MTProto.TelegramSession

Inheritance: ISession
Exibir arquivo Open project: naphaso/kilogram Class Usage Examples

Public Methods

Method Description
AuthorizationExists ( ) : bool
ConnectAsync ( ) : Task
GenerateSequence ( bool confirmed ) : int
GetChat ( int id ) : ChatModel
GetFileSession ( int dc ) : Task
GetFileSessionMain ( ) : Task
GetUser ( int id ) : UserModel
GoToOffline ( ) : Task
GoToOnline ( ) : Task
Migrate ( int dc ) : Task
SaveAuthorization ( auth_Authorization authorization ) : Task
SaveChat ( Chat chat ) : void
SaveUser ( User user ) : void
SetMainDcId ( int id ) : void
TelegramSession ( BinaryReader reader ) : System
TelegramSession ( ulong id, int sequence ) : System
ToString ( ) : string
clear ( ) : void
deserialize ( byte data ) : void
read ( BinaryReader reader ) : void
save ( ) : void
serialize ( ) : byte[]
write ( BinaryWriter writer ) : void

Private Methods

Method Description
CleanContacts ( ) : void
GatewayOnBrokenSessionEvent ( ) : void
SaveSessionTimer ( ) : Task
SetUserName ( int userId, string firstName, string lastName ) : void
SetUserPhoto ( int userId, int date, UserProfilePhoto photo, bool previous ) : void
SetUserStatus ( int userId, UserStatus status ) : void
SubscribeToUpdates ( ) : void
loadIfExists ( ) : TelegramSession

Method Details

AuthorizationExists() public method

public AuthorizationExists ( ) : bool
return bool

ConnectAsync() public method

public ConnectAsync ( ) : Task
return Task

GenerateSequence() public method

public GenerateSequence ( bool confirmed ) : int
confirmed bool
return int

GetChat() public method

public GetChat ( int id ) : ChatModel
id int
return Telegram.Model.Wrappers.ChatModel

GetFileSession() public method

public GetFileSession ( int dc ) : Task
dc int
return Task

GetFileSessionMain() public method

public GetFileSessionMain ( ) : Task
return Task

GetUser() public method

public GetUser ( int id ) : UserModel
id int
return Telegram.Model.Wrappers.UserModel

GoToOffline() public method

public GoToOffline ( ) : Task
return Task

GoToOnline() public method

public GoToOnline ( ) : Task
return Task

Migrate() public method

public Migrate ( int dc ) : Task
dc int
return Task

SaveAuthorization() public method

public SaveAuthorization ( auth_Authorization authorization ) : Task
authorization auth_Authorization
return Task

SaveChat() public method

public SaveChat ( Chat chat ) : void
chat Chat
return void

SaveUser() public method

public SaveUser ( User user ) : void
user User
return void

SetMainDcId() public method

public SetMainDcId ( int id ) : void
id int
return void

TelegramSession() public method

public TelegramSession ( BinaryReader reader ) : System
reader System.IO.BinaryReader
return System

TelegramSession() public method

public TelegramSession ( ulong id, int sequence ) : System
id ulong
sequence int
return System

ToString() public method

public ToString ( ) : string
return string

clear() public method

public clear ( ) : void
return void

deserialize() public method

public deserialize ( byte data ) : void
data byte
return void

read() public method

public read ( BinaryReader reader ) : void
reader System.IO.BinaryReader
return void

save() public method

public save ( ) : void
return void

serialize() public method

public serialize ( ) : byte[]
return byte[]

write() public method

public write ( BinaryWriter writer ) : void
writer System.IO.BinaryWriter
return void