Inheritance: System.Dynamic.DynamicObject
Beispiel #1
0
 private object FilterValue(object p)
 {
     return
         ((p is bool) ?
          p.ToString() :
          (ConfigObject.IsNullObject(p) ?
           String.Empty :
           p));
 }
Beispiel #2
0
 public ConfigTemplateModel(SecretStore secrets, Service service)
 {
     Resources = new ConfigObject(
         service
         .Datacenter
         .Resources
         .GroupBy(r => r.Type)
         .ToDictionary(g => g.Key, g => (object)g.ToDictionary(r => r.Name, r => ResolveValue(secrets, service, r))));
     Service  = service;
     Services = new ConfigObject(
         service
         .Datacenter
         .Services
         .ToDictionary(s => s.Name, s => (object)new ServiceModel(s, secrets)));
 }
 public ConfigTemplateModel(SecretStore secrets, Service service)
 {
     Resources = new ConfigObject(
         service
             .Datacenter
             .Resources
             .GroupBy(r => r.Type)
             .ToDictionary(g => g.Key, g => (object)g.ToDictionary(r => r.Name, r => ResolveValue(secrets, service, r))));
     Service = service;
     Services = new ConfigObject(
         service
             .Datacenter
             .Services
             .ToDictionary(s => s.Name, s => (object)new ServiceModel(s, secrets)));
 }
 public ServiceModel(Service service, SecretStore secrets)
 {
     _service    = service;
     _secrets    = secrets;
     _attributes = new ConfigObject(service.Attributes.ToDictionary(p => p.Key, p => (object)p.Value));
 }
Beispiel #5
0
 public ServiceModel(Service service, SecretStore secrets)
 {
     _service = service;
     _secrets = secrets;
     _attributes = new ConfigObject(service.Attributes.ToDictionary(p => p.Key, p => (object)p.Value));
 }