public class WmiServiceTarget : SensorTarget<WmiServiceTarget>
在测试期间,我需要具有以下构造函数的以下类的实例:
private WmiServiceTarget(string raw): base(raw)
{
DisplayName = components[1];
Description = components[2];
Status = components[3].XmlToEnum<WmiServiceStatus>();
}
在SensorTarget
构造函数中:
protected SensorTarget(string raw)
{
if (raw == null)
{
throw new ArgumentNullException("raw");
}
this.raw = raw;
components = raw.Split(new char[1]
{
'|'
});
Name = components[0];
}
有没有办法获取 WmiServiceTarget 的实例。