TLSharp.Core.FileSessionStore.Save C# (CSharp) Method

Save() public method

public Save ( Session session ) : void
session Session
return void
        public void Save(Session session)
        {
            using (var stream = new FileStream($"{session.SessionUserId}.dat", FileMode.OpenOrCreate))
            {
                var result = session.ToBytes();
                stream.Write(result, 0, result.Length);
            }
        }
FileSessionStore