Ejemplo n.º 1
0
        /// <summary>
        /// The SASL mechanisms valid for this stream.
        /// </summary>
        /// <returns></returns>
        public Mechanism[] GetMechanisms()
        {
            XmlNodeList nl = GetElementsByTagName("mechanism", URI.SASL);

            Mechanism[] items = new Mechanism[nl.Count];
            int         i     = 0;

            foreach (XmlNode n in nl)
            {
                items[i] = (Mechanism)n;
                i++;
            }
            return(items);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// The SASL mechanisms valid for this stream.
        /// </summary>
        /// <returns></returns>
        public Mechanism[] GetMechanisms()
        {
            XmlNodeList nl = GetElementsByTagName("mechanism", URI.SASL);
            Dictionary <string, Mechanism> items = new Dictionary <string, Mechanism>();

            foreach (XmlNode n in nl)
            {
                string name = ((Mechanism)n).MechanismName;

                if (!items.ContainsKey(name))
                {
                    items.Add(name, (Mechanism)n);
                }
            }
            Mechanism[] array = new Mechanism[items.Count];

            items.Values.CopyTo(array, 0);
            return(array);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// The SASL mechanisms valid for this stream.
 /// </summary>
 /// <returns></returns>
 public Mechanism[] GetMechanisms()
 {
     XmlNodeList nl = GetElementsByTagName("mechanism", URI.SASL);
     Mechanism[] items = new Mechanism[nl.Count];
     int i=0;
     foreach (XmlNode n in nl)
     {
         items[i] = (Mechanism) n;
         i++;
     }
     return items;
 }