Esempio n. 1
0
 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");
     }
 }
Esempio n. 2
0
 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
     }));
 }