public static void CreateDesc(Proto.Doc.json_doc jsonDoc) { foreach (var t in jsonDoc.Files) { Files[t.Name] = new FileDoc(t); } }
public static void CreateDoc(string path) { Proto.Doc.json_doc jsonDoc = new Proto.Doc.json_doc(); if (File.Exists(path)) { string json = File.ReadAllText(path); jsonDoc = Proto.Doc.json_doc.Parser.ParseJson(json); JsonDoc.CreateDesc(jsonDoc); } else { throw new ArgumentException("path is not exists '" + path + "'."); } }