mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added new section to handle the PreventTransferForClassNames settings.
This commit is contained in:
parent
afa461f956
commit
a54f1e5381
17 changed files with 484 additions and 35 deletions
|
|
@ -113,7 +113,7 @@ namespace ServerManagerTool.Common.Model
|
|||
var propName = string.IsNullOrWhiteSpace(attr?.Key) ? prop.Name : attr.Key;
|
||||
|
||||
var val = prop.GetValue(this);
|
||||
var propValue = StringUtils.GetPropertyValue(val, prop);
|
||||
var propValue = StringUtils.GetPropertyValue(val, prop, attr?.QuotedString ?? true);
|
||||
|
||||
if ((attr?.ExcludeIfEmpty ?? false) && string.IsNullOrWhiteSpace(propValue))
|
||||
{
|
||||
|
|
@ -121,7 +121,9 @@ namespace ServerManagerTool.Common.Model
|
|||
}
|
||||
else
|
||||
{
|
||||
result.Append($"{propName}={propValue}");
|
||||
if (!(attr?.ExcludePropertyName ?? false))
|
||||
result.Append($"{propName}=");
|
||||
result.Append($"{propValue}");
|
||||
|
||||
delimiter = DELIMITER.ToString();
|
||||
}
|
||||
|
|
@ -242,10 +244,11 @@ namespace ServerManagerTool.Common.Model
|
|||
}
|
||||
else
|
||||
{
|
||||
var propValue = StringUtils.GetPropertyValue(val, prop);
|
||||
var propValue = StringUtils.GetPropertyValue(val, prop, attr?.QuotedString ?? true);
|
||||
|
||||
result.Append(delimiter);
|
||||
result.Append($"{propName}=");
|
||||
if (!(attr?.ExcludePropertyName ?? false))
|
||||
result.Append($"{propName}=");
|
||||
if (attr?.ValueWithinBrackets ?? false)
|
||||
result.Append("(");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue