public void Register(string profileServiceName, Profile profile) { try { string content = ProfileServiceFactory.Profile.GetProfileContent(profileServiceName, profile.Application, profile.ProfileName); if (!string.IsNullOrWhiteSpace(content)) { bool ischange = SaveProfileHelper.Save(profile.FilePath, content); if (ischange) { profile.IsChanged = true; } } } catch (Exception e) { LogManager.Error("拉取配置文件异常", e.Message); } profiles.Add(profile.SubscribeKey, profile); }
private void UpdateLocalProfile(string content) { SaveProfileHelper.Save(this.FilePath, content); this.IsChanged = true; }