本文整理汇总了C#中ISettingsManager.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# ISettingsManager.GetValue方法的具体用法?C# ISettingsManager.GetValue怎么用?C# ISettingsManager.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISettingsManager
的用法示例。
在下文中一共展示了ISettingsManager.GetValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ThemeController
public ThemeController(Func<string, IThemeService> factory, ISettingsManager manager, string pathForMultipart, string pathForFiles, string defaultThemePath)
{
if (factory == null)
{
throw new ArgumentNullException("factory");
}
if (manager == null)
{
throw new ArgumentNullException("manager");
}
if (string.IsNullOrEmpty(pathForMultipart))
throw new ArgumentNullException("pathForMultipart");
if (string.IsNullOrEmpty(pathForFiles))
throw new ArgumentNullException("pathForFiles");
var chosenRepository = manager.GetValue(
"VirtoCommerce.Content.MainProperties.ThemesRepositoryType",
string.Empty);
_pathForMultipart = pathForMultipart;
_pathForFiles = pathForFiles;
_defaultThemePath = defaultThemePath;
var themeService = factory.Invoke(chosenRepository);
this._themeService = themeService;
}
示例2: ContentExportImport
public ContentExportImport(IMenuService menuService, Func<string, IThemeService> themeServiceFactory, Func<string, IPagesService> pagesServiceFactory, IStoreService storeService, ISettingsManager settingsManager)
{
_menuService = menuService;
_storeService = storeService;
var pagesChosenRepository = settingsManager.GetValue(
"VirtoCommerce.Content.MainProperties.PagesRepositoryType",
string.Empty);
var themeChosenRepository = settingsManager.GetValue(
"VirtoCommerce.Content.MainProperties.ThemesRepositoryType",
string.Empty);
_pagesService = pagesServiceFactory.Invoke(pagesChosenRepository);
_themeService = themeServiceFactory.Invoke(themeChosenRepository);
}
示例3: ZDAuthorizationController
public ZDAuthorizationController(ISettingsManager settingsManager)
{
_settingsManager = settingsManager;
var subdomain = _settingsManager.GetValue(_subdomainPropertyName, string.Empty);
if (!string.IsNullOrEmpty(subdomain))
{
_configuration["authorize_uri"] = string.Format(_configuration["authorize_uri"], subdomain);
_configuration["access_token_uri"] = string.Format(_configuration["access_token_uri"], subdomain);
isSubdomainSet = true;
}
}
示例4: SyncController
public SyncController(Func<string, IThemeService> themeFactory, Func<string, IPagesService> pageFactory, ISettingsManager manager)
{
if (themeFactory == null)
{
throw new ArgumentNullException("factory");
}
if (manager == null)
{
throw new ArgumentNullException("manager");
}
var chosenThemeRepository = manager.GetValue(
"VirtoCommerce.Content.MainProperties.ThemesRepositoryType",
string.Empty);
var chosenPagesRepository = manager.GetValue(
"VirtoCommerce.Content.MainProperties.PagesRepositoryType",
string.Empty);
this._themeService = themeFactory.Invoke(chosenThemeRepository);
this._pagesService = pageFactory.Invoke(chosenPagesRepository);
}
示例5: PagesController
public PagesController(Func<string, IPagesService> serviceFactory, ISettingsManager settingsManager)
{
if (serviceFactory == null)
{
throw new ArgumentNullException("serviceFactory");
}
if (settingsManager == null)
{
throw new ArgumentNullException("settingsManager");
}
var chosenRepository = settingsManager.GetValue(
"VirtoCommerce.Content.MainProperties.PagesRepositoryType",
string.Empty);
var pagesService = serviceFactory.Invoke(chosenRepository);
_pagesService = pagesService;
}
示例6: Load
public void Load(ISettingsManager manager)
{
var user_culture_id = manager.GetValue("Generics.UserCultureID", CultureInfo.InvariantCulture.LCID);
LocalizeDictionary.Instance.Culture = CultureInfo.GetCultureInfo(user_culture_id);
}
示例7: SendNotificationsJobs
public SendNotificationsJobs(INotificationManager notificationManager, ISettingsManager settingsManager)
{
_notificationManager = notificationManager;
_sendingBatchSize = settingsManager.GetValue("VirtoCommerce.Platform.Notifications.SendingJob.TakeCount", 20);
}