public void AddServer(ServerSetting server) { if (!String.IsNullOrWhiteSpace(server.ServerName) && !String.IsNullOrWhiteSpace(server.ServerHost)) { ServerSetting old = ServerList.FirstOrDefault(item => item.ServerHost.Equals(server.ServerHost, StringComparison.CurrentCultureIgnoreCase)); if (old != null) { old.ServerHost = server.ServerHost; } else { ServerList.Add(server); } SaveConfig(); } }
private void addCustomHostBtn_Click(object sender, RoutedEventArgs e) { string hname = hostName.Text; string haddress = hostAddress.Text; ServerSetting server = new ServerSetting() { ServerHost = haddress, ServerName = hname }; SalesforceApplication.ServerConfiguration.AddServer(server); ServerFlyout.ShowAt(applicationTitle); }
private void StartLoginFlow(ServerSetting server) { if (server != null) { VisualStateManager.GoToState(this, LoggingUserInViewState, true); SDKManager.ResetClientManager(); SalesforceConfig config = SDKManager.ServerConfiguration; var options = new LoginOptions(server.ServerHost, config.ClientId, config.CallbackUrl, config.Scopes); SalesforceConfig.LoginOptions = new LoginOptions(server.ServerHost, config.ClientId, config.CallbackUrl, config.Scopes); StartLoginFlow(options); } }
private void addCustomHostBtn_Click(object sender, RoutedEventArgs e) { string hname = HostName.Text; string haddress = HostAddress.Text; if (String.IsNullOrWhiteSpace(haddress)) { return; } if (String.IsNullOrWhiteSpace(hname)) { hname = haddress; } var server = new ServerSetting { ServerHost = haddress, ServerName = hname }; SDKManager.ServerConfiguration.AddServer(server); TryShowFlyout(ServerFlyout, ApplicationTitle); }
public virtual bool GetUseTwoParamAuthAsyncMethodForServer(ServerSetting server) { return(false); }
public virtual WebAuthenticationOptions GetOptionsForServer(ServerSetting server) { return(WebAuthenticationOptions.None); }
public virtual string GetCallbackUrlForServer(ServerSetting server) { return(string.Empty); }
public virtual string GetClientIdForServer(ServerSetting server) { return(string.Empty); }