NAnt.Core.FrameworkInfo.FrameworkInfo C# (CSharp) Method

FrameworkInfo() private method

private FrameworkInfo ( XmlNode frameworkNode, XmlNamespaceManager nsMgr ) : System
frameworkNode XmlNode
nsMgr XmlNamespaceManager
return System
        internal FrameworkInfo(XmlNode frameworkNode, XmlNamespaceManager nsMgr)
        {
            if (frameworkNode == null) {
                throw new ArgumentNullException("frameworkNode");
            }
            if (nsMgr == null) {
                throw new ArgumentNullException("nsMgr");
            }

            _frameworkNode = frameworkNode;
            _nsMgr = nsMgr;

            _name = GetXmlAttributeValue(frameworkNode, "name");
            if (_name == null) {
                throw new ArgumentException("The \"name\" attribute does not " +
                    "exist, or has no value.");
            }

            _family = GetXmlAttributeValue(frameworkNode, "family");
            if (_family == null) {
                throw new ArgumentException("The \"family\" attribute does " +
                    "not exist, or has no value.");
            }

            _description = GetXmlAttributeValue(_frameworkNode, "description");
            if (_description == null) {
                throw new ArgumentException("The \"description\" attribute " +
                    "does not exist, or has no value.");
            }

            string vendor  = GetXmlAttributeValue(_frameworkNode, "vendor");
            if (vendor == null) {
                throw new ArgumentException("The \"vendor\" attribute does " +
                    "not exist, or has no value.");
            }

            try {
                _vendor = (VendorType) Enum.Parse(typeof (VendorType),
                    vendor, true);
            } catch (Exception ex) {
                throw new ArgumentException("The value of the \"vendor\" " +
                    "attribute is not valid.", ex);
            }
        }

Same methods

FrameworkInfo::FrameworkInfo ( SerializationInfo info, StreamingContext context ) : System