Ejemplo n.º 1
0
        public static AllowedDistributions FromString(string value)
        {
            AllowedDistributions allowedDistributions = new AllowedDistributions();

            foreach (string s in value.Split(';'))
            {
                allowedDistributions.Add(s.Trim());
            }

            return(allowedDistributions);
        }
Ejemplo n.º 2
0
        public static HostApplication Load(XmlElement xmlElement)
        {
            if (!xmlElement.Name.Equals("HostApplication"))
            {
                return(null);
            }

            XmlAttribute name                = xmlElement.Attributes["Name"];
            XmlAttribute minVersion          = xmlElement.Attributes["MinVersion"];
            XmlAttribute allowedDistribuions = xmlElement.Attributes["AllowedDistributions"];

            HostApplication hostApplication = new HostApplication();

            hostApplication.Name                 = name.Value;
            hostApplication.MinVersion           = minVersion.Value;
            hostApplication.AllowedDistributions = AllowedDistributions.FromString(allowedDistribuions.Value);

            return(hostApplication);
        }