public static void SaveBuildMessage(string fileName, BuildMessage bm) { if (string.IsNullOrEmpty(fileName)) { throw new ArgumentNullException("fileName"); } if (bm == null) { return; } using (var writer = new StreamWriter(fileName)) { JsonUtility.Serialize( writer, bm.ToDictionary( p => p.Key, p => { using (var sw = new StringWriter()) { p.Value.Save(sw); return(sw.ToString()); } })); } }
public static void SaveBuildMessage(string fileName, BuildMessage bm) { if (string.IsNullOrEmpty(fileName)) { throw new ArgumentNullException("fileName"); } if (bm == null) { return; } using (var writer = new StreamWriter(fileName)) { JsonUtility.Serialize( writer, bm.ToDictionary( p => p.Key, p => SaveSerializedBuildMessageInfo(p.Value, Path.GetDirectoryName(fileName)))); } }