public static void WriteDictKeyValue(StringBuilder sb, string key, PBXElement value, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments) { if (!compact) { sb.Append("\n"); sb.Append(Serializer.GetIndent(indent)); } Serializer.WriteStringImpl(sb, key, checker.CheckKeyInDict(key), comments); sb.Append(" = "); if (value is PBXElementString) { Serializer.WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInDict(key, value.AsString()), comments); } else if (value is PBXElementDict) { Serializer.WriteDict(sb, value.AsDict(), indent, compact, checker.NextLevel(key), comments); } else if (value is PBXElementArray) { Serializer.WriteArray(sb, value.AsArray(), indent, compact, checker.NextLevel(key), comments); } sb.Append(";"); if (!compact) { return; } sb.Append(" "); }
public static void WriteDictKeyValue(StringBuilder sb, string key, PBXElement value, int indent, bool compact, PropertyCommentChecker checker, GUIDToCommentMap comments) { if (!compact) { sb.Append("\n"); sb.Append(GetIndent(indent)); } WriteStringImpl(sb, key, checker.CheckKeyInDict(key), comments); sb.Append(" = "); if (value is PBXElementString) WriteStringImpl(sb, value.AsString(), checker.CheckStringValueInDict(key, value.AsString()), comments); else if (value is PBXElementDict) WriteDict(sb, value.AsDict(), indent, compact, checker.NextLevel(key), comments); else if (value is PBXElementArray) WriteArray(sb, value.AsArray(), indent, compact, checker.NextLevel(key), comments); sb.Append(";"); if (compact) sb.Append(" "); }