当前位置: 首页>>代码示例>>C#>>正文


C# ISiteService.GetSiteSettings方法代码示例

本文整理汇总了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;
        }
开发者ID:RadioSystems,项目名称:RadioSystems.AzureAuthentication,代码行数:25,代码来源:OwinMiddlewares.cs

示例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;
 }
开发者ID:davegardner,项目名称:Cascade.WebShop,代码行数:10,代码来源:OrderService.cs

示例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>();
 }
开发者ID:SmartFire,项目名称:Cascade.WebShop,代码行数:11,代码来源:OrderService.cs

示例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;
                    });
            });
        }
开发者ID:Lombiq,项目名称:Orchard-User-Notifications,代码行数:22,代码来源:NotificationWidgetPartHandler.cs

示例5: JobsQueueManager

 public JobsQueueManager(
     IRepository<QueuedJobRecord> jobRepository, 
     ISiteService siteService) {
         _jobRepository = jobRepository;
         _jobsQueueSettingsPart = new Lazy<JobsQueueSettingsPart>(() => { return siteService.GetSiteSettings().As<JobsQueueSettingsPart>(); });
 }
开发者ID:SunRobin2015,项目名称:RobinWithOrchard,代码行数:6,代码来源:JobsQueueManager.cs

示例6: PageTitleBuilder

 public PageTitleBuilder(ISiteService siteService)
 {
     _siteService = siteService;
     _titleParts = new List<string>(5);
     _titleSeparator = _siteService.GetSiteSettings().PageTitleSeparator;
 }
开发者ID:mofashi2011,项目名称:orchardcms,代码行数:6,代码来源:PageTitleBuilder.cs

示例7: CaptchaService

 public CaptchaService(IContentManager contentManager, ISiteService siteService)
 {
     CaptchaPart = contentManager.Get<CaptchaSettingsPart>(1);
     CurrentCulture = siteService.GetSiteSettings().SiteCulture;
     T = NullLocalizer.Instance;
 }
开发者ID:denkhaus,项目名称:Orchard.Captcha,代码行数:6,代码来源:CaptchaService.cs

示例8: ODataContext

 public ODataContext(ISiteService siteService) {
     _context = new Lazy<GalleryFeedContext>(() => new GalleryFeedContext(new Uri(siteService.GetSiteSettings().As<GallerySettingsPart>().FeedUrl)) {
         IgnoreResourceNotFoundException = true
     });
 }
开发者ID:NickAndersonX,项目名称:xodb,代码行数:5,代码来源:ODataContext.cs


注:本文中的ISiteService.GetSiteSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。