/// <summary> /// 建構子 /// </summary> /// <param name="logger">Logger</param> /// <param name="settingHelper">appsetting 設定</param> public RedisCacheHelper( ILogger <RedisCacheHelper> logger, ISettingHelper settingHelper) { this.Logger = logger; RedisConfig = settingHelper.GetSection <RedisConfig>("RedisConfig"); }
/// <summary> /// 设置配置辅助器。 /// </summary> /// <param name="settingHelper">配置辅助器。</param> public void SetSettingHelper(ISettingHelper settingHelper) { if (settingHelper == null) { throw new Exception("Setting helper is invalid."); } mSettingHelper = settingHelper; }
/// <summary> /// 游戏框架组件初始化。 /// </summary> /// private void Awake() { GameMainEntry.GetModule <SettingManager>(); m_CustomSettingHelper = new DefaultSettingHelper(); if (m_CustomSettingHelper == null) { throw new GameFrameworkException("settingHelper NULL "); } }
public HomeViewModel() { apiManager = SimpleIoc.Inst.GetInstance <WebApiManager>(ViewModelLocatorBase.ApiManagerKey); accountHelper = SimpleIoc.Inst.GetInstance <ISettingHelper>(ViewModelLocatorBase.AccountSettingKey); appResources = SimpleIoc.Inst.GetInstance <IStringResource>(ViewModelLocatorBase.StringReourceKey); UserName = accountHelper.GetValue <string>(UserNameKey); Pwd = accountHelper.GetValue <string>(PwdKey); LoginCommand = new RelayCommand(Login); LogOffCommand = new RelayCommand(LogOff); IocHelper.EnsureIocKey(this); #if DEBUG UserName = "******"; Pwd = "Asdfg123456"; #endif }
public SettingManager(ISettingHelper helper = null, bool cacheData = false, int capacity = 16) { m_CacheData = cacheData; if (helper != null) { SetSettingHelper(helper); Load(); } if (m_CacheData) { mStringCache = new Dictionary <string, string>(capacity); mFloatCache = new Dictionary <string, float>(capacity); mIntCache = new Dictionary <string, int>(capacity); } }
/// <summary> /// Initiates the services. /// </summary> private void InitializeServices() { try { Battery = DependencyService.Get <IBattery>(); NetworkManager = DependencyService.Get <INetworkService>(); ContactManager = DependencyService.Get <IContactService>(); CookieManager = DependencyService.Get <ICookieService>(); CredentialsManager = DependencyService.Get <ICredentialsService>(); NativeUtilities = DependencyService.Get <INativeUtilities>(); LocationService = DependencyService.Get <ILocationService>(); NotificationManager = DependencyService.Get <INotificationService>(); FileHelper = DependencyService.Get <IFileHelper>(); ImageHelper = DependencyService.Get <IImageHelper>(); LocalizationManager = DependencyService.Get <ILocalization>(); ThreadHelper.Initialize(Environment.CurrentManagedThreadId); SettingHelper = DependencyService.Get <ISettingHelper>(); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(ಠ_ಠ); Debug.WriteLine(e.Message); } }
public AnalysisFactory(ISettingHelper<IAnalysisSetting> setting) { _setting = setting; SetAnalysisCode(); }
/// <summary> /// 初始化游戏配置管理器的新实例。 /// </summary> public SettingManager() { m_SettingHelper = null; }
/// <summary> /// 初始化游戏配置管理器的新实例。 /// </summary> public SettingManager() { m_SettingHelper = new DefaultSettingHelper(); }
/// <summary> /// Initializes a new instance of the <see cref="HighlightLocatorAction" /> class. /// </summary> /// <param name="contextHelper">The context helper.</param> /// <param name="settingHelper">The setting helper.</param> public HighlightLocatorAction(IScenarioContextHelper contextHelper, ISettingHelper settingHelper) { this.contextHelper = contextHelper; this.settingHelper = settingHelper; }
public AnalysisFactory(ISettingHelper <IAnalysisSetting> setting) { _setting = setting; SetAnalysisCode(); }
public PageSettingContext(string settingName) { _pageSetting = new SettingHelper <IPageSetting>(settingName); }
public PageSettingContext(string settingName) { _pageSetting = new SettingHelper<IPageSetting>(settingName); }