示例#1
0
        public Protocol(SystemDescription parent, XmlNode xml, XmlNamespaceManager nsm)
            : this(parent)
        {
            if (xml == null)
                throw new ArgumentNullException();
            if (nsm == null)
                throw new ArgumentNullException();

            XmlAttribute attr = xml.SelectSingleNode("@name", nsm) as XmlAttribute;
            if (attr != null)
                this.Name = attr.Value;
            attr = xml.SelectSingleNode("@docId", nsm) as XmlAttribute;
            if (attr != null)
                this.DocumentationId = attr.Value;
            attr = xml.SelectSingleNode("@abstract", nsm) as XmlAttribute;
            if (attr != null)
                this.IsAbstract = Boolean.Parse(attr.Value);

            foreach (XmlAttribute node in xml.SelectNodes("sd:ConformsTo/@protocol", nsm))
                this.ConformsTo.Add(node.Value);
            foreach (XmlElement node in xml.SelectNodes("sd:Description", nsm))
                this.Description = new HtmlString(node);
            foreach (XmlElement node in xml.SelectNodes("sd:StandardGlobal", nsm))
                this.StandardGlobals.Add(new Global(this, node, nsm));
            foreach (XmlElement node in xml.SelectNodes("sd:Message", nsm))
                this.Messages.Add(new Message(this, node, nsm));
        }
示例#2
0
 public Protocol(SystemDescription parent)
 {
     this.SystemDescription = parent;
     this.ConformsTo        = new NotifyingCollection <string>();
     this.Messages          = new NotifyingCollection <Message>();
     this.StandardGlobals   = new NotifyingCollection <Global>();
 }
示例#3
0
 public Protocol(SystemDescription parent)
 {
     this.SystemDescription = parent;
     this.ConformsTo = new NotifyingCollection<string>();
     this.Messages = new NotifyingCollection<Message>();
     this.StandardGlobals = new NotifyingCollection<Global>();
 }
示例#4
0
        public Protocol(SystemDescription parent, XmlNode xml, XmlNamespaceManager nsm)
            : this(parent)
        {
            if (xml == null)
            {
                throw new ArgumentNullException();
            }
            if (nsm == null)
            {
                throw new ArgumentNullException();
            }

            XmlAttribute attr = xml.SelectSingleNode("@name", nsm) as XmlAttribute;
            if (attr != null)
            {
                this.Name = attr.Value;
            }
            attr = xml.SelectSingleNode("@docId", nsm) as XmlAttribute;
            if (attr != null)
            {
                this.DocumentationId = attr.Value;
            }
            attr = xml.SelectSingleNode("@abstract", nsm) as XmlAttribute;
            if (attr != null)
            {
                this.IsAbstract = Boolean.Parse(attr.Value);
            }

            foreach (XmlAttribute node in xml.SelectNodes("sd:ConformsTo/@protocol", nsm))
            {
                this.ConformsTo.Add(node.Value);
            }
            foreach (XmlElement node in xml.SelectNodes("sd:Description", nsm))
            {
                this.Description = new HtmlString(node);
            }
            foreach (XmlElement node in xml.SelectNodes("sd:StandardGlobal", nsm))
            {
                this.StandardGlobals.Add(new Global(this, node, nsm));
            }
            foreach (XmlElement node in xml.SelectNodes("sd:Message", nsm))
            {
                this.Messages.Add(new Message(this, node, nsm));
            }
        }