예제 #1
0
 static MemberEntitySetting()
 {
     string settingFile = GetSettingFile();
     if (File.Exists(settingFile))
     {
         instance = DataContractSerializationHelper.Deserialize<MemberEntitySetting>(settingFile);
     }
     else
     {
         instance = new MemberEntitySetting()
         {
             ConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;",
             ProviderInvariantName = "System.Data.SqlClient",
             ProviderManifestToken = "2008"
         };
         Save(instance);
     }
 }
예제 #2
0
        static MemberEntitySetting()
        {
            string settingFile = GetSettingFile();

            if (File.Exists(settingFile))
            {
                instance = DataContractSerializationHelper.Deserialize <MemberEntitySetting>(settingFile);
            }
            else
            {
                instance = new MemberEntitySetting()
                {
                    ConnectionString      = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;",
                    ProviderInvariantName = "System.Data.SqlClient",
                    ProviderManifestToken = "2008"
                };
                Save(instance);
            }
        }
예제 #3
0
 public static void Save(MemberEntitySetting instance)
 {
     string settingFile = GetSettingFile();
     DataContractSerializationHelper.Serialize(instance, settingFile);
 }
예제 #4
0
        public static void Save(MemberEntitySetting instance)
        {
            string settingFile = GetSettingFile();

            DataContractSerializationHelper.Serialize(instance, settingFile);
        }