static SiteOnSQLServerSettings() { string settingFile = GetSettingFile(); if (File.Exists(settingFile)) { instance = DataContractSerializationHelper.Deserialize<SiteOnSQLServerSettings>(settingFile); } else { instance = new SiteOnSQLServerSettings() { ConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;" }; Save(instance); } }
static SiteOnSQLServerSettings() { string settingFile = GetSettingFile(); if (File.Exists(settingFile)) { instance = DataContractSerializationHelper.Deserialize <SiteOnSQLServerSettings>(settingFile); } else { instance = new SiteOnSQLServerSettings() { ConnectionString = "Server=.\\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;" }; Save(instance); } }
public static void Save(SiteOnSQLServerSettings instance) { string settingFile = GetSettingFile(); DataContractSerializationHelper.Serialize(instance, settingFile); }
public static void Save(SiteOnSQLServerSettings instance) { string settingFile = GetSettingFile(); DataContractSerializationHelper.Serialize(instance, settingFile); }