コード例 #1
0
        public static XElement SetRegisterBody(this Config config, XElement xCommand)
        {
            var computer = Computer.GetLocalHost();

            xCommand.SetAttributeValue(Constants._ID, config.Get(Constants._ID));
            xCommand.SetAttributeValue("ComputerName", computer.ComputerName);
            xCommand.SetAttributeValue("IPAddress", computer.IPAddress);
            xCommand.SetAttributeValue("Version", computer.Version);
            foreach (string key in config.GetList().Keys)
            {
                xCommand.SetAttributeValue(key, config.GetList()[key]);
            }
            return(xCommand);
        }