示例#1
0
 public static bool IsSwaggerWebsite(this CloudOdsWebsite site)
 {
     return(site.IsInRole(CloudOdsRole.Swagger));
 }
示例#2
0
 public static bool IsProductionApi(this CloudOdsWebsite site)
 {
     return(site.IsInRole(CloudOdsRole.Api) && site.IsInEnvironment(CloudOdsEnvironment.Production));
 }
示例#3
0
 public static bool IsAdminApp(this CloudOdsWebsite site)
 {
     return(site.IsInRole(CloudOdsRole.AdminApp));
 }
示例#4
0
 public static bool IsInEnvironment(this CloudOdsWebsite site, CloudOdsEnvironment environment)
 {
     return(site.Environment == environment);
 }
示例#5
0
 public static bool IsInRole(this CloudOdsWebsite site, CloudOdsRole role)
 {
     return(site.Role == role);
 }
示例#6
0
 public static string GetTagValue(this CloudOdsWebsite site, string tagName)
 {
     return(site.HasTag(tagName) ? site.Tags[tagName] : null);
 }
示例#7
0
 public static bool HasTagWithValue(this CloudOdsWebsite site, string tagName, string tagValue)
 {
     return(site.HasTag(tagName) &&
            site.Tags[tagName].Equals(tagValue, StringComparison.InvariantCultureIgnoreCase));
 }
示例#8
0
 public static bool HasTag(this CloudOdsWebsite site, string tagName)
 {
     return(site.Tags != null && site.Tags.ContainsKey(tagName));
 }