Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

Migrate to version 0.4

Viktor Borisov edited this page Jan 22, 2018 · 3 revisions

Version 0.4 has a revolutionary change and is incompatible with version 0.3.

We changed the parameters of the ClientFactory

The new FactorySettings class contains all the parameters required for the connection.

StoreProvider is a new parameter that defines the mechanism for storing session data. By default, you must use FileSessionStoreProvider

v 0.3

return ClientFactory.BuildClient(ApiId, ApiHash, ServerAddress, ServerPort);

v 0.4

var settings = new FactorySettings
{
    Hash = ApiHash,
    Id = ApiId,
    ServerAddress = ServerAddress,
     ServerPort = ServerPort,
     StoreProvider = new FileSessionStoreProvider("session")
};
return await ClientFactory.BuildClient(settings).ConfigureAwait(false);