public virtual void Save() { using (var reg = new WebApiProviderSettings(providerDescriptor.ProviderKey)) { reg.Enabled = IsEnabled; reg.Url = Url; reg.ApiKey = ApiKey; reg.SecretKey = SecretKey; } providerDescriptor.IsEnabled = IsEnabled; providerDescriptor.Data["Url"] = Url ?? String.Empty; providerDescriptor.Data["ApiKey"] = ApiKey ?? String.Empty; providerDescriptor.Data["SecretKey"] = SecretKey ?? String.Empty; ((IWebApiProviderDescriptor)providerDescriptor).Initialize(); }
protected override void LoadSettings() { IsNotifying = false; using (var reg = new WebApiProviderSettings(providerDescriptor.ProviderKey)) { IsEnabled = reg.Enabled; Url = !String.IsNullOrEmpty(reg.Url) ? reg.Url : Url; ApiKey = !String.IsNullOrEmpty(reg.ApiKey) ? reg.ApiKey : ApiKey; SecretKey = !String.IsNullOrEmpty(reg.SecretKey) ? reg.SecretKey : SecretKey; } providerDescriptor.IsEnabled = IsEnabled; providerDescriptor.Data["Url"] = Url ?? String.Empty; providerDescriptor.Data["ApiKey"] = ApiKey ?? String.Empty; providerDescriptor.Data["SecretKey"] = SecretKey ?? String.Empty; IsNotifying = true; Refresh(); }
protected override void LoadSettings() { IsNotifying = false; using (var reg = new WebApiProviderSettings(this.providerDescriptor.ProviderKey)) { this.IsEnabled = reg.Enabled; this.Url = !String.IsNullOrEmpty(reg.Url) ? reg.Url : this.Url; this.ApiKey = !String.IsNullOrEmpty(reg.ApiKey) ? reg.ApiKey : this.ApiKey; this.SecretKey = !String.IsNullOrEmpty(reg.SecretKey) ? reg.SecretKey : this.SecretKey; } this.providerDescriptor.IsEnabled = this.IsEnabled; this.providerDescriptor.Data["Url"] = this.Url ?? String.Empty; this.providerDescriptor.Data["ApiKey"] = this.ApiKey ?? String.Empty; this.providerDescriptor.Data["SecretKey"] = this.SecretKey ?? String.Empty; IsNotifying = true; Refresh(); }
public virtual void Save() { using (var reg = new WebApiProviderSettings(this.providerDescriptor.ProviderKey)) { reg.Enabled = this.IsEnabled; reg.Url = this.Url; reg.ApiKey = this.ApiKey; reg.SecretKey = this.SecretKey; } this.providerDescriptor.IsEnabled = this.IsEnabled; this.providerDescriptor.Data["Url"] = this.Url ?? String.Empty; this.providerDescriptor.Data["ApiKey"] = this.ApiKey ?? String.Empty; this.providerDescriptor.Data["SecretKey"] = this.SecretKey ?? String.Empty; ((IWebApiProviderDescriptor)this.providerDescriptor).Initialize(); }