in TeamCity.ServiceMessages/Write/ServiceMessageFormatter.cs [38:52]
public string FormatMessage([NotNull] string messageName, [NotNull] object anonymousProperties)
{
if (string.IsNullOrEmpty(messageName)) throw new ArgumentNullException(nameof(messageName));
if (anonymousProperties == null) throw new ArgumentNullException(nameof(anonymousProperties));
var propType = anonymousProperties.GetType();
#if !NET35 && !NET40
var properties = propType.GetTypeInfo().DeclaredProperties;
#else
var properties = propType.GetProperties();
#endif
return FormatMessage(
messageName,
properties.Select(x => new ServiceMessageProperty(x.Name, x.GetValue(anonymousProperties, null).ToString())));
}