示例#1
0
 static void WriteStringImpl(StringBuilder sb, string s, bool comment, GUIDToCommentMap comments)
 {
     if (comment)
     {
         sb.Append(comments.Write(s));
     }
     else
     {
         sb.Append(PBXStream.QuoteStringIfNeeded(s));
     }
 }
 public override void WriteSection(StringBuilder sb, GUIDToCommentMap comments)
 {
     if (entries.Count == 0)
     {
         return;            // do not write empty sections
     }
     sb.AppendFormat("\n\n/* Begin {0} section */", m_Name);
     foreach (T obj in entries.Values)
     {
         obj.UpdateProps();
         sb.AppendFormat("\n\t\t{0} = ", comments.Write(obj.guid));
         Serializer.WriteDict(sb, obj.GetPropertiesWhenSerializing(), 2,
                              obj.shouldCompact, obj.checker, comments);
         sb.Append(";");
     }
     sb.AppendFormat("\n/* End {0} section */", m_Name);
 }