diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:47:32 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-29 14:47:32 +0700 |
commit | a395a34a769d3c7e6616129f4832b7014dbbfe98 (patch) | |
tree | 76a4749c2f548afff826c6758de3c8ce0b6fd646 /crypto/src/asn1/x509/DistributionPointName.cs | |
parent | Generics migration complete (diff) | |
download | BouncyCastle.NET-ed25519-a395a34a769d3c7e6616129f4832b7014dbbfe98.tar.xz |
Cleanup NewLine handling
Diffstat (limited to 'crypto/src/asn1/x509/DistributionPointName.cs')
-rw-r--r-- | crypto/src/asn1/x509/DistributionPointName.cs | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/crypto/src/asn1/x509/DistributionPointName.cs b/crypto/src/asn1/x509/DistributionPointName.cs index 43fdaf533..bca54fa06 100644 --- a/crypto/src/asn1/x509/DistributionPointName.cs +++ b/crypto/src/asn1/x509/DistributionPointName.cs @@ -92,39 +92,30 @@ namespace Org.BouncyCastle.Asn1.X509 public override string ToString() { - string sep = Platform.NewLine; StringBuilder buf = new StringBuilder(); - buf.Append("DistributionPointName: ["); - buf.Append(sep); + buf.AppendLine("DistributionPointName: ["); if (type == FullName) { - appendObject(buf, sep, "fullName", name.ToString()); + AppendObject(buf, "fullName", name.ToString()); } else { - appendObject(buf, sep, "nameRelativeToCRLIssuer", name.ToString()); + AppendObject(buf, "nameRelativeToCRLIssuer", name.ToString()); } - buf.Append("]"); - buf.Append(sep); + buf.AppendLine("]"); return buf.ToString(); } - private void appendObject( - StringBuilder buf, - string sep, - string name, - string val) + private void AppendObject(StringBuilder buf, string name, string val) { string indent = " "; - buf.Append(indent); buf.Append(name); - buf.Append(":"); - buf.Append(sep); + buf.AppendLine(":"); buf.Append(indent); buf.Append(indent); buf.Append(val); - buf.Append(sep); - } - } + buf.AppendLine(); + } + } } |