public StreamFeaturesElement(XmlNode xml) : base(xml) { if(xml.FirstChild == null) throw new OpenXMPPException("The server is not sending standard stream feature elements."); switch(xml.FirstChild.Name) { case "mechanisms": this.type = StreamFeaturesType.SaslMechanisms; break; case "starttls": this.type = StreamFeaturesType.StartTls; break; case "bind": this.type = StreamFeaturesType.Bind; break; case "session": this.type = StreamFeaturesType.Session; break; } }
public StreamFeaturesElement(XmlNode xml, StreamFeaturesType type) : base(xml) { this.type = type; }