Azure Config Generator
 All Classes Namespaces Files Functions Variables Properties
AzureConfigSpec.cs
Go to the documentation of this file.
1 using Newtonsoft.Json;
2 using System;
3 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading.Tasks;
7 
8 namespace FUSE.AzureConfig.Tasks
9 {
51  public class AzureConfigSpec
52  {
53  public AzureConfigSpec()
54  {
55  this.Environments = new Dictionary<string, EnvironmentSpec>();
56  this.Roles = new List<RoleSpec>();
57  }
58 
59  public string Name { get; set; }
60 
61  [JsonProperty("envs")]
62  public Dictionary<string, EnvironmentSpec> Environments { get; set; }
63 
64  public List<RoleSpec> Roles { get; set; }
65  }
66 
67  public class EnvironmentSpec
68  {
69  public EnvironmentSpec()
70  {
71  this.Roles = new Dictionary<string, RoleSpec>();
72  this.ConfigSettings = new Dictionary<string, Dictionary<string, string>>();
73  }
74 
75  public string Parent { get; set; }
76 
77  public string ProfileName { get; set; }
78 
79  public Dictionary<string, RoleSpec> Roles { get; set; }
80 
81  public Dictionary<string, Dictionary<string, string>> ConfigSettings { get; set; }
82  }
83 
84  public class RoleSpec
85  {
86  // Usually specified at top level.
87  public string Type { get; set; }
88 
89  // Usually specified at instance level.
90  public int Instances { get; set; }
91  }
92 }
JSON-based azure configuration specification.