예제 #1
0
        /// <summary>
        /// Allows easy retrieval of strings formatted both with
        /// namespace and element name, given a value
        /// from the <see cref="_UPNP"/>
        /// enumerator.
        /// </summary>
        public string this[_UPNP tag]
        {
            get
            {
                string str = tag.ToString();
                if (tag == _UPNP.Class)
                {
                    str = "class";
                }

                StringBuilder sb = new StringBuilder(25);
                sb.AppendFormat("upnp:{0}", str);
                return(sb.ToString());
            }
        }
예제 #2
0
        /// <summary>
        /// Enforce static instance.
        /// </summary>
        private Tags()
        {
            System.Array vals;

            _DC dc = 0;

            vals = Enum.GetValues(dc.GetType());
            m_DC = new String[vals.Length];
            for (int i = 0; i < vals.Length; i++)
            {
                m_DC[i] = this[(_DC)vals.GetValue(i)];
            }

            _UPNP UPNP = 0;

            vals   = Enum.GetValues(UPNP.GetType());
            m_UPNP = new String[vals.Length];
            for (int i = 0; i < vals.Length; i++)
            {
                m_UPNP[i] = this[(_UPNP)vals.GetValue(i)];
            }

            _DIDL DIDL = 0;

            vals   = Enum.GetValues(DIDL.GetType());
            m_DIDL = new String[vals.Length];
            for (int i = 0; i < vals.Length; i++)
            {
                m_DIDL[i] = this[(_DIDL)vals.GetValue(i)];
            }

            _ATTRIB ATTRIB = 0;

            vals     = Enum.GetValues(ATTRIB.GetType());
            m_ATTRIB = new String[vals.Length];
            for (int i = 0; i < vals.Length; i++)
            {
                m_ATTRIB[i] = this[(_ATTRIB)vals.GetValue(i)];
            }
        }
예제 #3
0
파일: Tags.cs 프로젝트: Scannow/SWYH
		/// <summary>
		/// Allows easy retrieval of strings formatted both with
		/// namespace and element name, given a value
		/// from the <see cref="_UPNP"/>
		/// enumerator.
		/// </summary>
		public string this[_UPNP tag]
		{ 
			get 
			{
				string str = tag.ToString();
				if (tag == _UPNP.Class)
				{
					str = "class";
				}

				StringBuilder sb = new StringBuilder(25);
				sb.AppendFormat("upnp:{0}", str);
				return sb.ToString();
			}
		}