C# Class TLSharp.Core.Session

Show file Open project: sochix/TLSharp Class Usage Examples

Public Methods

Method Description
FromBytes ( byte buffer, ISessionStore store, string sessionUserId ) : Session
GetNewMessageId ( ) : long
Save ( ) : void
ToBytes ( ) : byte[]
TryLoadOrCreateNew ( ISessionStore store, string sessionUserId ) : Session

Private Methods

Method Description
GenerateRandomUlong ( ) : ulong
Session ( ISessionStore store ) : System

Method Details

FromBytes() public static method

public static FromBytes ( byte buffer, ISessionStore store, string sessionUserId ) : Session
buffer byte
store ISessionStore
sessionUserId string
return Session

GetNewMessageId() public method

public GetNewMessageId ( ) : long
return long

Save() public method

public Save ( ) : void
return void

ToBytes() public method

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

TryLoadOrCreateNew() public static method

public static TryLoadOrCreateNew ( ISessionStore store, string sessionUserId ) : Session
store ISessionStore
sessionUserId string
return Session