internal KrystalwareRuntimeLicense(XmlDocument doc)
		{
			_licenseKey = doc.OuterXml;

			foreach (XmlElement el in doc.DocumentElement.ChildNodes)
			{
				switch (el.Name)
				{
					case "Customer":
						_customerName = el.GetAttribute("Name");

						break;
					case "Products":
						RuntimeLicensedProduct[] products = new RuntimeLicensedProduct[el.ChildNodes.Count];

						int i = 0;

						foreach (XmlElement prodEl in el.ChildNodes)
						{
							products[i] = new RuntimeLicensedProduct(prodEl);

							i++;
						}

						_licensedProducts = products;

						break;
				}
			}
		}
Exemplo n.º 2
0
        internal KrystalwareRuntimeLicense(XmlDocument doc)
        {
            _licenseKey = doc.OuterXml;

            foreach (XmlElement el in doc.DocumentElement.ChildNodes)
            {
                switch (el.Name)
                {
                case "Customer":
                    _customerName = el.GetAttribute("Name");

                    break;

                case "Products":
                    RuntimeLicensedProduct[] products = new RuntimeLicensedProduct[el.ChildNodes.Count];

                    int i = 0;

                    foreach (XmlElement prodEl in el.ChildNodes)
                    {
                        products[i] = new RuntimeLicensedProduct(prodEl);

                        i++;
                    }

                    _licensedProducts = products;

                    break;
                }
            }
        }