예제 #1
0
        private void WriteDependencySpec(JObject json, DependencySpec data)
        {
            var value = new JObject();

            json[data.Name] = value;
            foreach (var x in data.Implementations.Values)
            {
                WriteImplementationSpec(value, x);
            }
        }
예제 #2
0
 public DependencySpec ReadDependencySpec(KeyValuePair<string, JToken> json)
 {
     var dependency = new DependencySpec();
     dependency.Name = json.Key;
     foreach (var implementation in EachProperty(json.Value).Select(ReadImplementationSpec))
     {
         dependency.Implementations.Add(implementation.Name, implementation);
     }
     return dependency;
 }
예제 #3
0
        public DependencySpec ReadDependencySpec(KeyValuePair <string, JToken> json)
        {
            var dependency = new DependencySpec();

            dependency.Name = json.Key;
            foreach (var implementation in EachProperty(json.Value).Select(ReadImplementationSpec))
            {
                dependency.Implementations.Add(implementation.Name, implementation);
            }
            return(dependency);
        }
예제 #4
0
 private void WriteDependencySpec(JObject json, DependencySpec data)
 {
     var value = new JObject();
     json[data.Name] = value;
     foreach (var x in data.Implementations.Values)
     {
         WriteImplementationSpec(value, x);
     }
 }