• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Models.SiteSettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中cloudscribe.Core.Models.SiteSettings的典型用法代码示例。如果您正苦于以下问题:C# SiteSettings类的具体用法?C# SiteSettings怎么用?C# SiteSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SiteSettings类属于cloudscribe.Core.Models命名空间,在下文中一共展示了SiteSettings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FolderTenantNodeUrlPrefixProvider

 public FolderTenantNodeUrlPrefixProvider(
     SiteSettings currentSite,
     IOptions<MultiTenantOptions> multiTenantOptions)
 {
     site = currentSite;
     options = multiTenantOptions.Value;
 }
开发者ID:ReinhardHsu,项目名称:cloudscribe,代码行数:7,代码来源:FolderTenantNodeUrlPrefixProvider.cs


示例2: CoreDataController

 public CoreDataController(
     SiteSettings currentSite,
     GeoDataManager geoDataManager,
     IOptions<UIOptions> uiOptionsAccessor
     )
 {
     Site = currentSite; 
     dataManager = geoDataManager;
     uiOptions = uiOptionsAccessor.Value;
 }
开发者ID:lespera,项目名称:cloudscribe,代码行数:10,代码来源:CoreDataController.cs


示例3: MultiTenantCookieOptionsResolver

 public MultiTenantCookieOptionsResolver(
     //ISiteResolver siteResolver,
     SiteSettings currentSite,
     IOptions<MultiTenantOptions> multiTenantOptions,
     ILoggerFactory loggerFactory)
 {
     site = currentSite;
     //this.siteResolver = siteResolver;
     this.multiTenantOptions = multiTenantOptions.Value;
     log = loggerFactory.CreateLogger<MultiTenantCookieOptionsResolver>();
 }
开发者ID:lespera,项目名称:cloudscribe,代码行数:11,代码来源:MultiTenantCookieOptionsResolver.cs


示例4: MultiTenantCookieOptionsResolverFactory

 public MultiTenantCookieOptionsResolverFactory(
     //ISiteResolver siteResolver,
     SiteSettings currentSite,
     IOptions<MultiTenantOptions> multiTenantOptions,
     ILoggerFactory loggerFactory)
 {
     //this.siteResolver = siteResolver;
     this.currentSite = currentSite;
     this.multiTenantOptions = multiTenantOptions;
     this.loggerFactory = loggerFactory;
 }
开发者ID:lespera,项目名称:cloudscribe,代码行数:11,代码来源:MultiTenantCookieOptionsResolverFactory.cs


示例5: CoreDataController

 public CoreDataController(
     SiteSettings currentSite,
     GeoDataManager geoDataManager,
     IStringLocalizer<CloudscribeCore> localizer,
     IOptions<UIOptions> uiOptionsAccessor
     )
 {
     Site = currentSite; 
     dataManager = geoDataManager;
     uiOptions = uiOptionsAccessor.Value;
     sr = localizer;
 }
开发者ID:ReinhardHsu,项目名称:cloudscribe,代码行数:12,代码来源:CoreDataController.cs


示例6: TenantLayoutSelector

        public TenantLayoutSelector(
            IRazorViewEngine viewEngine,
            SiteSettings currentSite,
            IOptions<LayoutSelectorOptions> layoutOptionsAccesor,
            ILogger<TenantLayoutSelector> logger)
        {
            if (viewEngine == null) { throw new ArgumentNullException(nameof(viewEngine)); }
            if (currentSite == null) { throw new ArgumentNullException(nameof(currentSite)); }
            if (logger == null) { throw new ArgumentNullException(nameof(logger)); }
            if (layoutOptionsAccesor == null) { throw new ArgumentNullException(nameof(layoutOptionsAccesor)); }

            this.viewEngine = viewEngine;
            site = currentSite;
            options = layoutOptionsAccesor.Value;
            log = logger;
        }
开发者ID:lespera,项目名称:cloudscribe,代码行数:16,代码来源:TenantLayoutSelector.cs


示例7: AccountController

 public AccountController(
     SiteSettings currentSite,
     SiteUserManager<SiteUser> userManager,
     SiteSignInManager<SiteUser> signInManager,
     IpAddressTracker ipAddressTracker,
     ISiteMessageEmailSender emailSender,
     ISmsSender smsSender,
     ILogger<AccountController> logger)
 {
     Site = currentSite; 
     this.userManager = userManager;
     this.signInManager = signInManager;
     this.emailSender = emailSender;
     this.smsSender = smsSender;
     this.ipAddressTracker = ipAddressTracker;
     log = logger;
 }
开发者ID:lespera,项目名称:cloudscribe,代码行数:17,代码来源:AccountController.cs


示例8: ManageController

 public ManageController(
     SiteSettings currentSite,
     SiteUserManager<SiteUser> userManager,
     SiteSignInManager<SiteUser> signInManager,
     ISmsSender smsSender,
     IStringLocalizer<CloudscribeCore> localizer,
     ITimeZoneIdResolver timeZoneIdResolver,
     ITimeZoneHelper timeZoneHelper
     )
 {
     Site = currentSite; 
     this.userManager = userManager;
     this.signInManager = signInManager;
    // this.emailSender = emailSender;
     this.smsSender = smsSender;
     sr = localizer;
     this.timeZoneIdResolver = timeZoneIdResolver;
     tzHelper = timeZoneHelper;
 }
开发者ID:ReinhardHsu,项目名称:cloudscribe,代码行数:19,代码来源:ManageController.cs


示例9: BuildInitialSite

        public static SiteSettings BuildInitialSite()
        {
            var newSite = new SiteSettings();
            newSite.SiteName = "Sample Site";
            newSite.AliasId = "s1";
            newSite.IsServerAdminSite = true;
            newSite.Theme = "default";
            newSite.AllowNewRegistration = true;
            newSite.AutoCreateLdapUserOnFirstLogin = true;
            newSite.ReallyDeleteUsers = true;
            newSite.LdapPort = 389;
            newSite.LdapRootDN = string.Empty;
            newSite.LdapServer = string.Empty;
            newSite.UseEmailForLogin = true;
            newSite.UseLdapAuth = false;
            newSite.RequireConfirmedEmail = false;
            newSite.RequiresQuestionAndAnswer = false;
            newSite.MaxInvalidPasswordAttempts = 10;
            newSite.MinRequiredPasswordLength = 7;

            return newSite;
        }
开发者ID:joeaudette,项目名称:cloudscribe,代码行数:22,代码来源:InitialData.cs


示例10: SiteManager

        public SiteManager(
            SiteSettings currentSite,
            ISiteRepository siteRepository,
            IUserRepository userRepository,
            SiteDataProtector dataProtector,
            IHttpContextAccessor contextAccessor,
            ILogger<SiteManager> logger,
            IOptions<MultiTenantOptions> multiTenantOptionsAccessor,
            IOptions<SiteConfigOptions> setupOptionsAccessor
            )
        {
            
            siteRepo = siteRepository;
            userRepo = userRepository;
            multiTenantOptions = multiTenantOptionsAccessor.Value;
            setupOptions = setupOptionsAccessor.Value;
            _context = contextAccessor?.HttpContext;
            this.dataProtector = dataProtector;
            log = logger;

            //resolver = siteResolver;
            siteSettings = currentSite;
        }
开发者ID:lespera,项目名称:cloudscribe,代码行数:23,代码来源:SiteManager.cs


示例11: FromISiteSettings

        //public bool UseSslOnAllPages { get; set; } = false;

        //public int PasswordAttemptWindowMinutes { get; set; } = 5;
        //public int MinReqNonAlphaChars { get; set; } = 0;

        //public bool RequireEnterEmailTwiceOnRegistration { get; set; } = false;

        //public bool AllowUserFullNameChange { get; set; } = true;

        //private string apiKeyExtra1 = string.Empty;
        //public string ApiKeyExtra1
        //{
        //    get { return apiKeyExtra1 ?? string.Empty; }
        //    set { apiKeyExtra1 = value; }
        //}

        //private string apiKeyExtra2 = string.Empty;
        //public string ApiKeyExtra2
        //{
        //    get { return apiKeyExtra2 ?? string.Empty; }
        //    set { apiKeyExtra2 = value; }
        //}

        //private string apiKeyExtra3 = string.Empty;
        //public string ApiKeyExtra3
        //{
        //    get { return apiKeyExtra3 ?? string.Empty; }
        //    set { apiKeyExtra3 = value; }
        //}

        //private string apiKeyExtra4 = string.Empty;
        //public string ApiKeyExtra4
        //{
        //    get { return apiKeyExtra4 ?? string.Empty; }
        //    set { apiKeyExtra4 = value; }
        //}

        //private string apiKeyExtra5 = string.Empty;
        //public string ApiKeyExtra5
        //{
        //    get { return apiKeyExtra5 ?? string.Empty; }
        //    set { apiKeyExtra5 = value; }
        //}


        public static SiteSettings FromISiteSettings(ISiteSettings i)
        {
            if(i == null) { return null; }

            SiteSettings s = new SiteSettings();
            s.ConcurrencyStamp = i.ConcurrencyStamp;
            s.AccountApprovalEmailCsv = i.AccountApprovalEmailCsv;
            s.AddThisDotComUsername = i.AddThisDotComUsername;
            s.AllowDbFallbackWithLdap = i.AllowDbFallbackWithLdap;
            s.AllowNewRegistration = i.AllowNewRegistration;
            s.AllowPersistentLogin = i.AllowPersistentLogin;
            s.AutoCreateLdapUserOnFirstLogin = i.AutoCreateLdapUserOnFirstLogin;
            s.CaptchaOnLogin = i.CaptchaOnLogin;
            s.CaptchaOnRegistration = i.CaptchaOnRegistration;
            s.CompanyCountry = i.CompanyCountry;
            s.CompanyFax = i.CompanyFax;
            s.CompanyLocality = i.CompanyLocality;
            s.CompanyName = i.CompanyName;
            s.CompanyPhone = i.CompanyPhone;
            s.CompanyPostalCode = i.CompanyPostalCode;
            s.CompanyPublicEmail = i.CompanyPublicEmail;
            s.CompanyRegion = i.CompanyRegion;
            s.CompanyStreetAddress = i.CompanyStreetAddress;
            s.CompanyStreetAddress2 = i.CompanyStreetAddress2;
            s.CreatedUtc = i.CreatedUtc;
            s.DefaultEmailFromAddress = i.DefaultEmailFromAddress;
            s.DefaultEmailFromAlias = i.DefaultEmailFromAlias;
            s.DisableDbAuth = i.DisableDbAuth;
            s.DkimPublicKey = i.DkimPublicKey;
            s.DkimPrivateKey = i.DkimPrivateKey;
            s.DkimDomain = i.DkimDomain;
            s.DkimSelector = i.DkimSelector;
            s.EmailLdapDbFallback = i.EmailLdapDbFallback;
            s.FacebookAppId = i.FacebookAppId;
            s.FacebookAppSecret = i.FacebookAppSecret;
            s.GoogleAnalyticsProfileId = i.GoogleAnalyticsProfileId;
            s.GoogleClientId = i.GoogleClientId;
            s.GoogleClientSecret = i.GoogleClientSecret;
            s.IsDataProtected = i.IsDataProtected;
            s.IsServerAdminSite = i.IsServerAdminSite;
            s.Theme = i.Theme;
            s.LdapDomain = i.LdapDomain;
            s.LdapPort = i.LdapPort;
            s.LdapRootDN = i.LdapRootDN;
            s.LdapServer = i.LdapServer;
            s.LdapUserDNKey = i.LdapUserDNKey;
            s.LoginInfoBottom = i.LoginInfoBottom;
            s.LoginInfoTop = i.LoginInfoTop;
            s.MaxInvalidPasswordAttempts = i.MaxInvalidPasswordAttempts;
            s.MicrosoftClientId = i.MicrosoftClientId;
            s.MicrosoftClientSecret = i.MicrosoftClientSecret;
            s.MinRequiredPasswordLength = i.MinRequiredPasswordLength;
            s.OidConnectAppId = i.OidConnectAppId;
            s.OidConnectAppSecret = i.OidConnectAppSecret;
            s.PreferredHostName = i.PreferredHostName;
//.........这里部分代码省略.........
开发者ID:joeaudette,项目名称:cloudscribe,代码行数:101,代码来源:SiteSettings.cs


示例12: Fetch

        public async Task<ISiteSettings> Fetch(
            string hostName, 
            CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();
            SiteSettings site = new SiteSettings();

            using (DbDataReader reader = await dbSiteSettings.GetSite(
                hostName,
                cancellationToken))
            {
                if (reader.Read())
                {
                    site.LoadFromReader(reader);
                }
            }

            if (site.SiteGuid == Guid.Empty) { return null; }//not found 

            //TODO: unless we also need a synchronous version of this method 
            // the below should be made async
            //List<ExpandoSetting> expandoProperties = GetExpandoProperties(site.SiteId);
            //site.LoadExpandoSettings(expandoProperties);

            return site;

        }
开发者ID:joeaudette,项目名称:cloudscribe.Core.Data,代码行数:27,代码来源:SiteRepository.cs


示例13: CreateRequiredRolesAndAdminUser

 public async Task CreateRequiredRolesAndAdminUser(SiteSettings site)
 {
     await EnsureRequiredRoles(site);
     await CreateAdminUser(site);
     
 }
开发者ID:joeaudette,项目名称:cloudscribe,代码行数:6,代码来源:SiteManager.cs


示例14: NewSite

        public async Task<ActionResult> NewSite(SiteBasicSettingsViewModel model)
        {
            ViewData["Title"] = "Create New Site";

            if (!ModelState.IsValid)
            {
                return View(model);
            }
            
            bool addHostName = false;

            if (multiTenantOptions.Mode == MultiTenantMode.FolderName)
            {
                if (string.IsNullOrEmpty(model.SiteFolderName))
                {
                    ModelState.AddModelError("foldererror", "Folder name is required.");

                    return View(model);
                }

                SiteFolder folder = await siteManager.GetSiteFolder(model.SiteFolderName);
                if (folder != null)
                {
                    ModelState.AddModelError("foldererror", "The selected folder name is already in use on another site.");

                    return View(model);
                }

            }
            else
            {
                ISiteHost host;

                if (!string.IsNullOrEmpty(model.HostName))
                {
                    model.HostName = model.HostName.Replace("https://", string.Empty).Replace("http://", string.Empty);

                    host = await siteManager.GetSiteHost(model.HostName);

                    if (host != null)
                    {

                        ModelState.AddModelError("hosterror", "The selected host/domain name is already in use on another site.");

                        return View(model);

                    }

                    addHostName = true;
                }




            }

            SiteSettings newSite = new SiteSettings();

            // only the first site created by setup page should be a server admin site
            newSite.IsServerAdminSite = false;

            newSite.SiteName = model.SiteName;
            
            if (multiTenantOptions.Mode == MultiTenantMode.FolderName)
            {
                newSite.SiteFolderName = model.SiteFolderName;
            }
            else if (addHostName)
            {
                newSite.PreferredHostName = model.HostName;
            }

            newSite.SiteIsClosed = model.IsClosed;
            newSite.SiteIsClosedMessage = model.ClosedMessage;
            
            //Site.SiteRepository.Save(newSite);
            bool result = await siteManager.CreateNewSite(newSite);
            result = await siteManager.CreateRequiredRolesAndAdminUser(newSite);

            if ((result) && (multiTenantOptions.Mode == MultiTenantMode.FolderName))
            {
                bool folderResult = await siteManager.EnsureSiteFolder(newSite);

            // for folder sites we need routes that match the folder
            // which are normally created during app startup
            // can we add routes here? or do we need to force the app to recycle?
            // this seems to work, but we really do need to restart
            // so that the per folder authentication gets setup too
            //cloudscribe.Web.Routing.RouteRegistrar.AddDefaultRouteForNewSiteFolder(folder.FolderName);

            //startup.TriggerStartup();
            //http://stackoverflow.com/questions/31339896/replacement-httpruntime-unloadappdomain-in-asp-net-5

            }

            if (result && addHostName)
            {
                bool hostResult = await siteManager.AddHost(
                            newSite.SiteGuid,
                            newSite.SiteId,
//.........这里部分代码省略.........
开发者ID:freemsly,项目名称:cloudscribe,代码行数:101,代码来源:SiteAdminController.cs


示例15: NewSite

        public async Task<ActionResult> NewSite(NewSiteViewModel model)
        {
            ViewData["Title"] = "Create New Site";

            if (!ModelState.IsValid)
            {
                return View(model);
            }
            
            bool addHostName = false;
            var newSite = new SiteSettings();
            newSite.Id = Guid.NewGuid();

            if (multiTenantOptions.Mode == MultiTenantMode.FolderName)
            {
                if (string.IsNullOrEmpty(model.SiteFolderName))
                {
                    model.AllTimeZones = tzHelper.GetTimeZoneList().Select(x =>
                               new SelectListItem
                               {
                                   Text = x,
                                   Value = x,
                                   Selected = model.TimeZoneId == x
                               });
                    ModelState.AddModelError("foldererror", sr["Folder name is required."]);
                    return View(model);
                }

                bool folderAvailable = await siteManager.FolderNameIsAvailable(newSite.Id, model.SiteFolderName);
                if (!folderAvailable)
                {
                    model.AllTimeZones = tzHelper.GetTimeZoneList().Select(x =>
                               new SelectListItem
                               {
                                   Text = x,
                                   Value = x,
                                   Selected = model.TimeZoneId == x
                               });
                    ModelState.AddModelError("foldererror", sr["The selected folder name is already in use on another site."]);
                    return View(model);
                }
            }
            else
            {
                ISiteHost host;
                if (!string.IsNullOrEmpty(model.HostName))
                {
                    model.HostName = model.HostName.Replace("https://", string.Empty).Replace("http://", string.Empty);
                    host = await siteManager.GetSiteHost(model.HostName);
                    if (host != null)
                    {
                        model.AllTimeZones = tzHelper.GetTimeZoneList().Select(x =>
                               new SelectListItem
                               {
                                   Text = x,
                                   Value = x,
                                   Selected = model.TimeZoneId == x
                               });
                        ModelState.AddModelError("hosterror", sr["The selected host/domain name is already in use on another site."]);
                        return View(model);
                    }
                    addHostName = true;
                }

            }
            
            // only the first site created by setup page should be a server admin site
            newSite.IsServerAdminSite = false;
            newSite.SiteName = model.SiteName;
            
            var siteNumber = 1 + await siteManager.CountOtherSites(Guid.Empty);
            newSite.AliasId = $"s{siteNumber}";
            

            if (multiTenantOptions.Mode == MultiTenantMode.FolderName)
            {
                newSite.SiteFolderName = model.SiteFolderName;
            }
            else if (addHostName)
            {
                newSite.PreferredHostName = model.HostName;
            }

            newSite.SiteIsClosed = model.IsClosed;
            newSite.SiteIsClosedMessage = model.ClosedMessage;
            
            await siteManager.CreateNewSite(newSite);
            await siteManager.CreateRequiredRolesAndAdminUser(
                newSite,
                model.Email,
                model.LoginName,
                model.DisplayName,
                model.Password
                );
            
            if (addHostName)
            {
                await siteManager.AddHost(newSite.Id, model.HostName);
            }
            
//.........这里部分代码省略.........
开发者ID:joeaudette,项目名称:cloudscribe,代码行数:101,代码来源:SiteAdminController.cs


示例16: CreateRequiredRolesAndAdminUser

        public async Task<bool> CreateRequiredRolesAndAdminUser(SiteSettings site)
        {
            bool result = await EnsureRequiredRoles(site);
            result = await CreateAdminUser(site);

            return result;

        }
开发者ID:ludev,项目名称:cloudscribe,代码行数:8,代码来源:SiteManager.cs


示例17: Fetch

        public async Task<ISiteSettings> Fetch(Guid siteGuid)
        {
            SiteSettings site = new SiteSettings();

            using (DbDataReader reader = await dbSiteSettings.GetSite(siteGuid))
            {
                if (reader.Read())
                {
                    site.LoadFromReader(reader);
                }

            }

            if (site.SiteGuid == Guid.Empty) { return null; }//not found 
            //TODO: unless we also need a synchronous version of this method 
            // the below should be made async
            List<ExpandoSetting> expandoProperties = GetExpandoProperties(site.SiteId);
            site.LoadExpandoSettings(expandoProperties);

            return site;


        }
开发者ID:okusnadi,项目名称:cloudscribe,代码行数:23,代码来源:SiteRepository.cs


示例18: CreateRequiredRolesAndAdminUser

        public async Task<bool> CreateRequiredRolesAndAdminUser(
            SiteSettings site)
        {



            //SiteRole adminRole = new SiteRole();
            //adminRole.DisplayName = "Admins";
            ////adminRole.DisplayName = "Administrators";
            //adminRole.SiteId = site.SiteId;
            //adminRole.SiteGuid = site.SiteGuid;
            //bool result = await userRepo.SaveRole(adminRole);
            //adminRole.DisplayName = "Administrators";
            //result = await userRepo.SaveRole(adminRole);

            //SiteRole roleAdminRole = new SiteRole();
            //roleAdminRole.DisplayName = "Role Admins";
            //roleAdminRole.SiteId = site.SiteId;
            //roleAdminRole.SiteGuid = site.SiteGuid;
            //result = await userRepo.SaveRole(roleAdminRole);

            //roleAdminRole.DisplayName = "Role Administrators";
            //result = await userRepo.SaveRole(roleAdminRole);

            //SiteRole contentAdminRole = new SiteRole();
            //contentAdminRole.DisplayName = "Content Administrators";
            //contentAdminRole.SiteId = site.SiteId;
            //contentAdminRole.SiteGuid = site.SiteGuid;
            //result = await userRepo.SaveRole(contentAdminRole);

            //SiteRole authenticatedUserRole = new SiteRole();
            //authenticatedUserRole.DisplayName = "Authenticated Users";
            //authenticatedUserRole.SiteId = site.SiteId;
            //authenticatedUserRole.SiteGuid = site.SiteGuid;
            //result = await userRepo.SaveRole(authenticatedUserRole);

            //// if using related sites mode there is a problem if we already have user [email protected]
            //// and we create another one in the child site with the same email and login so we need to make it different
            //// we could just skip creating this user since in related sites mode all users come from the first site
            //// but then if the config were changed to not related sites mode there would be no admin user
            //// so in related sites mode we create one only as a backup in case settings are changed later
            //int countOfSites = await siteRepo.GetCount();
            //string siteDifferentiator = string.Empty;
            //if (
            //    (countOfSites >= 1)
            //    && (multiTenantOptions.UseRelatedSitesMode)
            //    )
            //{
            //    if (site.SiteId > 1)
            //    {
            //        siteDifferentiator = site.SiteId.ToInvariantString();
            //    }
            //}


            //SiteUser adminUser = new SiteUser();
            //adminUser.SiteId = site.SiteId;
            //adminUser.SiteGuid = site.SiteGuid;
            //adminUser.Email = "admin" + siteDifferentiator + "@admin.com";
            //adminUser.DisplayName = "Admin";
            //adminUser.UserName = "admin" + siteDifferentiator;

            //adminUser.EmailConfirmed = true;
            //adminUser.AccountApproved = true;

            //// clear text password will be hashed upon login
            //// this format allows migrating from mojoportal
            //adminUser.PasswordHash = "admin||0"; //pwd/salt/format 


            //result = await userRepo.Save(adminUser);




            //result = await userRepo.AddUserToRole(
            //    adminRole.RoleId,
            //    adminRole.RoleGuid,
            //    adminUser.UserId,
            //    adminUser.UserGuid);

            bool result = await EnsureRequiredRoles(site);
            result = await CreateAdminUser(site);

            return result;

        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:87,代码来源:SiteManager.cs


示例19: FetchNonAsync

        public ISiteSettings FetchNonAsync(string hostName)
        {
            SiteSettings site = new SiteSettings();

            using (DbDataReader reader = dbSiteSettings.GetSiteNonAsync(hostName))
            {
                if (reader.Read())
                {
                    site.LoadFromReader(reader);
                }
            }

            if (site.SiteGuid == Guid.Empty) { return null; }//not found 

            List<ExpandoSetting> expandoProperties = GetExpandoProperties(site.SiteId);
            site.LoadExpandoSettings(expandoProperties);

            return site;

        }
开发者ID:ruelbtit2014,项目名称:cloudscribe,代码行数:20,代码来源:SiteRepository.cs


示例20: FromISiteSettings

        public static SiteSettings FromISiteSettings(ISiteSettings i)
        {
            if(i == null) { return null; }

            SiteSettings s = new SiteSettings();
            s.AddThisDotComUsername = i.AddThisDotComUsername;
            s.AllowDbFallbackWithLdap = i.AllowDbFallbackWithLdap;
            s.AllowNewRegistration = i.AllowNewRegistration;
            s.AllowPersistentLogin = i.AllowPersistentLogin;
            s.AllowUserFullNameChange = i.AllowUserFullNameChange;
            s.ApiKeyExtra1 = i.ApiKeyExtra1;
            s.ApiKeyExtra2 = i.ApiKeyExtra2;
            s.ApiKeyExtra3 = i.ApiKeyExtra3;
            s.ApiKeyExtra4 = i.ApiKeyExtra4;
            s.ApiKeyExtra5 = i.ApiKeyExtra5;
            s.AutoCreateLdapUserOnFirstLogin = i.AutoCreateLdapUserOnFirstLogin;
            s.CaptchaOnLogin = i.CaptchaOnLogin;
            s.CaptchaOnRegistration = i.CaptchaOnRegistration;
            s.CompanyCountry = i.CompanyCountry;
            s.CompanyFax = i.CompanyFax;
            s.CompanyLocality = i.CompanyLocality;
            s.CompanyName = i.CompanyName;
            s.CompanyPhone = i.CompanyPhone;
            s.CompanyPostalCode = i.CompanyPostalCode;
            s.CompanyPublicEmail = i.CompanyPublicEmail;
            s.CompanyRegion = i.CompanyRegion;
            s.CompanyStreetAddress = i.CompanyStreetAddress;
            s.CompanyStreetAddress2 = i.CompanyStreetAddress2;
            s.DefaultEmailFromAddress = i.DefaultEmailFromAddress;
            s.DisableDbAuth = i.DisableDbAuth;
            s.EmailLdapDbFallback = i.EmailLdapDbFallback;
            s.FacebookAppId = i.FacebookAppId;
            s.FacebookAppSecret = i.FacebookAppSecret;
            s.GoogleAnalyticsProfileId = i.GoogleAnalyticsProfileId;
            s.GoogleClientId = i.GoogleClientId;
            s.GoogleClientSecret = i.GoogleClientSecret;
            s.IsServerAdminSite = i.IsServerAdminSite;
            s.Layout = i.Layout;
            s.LdapDomain = i.LdapDomain;
            s.LdapPort = i.LdapPort;
            s.LdapRootDN = i.LdapRootDN;
            s.LdapServer = i.LdapServer;
            s.LdapUserDNKey = i.LdapUserDNKey;
            s.LoginInfoBottom = i.LoginInfoBottom;
            s.LoginInfoTop = i.LoginInfoTop;
            s.MaxInvalidPasswordAttempts = i.MaxInvalidPasswordAttempts;
            s.MicrosoftClientId = i.MicrosoftClientId;
            s.MicrosoftClientSecret = i.MicrosoftClientSecret;
            s.MinReqNonAlphaChars = i.MinReqNonAlphaChars;
            s.MinRequiredPasswordLength = i.MinRequiredPasswordLength;
            s.PasswordAttemptWindowMinutes = i.PasswordAttemptWindowMinutes;
            s.PreferredHostName = i.PreferredHostName;
            s.PrivacyPolicy = i.PrivacyPolicy;
            s.ReallyDeleteUsers = i.ReallyDeleteUsers;
            s.RecaptchaPrivateKey = i.RecaptchaPrivateKey;
            s.RecaptchaPublicKey = i.RecaptchaPublicKey;
            s.RegistrationAgreement = i.RegistrationAgreement;
            s.RegistrationPreamble = i.RegistrationPreamble;
            s.RequireApprovalBeforeLogin = i.RequireApprovalBeforeLogin;
            s.RequiresQuestionAndAnswer = i.RequiresQuestionAndAnswer;
            s.SiteFolderName = i.SiteFolderName;
            s.SiteGuid = i.SiteGuid;
            s.SiteId = i.SiteId;
            s.SiteIsClosed = i.SiteIsClosed;
            s.SiteIsClosedMessage = i.SiteIsClosedMessage;
            s.SiteName = i.SiteName;
            s.SmtpPassword = i.SmtpPassword;
            s.SmtpPort = i.SmtpPort;
            s.SmtpPreferredEncoding = i.SmtpPreferredEncoding;
            s.SmtpRequiresAuth = i.SmtpRequiresAuth;
            s.SmtpServer = i.SmtpServer;
            s.SmtpUser = i.SmtpUser;
            s.SmtpUseSsl = i.SmtpUseSsl;
            s.TimeZoneId = i.TimeZoneId;
            s.TwitterConsumerKey = i.TwitterConsumerKey;
            s.TwitterConsumerSecret = i.TwitterConsumerSecret;
            s.UseEmailForLogin = i.UseEmailForLogin;
            s.UseLdapAuth = i.UseLdapAuth;
            s.UseSecureRegistration = i.UseSecureRegistration;
            s.UseSslOnAllPages = i.UseSslOnAllPages;
            


            return s;
        }
开发者ID:freemsly,项目名称:cloudscribe,代码行数:85,代码来源:SiteSettings.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Models.SiteUser类代码示例发布时间:2022-05-26
下一篇:
C# Models.SiteHost类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap