diff options
| author | Bond_009 <Bond.009@outlook.com> | 2020-07-22 14:34:51 +0200 |
|---|---|---|
| committer | Bond_009 <Bond.009@outlook.com> | 2020-07-22 14:34:51 +0200 |
| commit | 4d681e3cad3e74fa99dae4a483c7e258e345b001 (patch) | |
| tree | 0a26e8ba1ab3ca9edd7ca1d4cd241421dc63a429 /Emby.Dlna | |
| parent | 0750357916b600a4b4c27bc4babd2adcc6390473 (diff) | |
Optimize StringBuilder.Append calls
Diffstat (limited to 'Emby.Dlna')
| -rw-r--r-- | Emby.Dlna/Eventing/EventManager.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Emby.Dlna/Eventing/EventManager.cs b/Emby.Dlna/Eventing/EventManager.cs index 56c90c8b3a..7d02f5e960 100644 --- a/Emby.Dlna/Eventing/EventManager.cs +++ b/Emby.Dlna/Eventing/EventManager.cs @@ -152,11 +152,15 @@ namespace Emby.Dlna.Eventing builder.Append("<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">"); foreach (var key in stateVariables.Keys) { - builder.Append("<e:property>"); - builder.Append("<" + key + ">"); - builder.Append(stateVariables[key]); - builder.Append("</" + key + ">"); - builder.Append("</e:property>"); + builder.Append("<e:property>") + .Append('<') + .Append(key) + .Append('>') + .Append(stateVariables[key]) + .Append("</") + .Append(key) + .Append('>') + .Append("</e:property>"); } builder.Append("</e:propertyset>"); |
