static FileServerProviderSettings() { string settingFile = GetSettingFile(); if (File.Exists(settingFile)) { instance = DataContractSerializationHelper.Deserialize<FileServerProviderSettings>(settingFile); } else { instance = new FileServerProviderSettings() { Endpoint = "http://localhost:8626/", AccountName = "devstoreaccount1", AccountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" }; Save(instance); } }
static FileServerProviderSettings() { string settingFile = GetSettingFile(); if (File.Exists(settingFile)) { instance = DataContractSerializationHelper.Deserialize <FileServerProviderSettings>(settingFile); } else { instance = new FileServerProviderSettings() { Endpoint = "http://localhost:8626/", AccountName = "devstoreaccount1", AccountKey = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" }; Save(instance); } }
public static void Save(FileServerProviderSettings instance) { string settingFile = GetSettingFile(); DataContractSerializationHelper.Serialize(instance, settingFile); }