32 lines
794 B
C#
32 lines
794 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace LightSetupMd5
|
|
{
|
|
internal class StringFormatHandleDictionary : StringFormatHandle
|
|
{
|
|
private Dictionary<string, string> targets;
|
|
|
|
public StringFormatHandleDictionary(Dictionary<string, string> targets)
|
|
{
|
|
this.targets = targets;
|
|
}
|
|
|
|
public void addPos(StringBuilder sb, string group, string fieldFull, string field, string command)
|
|
{
|
|
if (!targets.ContainsKey(field))
|
|
{
|
|
return;
|
|
}
|
|
string value = targets[field];
|
|
if (!string.IsNullOrEmpty(value))
|
|
{
|
|
sb.Append(value);
|
|
}
|
|
}
|
|
}
|
|
}
|