Files
GSS2Rework/GSS2.Core/Abstractions/ServiceConfigurationBase.cs
T
2026-02-12 08:34:19 +03:00

12 lines
420 B
C#

namespace GSS2.Core.Abstractions;
public abstract record ServiceConfigurationBase
{
public virtual string ToString(string separator, int indent)
{
List<string?> strs = new List<string?>();
foreach (var prop in GetType().GetProperties())
strs.Add($"{prop.Name}: {prop.GetValue(this)}");
return string.Join(separator, strs.Select(s => $"{new string(' ', indent)}{s}"));
}
}