0

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 的实例。

所有课程都可以在https://github.com/lordmilko/PrtgAPI中找到

4

0 回答 0