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); } }
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; }
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); }