AspNetEdit.Editor.Persistence.RootParsingObject.BuildObject C# (CSharp) Method

BuildObject() public method

public BuildObject ( object &controls, string &documentText ) : void
controls object
documentText string
return void
        public void BuildObject(out object[] controls, out string documentText)
        {
            controls = this.controls.ToArray ();
            documentText = stringBuilder.ToString ();
        }

Usage Example

Beispiel #1
0
        /// <summary>
        /// Parses a document fragment. Processes all controls and directives and adds them to host.
        /// </summary>
        /// <param name="fragment">The document fragment to parse</param>
        /// <returns>The document with all controls, directives and script blocks replaced by placeholders</returns>
        public void ParseDocument(string fragment, out Control[] controls, out string designDocument)
        {
            AspParser parser = InitialiseParser(fragment);

            rootParsingObject = new RootParsingObject(host);
            openObject        = rootParsingObject;

            parser.Parse();

            if (openObject != rootParsingObject)
            {
                throw new Exception("The tag " + openObject.TagID + " was left unclosed");
            }

            object[] objects;
            rootParsingObject.BuildObject(out objects, out designDocument);
            controls = new Control[objects.Length];
            objects.CopyTo(controls, 0);
        }
All Usage Examples Of AspNetEdit.Editor.Persistence.RootParsingObject::BuildObject