Esempio n. 1
0
 /// <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");
 }
Esempio n. 2
0
 /// <summary>
 /// 设置配置辅助器。
 /// </summary>
 /// <param name="settingHelper">配置辅助器。</param>
 public void SetSettingHelper(ISettingHelper settingHelper)
 {
     if (settingHelper == null)
     {
         throw new Exception("Setting helper is invalid.");
     }
     mSettingHelper = settingHelper;
 }
Esempio n. 3
0
        /// <summary>
        /// 游戏框架组件初始化。
        /// </summary>
        ///

        private void Awake()
        {
            GameMainEntry.GetModule <SettingManager>();
            m_CustomSettingHelper = new DefaultSettingHelper();
            if (m_CustomSettingHelper == null)
            {
                throw new GameFrameworkException("settingHelper NULL ");
            }
        }
Esempio n. 4
0
        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
        }
Esempio n. 5
0
 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);
     }
 }
Esempio n. 6
0
 /// <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);
     }
 }
Esempio n. 7
0
 public AnalysisFactory(ISettingHelper<IAnalysisSetting> setting)
 {
     _setting = setting;
     SetAnalysisCode();
 }
Esempio n. 8
0
 /// <summary>
 /// 初始化游戏配置管理器的新实例。
 /// </summary>
 public SettingManager()
 {
     m_SettingHelper = null;
 }
Esempio n. 9
0
 /// <summary>
 /// 初始化游戏配置管理器的新实例。
 /// </summary>
 public SettingManager()
 {
     m_SettingHelper = new DefaultSettingHelper();
 }
Esempio n. 10
0
 /// <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;
 }
Esempio n. 11
0
 public AnalysisFactory(ISettingHelper <IAnalysisSetting> setting)
 {
     _setting = setting;
     SetAnalysisCode();
 }
Esempio n. 12
0
 public PageSettingContext(string settingName)
 {
     _pageSetting = new SettingHelper <IPageSetting>(settingName);
 }
 /// <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;
 }
Esempio n. 14
0
 public PageSettingContext(string settingName)
 {
     _pageSetting = new SettingHelper<IPageSetting>(settingName);
 }