1. 51.
    0
    public DevicePorts()
    {
    const string PLATFORM = "platform.xml";

    XmlDocument doc = new XmlDocument();
    doc. Load(PLATFORM);

    int channelCount = Convert. ToInt32(doc. SelectSingleNode("/appsettings/app-config/device-port-settings/@device-port-count").Value);

    for (int i = 1; i <= channelCount; i++)
    {
    string[] x = AppSettings["device-port-" + i].ToString().Split(':');
    Ht.Add(Convert. ToInt32(x[1]), Convert. ToInt32(doc. SelectSingleNode("/appsettings/app-config/device-port-settings/device-port-"+i+"/@device-id").Value));
    }


    }
    ···
   tümünü göster