本文整理汇总了C#中ISiteService.GetSiteSettings方法的典型用法代码示例。如果您正苦于以下问题:C# ISiteService.GetSiteSettings方法的具体用法?C# ISiteService.GetSiteSettings怎么用?C# ISiteService.GetSiteSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISiteService
的用法示例。
在下文中一共展示了ISiteService.GetSiteSettings方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OwinMiddlewares
public OwinMiddlewares(ISiteService siteService) {
Logger = NullLogger.Instance;
var site = siteService.GetSiteSettings();
var azureSettings = site.As<AzureSettingsPart>();
_azureClientId = ((azureSettings.ClientId == null) || (azureSettings.ClientId == string.Empty)) ?
"[example: 82692da5-a86f-44c9-9d53-2f88d52b478b]" : azureSettings.ClientId;
_azureTenant = ((azureSettings.Tenant == null) || (azureSettings.Tenant == string.Empty)) ?
"faketenant.com" : azureSettings.Tenant;
_azureADInstance = ((azureSettings.ADInstance == null) || (azureSettings.ADInstance == string.Empty)) ?
"https://login.microsoft.com/{0}" : azureSettings.ADInstance;
_logoutRedirectUri = ((azureSettings.LogoutRedirectUri == null) || (azureSettings.LogoutRedirectUri == string.Empty)) ?
site.BaseUrl : azureSettings.LogoutRedirectUri;
_azureAppName = ((azureSettings.AppName == null) || (azureSettings.AppName == string.Empty)) ?
"[example: MyAppName]" : azureSettings.AppName;
_sslEnabled = azureSettings.SSLEnabled;
_azureWebSiteProtectionEnabled = azureSettings.AzureWebSiteProtectionEnabled;
}
示例2: OrderService
public OrderService(IRepository<ProductRecord> productRepository, IContentManager contentManager, IRepository<OrderRecord> orderRepository, IRepository<CustomerRecord> customerRepository, ISiteService siteService, IClock clock)
{
_productRepository = productRepository;
_contentManager = contentManager;
_orderRepository = orderRepository;
_customerRepository = customerRepository;
_siteService = siteService;
_webShopSettings = _siteService.GetSiteSettings().As<WebShopSettingsPart>();
_clock = clock;
}
示例3: OrderService
public OrderService(/*IDateTimeService dateTimeService,*/ IRepository<ProductRecord> productRepository, IContentManager contentManager, IRepository<OrderRecord> orderRepository, IRepository<OrderDetailRecord> orderDetailRepository, IRepository<CustomerRecord> customerRepository, ISiteService siteService)
{
//_dateTimeService = dateTimeService;
_productRepository = productRepository;
_contentManager = contentManager;
_orderRepository = orderRepository;
_orderDetailRepository = orderDetailRepository;
_customerRepository = customerRepository;
_siteService = siteService;
_webShopSettings = _siteService.GetSiteSettings().As<WebShopSettingsPart>();
}
示例4: NotificationWidgetPartHandler
public NotificationWidgetPartHandler(INotificationsToUserDispatcher notificationDispatcher, IWorkContextAccessor wca, ISiteService siteService)
{
OnActivated<NotificationWidgetPart>((context, part) =>
{
part.UnreadNotificationsField.Loader(() =>
{
var currentUser = wca.GetContext().CurrentUser;
if (currentUser == null)
{
return Enumerable.Empty<INotification>().ToList();
}
var notificationCount = siteService.GetSiteSettings().As<NotificationWidgetSettingsPart>().NotificationCount;
var unreadNotifications = notificationDispatcher
.GetRecentNotificationsForUser(currentUser, notificationCount, true)
.ToList();
return unreadNotifications;
});
});
}
示例5: JobsQueueManager
public JobsQueueManager(
IRepository<QueuedJobRecord> jobRepository,
ISiteService siteService) {
_jobRepository = jobRepository;
_jobsQueueSettingsPart = new Lazy<JobsQueueSettingsPart>(() => { return siteService.GetSiteSettings().As<JobsQueueSettingsPart>(); });
}
示例6: PageTitleBuilder
public PageTitleBuilder(ISiteService siteService)
{
_siteService = siteService;
_titleParts = new List<string>(5);
_titleSeparator = _siteService.GetSiteSettings().PageTitleSeparator;
}
示例7: CaptchaService
public CaptchaService(IContentManager contentManager, ISiteService siteService)
{
CaptchaPart = contentManager.Get<CaptchaSettingsPart>(1);
CurrentCulture = siteService.GetSiteSettings().SiteCulture;
T = NullLocalizer.Instance;
}
示例8: ODataContext
public ODataContext(ISiteService siteService) {
_context = new Lazy<GalleryFeedContext>(() => new GalleryFeedContext(new Uri(siteService.GetSiteSettings().As<GallerySettingsPart>().FeedUrl)) {
IgnoreResourceNotFoundException = true
});
}