UnknownContent represent an unknown element.
Наследование: IContent
		/// <summary>
		/// Gets the unknow content as HTML.
		/// AODL will try to search inside the node of the UnknownContent
		/// object for content this could be displayed.
		/// </summary>
		/// <param name="unknownContent">Content of the unknown.</param>
		/// <returns></returns>
		public string GetUnknowContentAsHtml(UnknownContent unknownContent)
		{
			string html					= "<span>\n";

			try
			{
				if (unknownContent != null)
				{
					if (unknownContent.Node != null)
					{
						foreach(XmlNode node in unknownContent.Node.ChildNodes)
							if (node.InnerText != null)
								html	+= this.ReplaceControlNodes(node.InnerText+" ");
					}
				}
			}
			catch(Exception ex)
			{
				throw new AODLException("Exception while trying to build a HTML string from a UnknownContent object.", ex);
			}

			if (!html.Equals("<span>\n"))
				html				+= "</span>\n";
			else
				html				= "";

			return html;
		}
Пример #2
0
        /// <summary>
        /// Gets the unknow content as HTML.
        /// AODL will try to search inside the node of the UnknownContent
        /// object for content this could be displayed.
        /// </summary>
        /// <param name="unknownContent">Content of the unknown.</param>
        /// <returns></returns>
        public string GetUnknowContentAsHtml(UnknownContent unknownContent)
        {
            string html					= "<span>\n";

            try
            {
                if(unknownContent != null)
                {
                    if(unknownContent.Node != null)
                    {
                        foreach(XmlNode node in unknownContent.Node.ChildNodes)
                            if(node.InnerText != null)
                                html	+= this.ReplaceControlNodes(node.InnerText+" ");
                    }
                }
            }
            catch(Exception ex)
            {
                AODLException exception		= new AODLException("Exception while trying to build a HTML string from a UnknownContent object.");
                exception.InMethod			= AODLException.GetExceptionSourceInfo(new StackFrame(1, true));
                exception.OriginalException	= ex;

                throw exception;
            }

            if(!html.Equals("<span>\n"))
                html				+= "</span>\n";
            else
                html				= "";

            return html;
        }