private void InitIoC(Android.Content.Res.AssetManager assetManagerssets) { if (AppSettings.Container == null) { HttpClient = new ExtendedHttpClient(); var builder = new ContainerBuilder(); var saverService = new SaverService(); var dataProvider = new UserManager(saverService); var appInfo = new AppInfo(); var assetsHelper = new AssetHelper(assetManagerssets); var connectionService = new ConnectionService(); var localizationManager = new LocalizationManager(saverService, assetsHelper); var configManager = new ConfigManager(saverService, assetsHelper); builder.RegisterInstance(assetsHelper).As <IAssetHelper>().SingleInstance(); builder.RegisterInstance(appInfo).As <IAppInfo>().SingleInstance(); builder.RegisterInstance(saverService).As <ISaverService>().SingleInstance(); builder.RegisterInstance(dataProvider).As <UserManager>().SingleInstance(); builder.RegisterInstance(connectionService).As <IConnectionService>().SingleInstance(); builder.RegisterInstance(localizationManager).As <LocalizationManager>().SingleInstance(); builder.RegisterInstance(configManager).As <ConfigManager>().SingleInstance(); var configInfo = assetsHelper.GetConfigInfo(); var reporterService = new LogService(HttpClient, appInfo, configInfo.RavenClientDsn); builder.RegisterInstance(reporterService).As <ILogService>().SingleInstance(); AppSettings.Container = builder.Build(); MainChain = AppSettings.User.Chain; SteemClient = new SteepshotApiClient(HttpClient, KnownChains.Steem); GolosClient = new SteepshotApiClient(HttpClient, KnownChains.Golos); } }
public InstagramModule(SteepshotApiClient client, User user) : base(client, user) { var dic = AppSettings.AssetHelper.IntegrationModuleConfig(); if (dic != null && dic.ContainsKey(AppId)) { _moduleConfig = JsonConvert.DeserializeObject <ModuleConfig>(dic[AppId]); } }
static BasePresenter() { CtsSync = new object(); CultureInfo = CultureInfo.InvariantCulture; Chain = AppSettings.User.Chain; Api = new SteepshotApiClient(); Api.InitConnector(Chain, AppSettings.IsDev); LazyLoadTimer = new Timer(Callback, null, 9000, Int32.MaxValue); }
static BasePresenter() { CtsSync = new object(); CultureInfo = CultureInfo.InvariantCulture; User = new User(); User.Load(); Chain = User.Chain; //TODO:KOA: endpoint for CurencyConvertation needed CurencyConvertationDic = new Dictionary <string, double> { { "GBG", 2.4645 }, { "SBD", 1 } }; Api = new SteepshotApiClient(); Api.InitConnector(Chain, AppSettings.IsDev); LazyLoadTimer = new Timer(Callback, null, 9000, Int32.MaxValue); }
static BasePresenter() { CultureInfo = CultureInfo.InvariantCulture; User = new User(); User.Load(); Chain = User.Chain; //TODO:KOA: endpoint for CurencyConvertation needed CurencyConvertationDic = new Dictionary <string, double> { { "GBG", 2.4645 }, { "SBD", 1 } }; Api = new SteepshotApiClient(); var ts = GetReconectToken(); Api.InitConnector(Chain, AppSettings.IsDev, ts); TryRunTask(TryСonect, ts); // static constructor initialization. Task.Run(() => { var init = new Secp256k1Manager(); }); }
protected BaseModule(SteepshotApiClient client, User user) { Client = client; User = user; }
public InstagramModule(SteepshotApiClient client, User user) : base(client, user) { }
public MobileAutoTests(SteepshotApiClient api, UserInfo user, IAppInfo appInfo) { _api = api; _user = user; _appInfo = appInfo; }
public void SetClient(SteepshotApiClient steepshotApiClient) { TasksCancel(); Api = steepshotApiClient; }
public void SetClient(SteepshotApiClient client) { UserFriendPresenter.SetClient(client); TagsPresenter.SetClient(client); }
public void SetClient(SteepshotApiClient client) { _tagsPresenter.SetClient(client); }