Пример #1
0
 private static void Initialize()
 {
     if (_client == null)
     {
         _client = new WorkshopClient("http://192.168.1.10:3000");
         _model  = new WorkshopModel(_client);
     }
 }
Пример #2
0
        public WorkshopModel([NotNull] WorkshopClient client)
        {
            _client = client ?? throw new ArgumentNullException(nameof(client));

            if (ValuesStorage.GetEncrypted <string>(KeySteamId) == null)
            {
                ValuesStorage.SetEncrypted(KeySteamId, SteamIdHelper.Instance.Value);
            }

            var steamId = ValuesStorage.GetEncrypted <string>(KeySteamId);

            AuthorizeAsync(steamId, ValuesStorage.GetEncrypted(KeyUserPassword,
                                                               WorkshopClient.GetPasswordChecksum(WorkshopClient.GetUserId(steamId), string.Empty))).Ignore();
        }