Example #1
0
 static void WriteStringImpl(StringBuilder sb, string s, bool comment, GUIDToCommentMap comments)
 {
     if (comment)
     {
         comments.WriteStringBuilder(sb, s);
     }
     else
     {
         sb.Append(PBXStream.QuoteStringIfNeeded(s));
     }
 }
Example #2
0
        public override void WriteSection(StringBuilder sb, GUIDToCommentMap comments)
        {
            if (m_Entries.Count == 0)
            {
                return;                            // do not write empty sections
            }
            sb.AppendFormat("\n\n/* Begin {0} section */", m_Name);
            var keys = new List <string>(m_Entries.Keys);

            keys.Sort(StringComparer.Ordinal);
            foreach (string key in keys)
            {
                T obj = m_Entries[key];
                obj.UpdateProps();
                sb.Append("\n\t\t");
                comments.WriteStringBuilder(sb, obj.guid);
                sb.Append(" = ");
                Serializer.WriteDict(sb, obj.GetPropertiesWhenSerializing(), 2,
                                     obj.shouldCompact, obj.checker, comments);
                sb.Append(";");
            }
            sb.AppendFormat("\n/* End {0} section */", m_Name);
        }
Example #3
0
		static void WriteStringImpl( StringBuilder sb, string s, bool comment, GUIDToCommentMap comments )
		{
			if (comment)
				comments.WriteStringBuilder( sb, s );
			else
				sb.Append( PBXStream.QuoteStringIfNeeded( s ) );
		}