コード例 #1
0
 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());
             }
         }));
     }
 }
コード例 #2
0
 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))));
     }
 }