smallbusinessdataproviderssection.cs

来自「个人网站开发模板」· CS 代码 · 共 71 行

CS
71
字号
using System;
using System.Configuration;


public class SmallBusinessDataProvidersSection : ConfigurationSection
{

    [ConfigurationProperty("peopleProviderName", IsRequired = true)]
    public string PeopleProviderName
    {
        get { return (string)this["peopleProviderName"]; }
        set { this["peopleProviderName"] = value; }
    }

    [ConfigurationProperty("testimonialsProviderName", IsRequired = true)]
    public string TestimonialsProviderName
    {
        get { return (string)this["testimonialsProviderName"]; }
        set { this["testimonialsProviderName"] = value; }
    }

    [ConfigurationProperty("newsProviderName", IsRequired = true)]
    public string NewsProviderName
    {
        get { return (string)this["newsProviderName"]; }
        set { this["newsProviderName"] = value; }
    }

    [ConfigurationProperty("catalogProviderName", IsRequired = true)]
    public string CatalogProviderName
    {
        get { return (string)this["catalogProviderName"]; }
        set { this["catalogProviderName"] = value; }
    }


    [ConfigurationProperty("PeopleProviders")]
    [ConfigurationValidatorAttribute(typeof(ProviderSettingsValidation))]
    public ProviderSettingsCollection PeopleProviders
    {
        get { return (ProviderSettingsCollection)this["PeopleProviders"]; }

    }


    [ConfigurationProperty("TestimonialsProviders")]
    [ConfigurationValidatorAttribute(typeof(ProviderSettingsValidation))]
    public ProviderSettingsCollection TestimonialsProviders
    {
        get { return (ProviderSettingsCollection)this["TestimonialsProviders"]; }

    }

    [ConfigurationProperty("NewsProviders")]
    [ConfigurationValidatorAttribute(typeof(ProviderSettingsValidation))]
    public ProviderSettingsCollection NewsProviders
    {
        get { return (ProviderSettingsCollection)this["NewsProviders"]; }

    }

    [ConfigurationProperty("CatalogProviders")]
    [ConfigurationValidatorAttribute(typeof(ProviderSettingsValidation))]
    public ProviderSettingsCollection CatalogProviders
    {
        get { return (ProviderSettingsCollection)this["CatalogProviders"]; }

    }

} // end class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?