public void CalculateEndpoints(int appId) { if (string.IsNullOrEmpty(this.EventsServer) || this.EventsServer == "https://api.swrve.com") { this.EventsServer = SwrveConfig.CalculateEndpoint(this.UseHttpsForEventsServer, appId, this.SelectedStack, "api.swrve.com"); } if (string.IsNullOrEmpty(this.ContentServer) || this.ContentServer == "https://content.swrve.com") { this.ContentServer = SwrveConfig.CalculateEndpoint(this.UseHttpsForContentServer, appId, this.SelectedStack, "content.swrve.com"); } }
private static string CalculateEndpoint(bool useHttps, int appId, Stack stack, string suffix) { return(string.Concat(new object[] { SwrveConfig.HttpSchema(useHttps), "://", appId, ".", SwrveConfig.GetStackPrefix(stack), suffix })); }