forked from amkovkov/GranuSightSoftware2
12 lines
420 B
C#
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}"));
|
|
}
|
|
} |