Click here to Skip to main content
15,883,996 members
Articles / Desktop Programming / Windows Forms

Traceract

Rate me:
Please Sign up or sign in to vote.
3.69/5 (9 votes)
3 Sep 20059 min read 98.5K   1.6K   37  
A prototype debug tracer with an added dimension.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Clifton.Tools.Xml</name>
    </assembly>
    <members>
        <member name="T:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests">
            <summary>
            XmlDatabase test fixture.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.Setup">
            <summary>
            Setup the database.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.InsertRecord">
            <summary>
            Do a simple record insert.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.InsertRecordWithValue">
            <summary>
            Insert a record along with a attribute-value.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.InsertRecordWithMultipleValues">
            <summary>
            Insert a record with multiple values.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.UpdateField">
            <summary>
            Update the field of a record.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.DeleteField">
            <summary>
            Delete a field.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.InsertMultipleUniqueRecords">
            <summary>
            Insert multiple unique records.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.QueryUniqueRecords">
            <summary>
            Query the unique records.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.DeleteUniqueRecord">
            <summary>
            Delete a unique record.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.VerifyMissingRecordNullReturn">
            <summary>
            Verify that a missing record query returns null.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.UpdateMultipleRows">
            <summary>
            Test updating multiple record attributes.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.DeleteMultipleRows">
            <summary>
            Delete multiple records.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.MultiRowMultiFieldUpdate">
            <summary>
            Update mulitple rows with multiple attribute fields.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.MultirowQuery">
            <summary>
            Query multiple rows into a DataTable.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.MultiRowQueryOfSingleField">
            <summary>
            Get the field data from multiple rows of a specified field.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.MultiRowQueryOfMultipleFields">
            <summary>
            Get the field data from multiple rows of multiple fields, into a DataTable.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.UnitTests.XmlDatabaseUnitTests.Save">
            <summary>
            Save the database.
            </summary>
        </member>
        <member name="T:Clifton.Tools.Xml.XmlDatabase">
            <summary>
            <para>XmlDatabase is a wrapper to an xml document that provides insert, update
            query, and delete operations on single or multiple elements in a path,
            qualified by an optional "where" clause.</para>
            <para>If you need something more sophisticated (like an actual XmlDataProvider),
            please see Paul Wilson's project at:</para>
            <para>http://workspaces.gotdotnet.com/XmlDbClient</para>
            <para>http://weblogs.asp.net/pwilson/archive/2004/09/18/231185.aspx</para>
            </summary>
        </member>
        <member name="F:Clifton.Tools.Xml.XmlDatabase.filename">
            <summary>
            The filename used in Load() and Save() operations.
            </summary>
        </member>
        <member name="F:Clifton.Tools.Xml.XmlDatabase.rootName">
            <summary>
            The xml root element name.
            </summary>
        </member>
        <member name="F:Clifton.Tools.Xml.XmlDatabase.xdoc">
            <summary>
            The xml document.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.#ctor">
            <summary>
            Default constructor.  Assigns a default name to the xml root element.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.#ctor(System.String)">
            <summary>
            Constructor.
            </summary>
            <param name="rootName">The name of the xml root element.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Create">
            <summary>
            Creates a new xml document instance using the assigned name for the
            root element.  The new xml document becomes the working document.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Load">
            <summary>
            Load an xml document with the previoulsy assigned filename.
            </summary>
            <exception cref="T:System.NullReferenceException">Thrown when filename is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Load(System.String)">
            <summary>
            Load an xml document with the specified filename.
            </summary>
            <param name="filename">Loads the document from this file.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Save">
            <summary>
            Save an xml document with the current filename.
            </summary>
            <exception cref="T:System.NullReferenceException">Thrown when filename is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.SaveAs(System.IO.TextWriter)">
            <summary>
            Saves the document using the specified TextWriter.
            </summary>
            <param name="tw">The document is saved to this TextWriter.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument and TextWriter classes.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.SaveAs(System.IO.StringWriter)">
            <summary>
            Saves the document to the specified StringWriter.
            </summary>
            <param name="sw">The document is saved to this StringWriter.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument and StringWriter classes.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.SaveAs(System.String)">
            <summary>
            Save the document to the specified filename.  This replaces the current
            filename value with the one specified.
            </summary>
            <param name="newFileName">The new filename to which the document is written.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Insert(System.String)">
            <summary>
            Inserts an empty record at the bottom of the hierarchy, creating the
            tree as required.
            </summary>
            <param name="path">The xml path to the bottom node.</param>
            <returns>The XmlNode inserted into the hierarchy.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Insert(System.String,System.String,System.String)">
            <summary>
            Inserts an record with a single field at the bottom of the hierarchy.
            </summary>
            <param name="path">The xml path to the bottom node.</param>
            <param name="field">The field to add to the record.</param>
            <param name="val">The value assigned to the field.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Insert(System.String,Clifton.Tools.Xml.XmlDatabase.FieldValuePair[])">
            <summary>
            Insert a record with multiple fields at the bottom of the hierarchy.
            </summary>
            <param name="path">The xml path to the bottom node.</param>
            <param name="fields">The array of fields as field/value pairs.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Update(System.String,System.String,System.String)">
            <summary>
            Update a single field in all records in the specified path.
            </summary>
            <param name="path">The xml path.</param>
            <param name="field">The field name to update.</param>
            <param name="val">The new value.</param>
            <returns>The number of records affected.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Update(System.String,System.String,System.String,System.String)">
            <summary>
            Update a single field in all records in the specified path matching
            the xml where clause.  The where clause is appended to the last element
            of the path.  Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="where">The path qualifier.</param>
            <param name="field">The field name to update.</param>
            <param name="val">The new value.</param>
            <returns>The number of records affected.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Update(System.String,System.String,Clifton.Tools.Xml.XmlDatabase.FieldValuePair[])">
            <summary>
            Update multiple fields in all records in the specified path matching
            the xml where clause.  The where clause is appended to the last element
            of the path.  Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="where">The path qualifier.</param>
            <param name="fields">The array of fields as field/value pairs.</param>
            <returns>The number of records affected.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Delete(System.String)">
            <summary>
            Deletes all records of the specified path.
            </summary>
            <param name="path">The xml path.</param>
            <returns>The number of records deleted.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Delete(System.String,System.String)">
            <summary>
            Deletes all records on the specified path qualified by the where clause.
            The where clause is appended to the last element of the path.
            Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="where">The where conditions.</param>
            <returns></returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.DeleteField(System.String,System.String)">
            <summary>
            Deletes a field from all records on the specified path.
            </summary>
            <param name="path">The xml path.</param>
            <param name="field">The field to delete.</param>
            <returns>The number of records affected.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.QueryScalar(System.String,System.String)">
            <summary>
            Return a single string representing the value of the specified field
            for the first record encountered.
            </summary>
            <param name="path">The xml path.</param>
            <param name="field">The desired field.</param>
            <returns>A string with the field's value or null.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.QueryScalar(System.String,System.String,System.String)">
            <summary>
            Return a single string representing the value of the specified field
            for the first record encountered as qualified by the xml where clause.
            The where clause is appended to the last element of the path.
            Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="field">The desired field.</param>
            <param name="where">The where clause.</param>
            <returns>A string with the field's value or null.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Query(System.String)">
            <summary>
            Returns a DataTable for all rows on the path.
            </summary>
            <param name="path">The xml path.</param>
            <returns>The DataTable with the returned rows.
            The row count will be 0 if no rows returned.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Query(System.String,System.String)">
            <summary>
            Returns a DataTable for all rows on the path qualified by the where
            clause.
            The where clause is appended to the last element of the path.
            Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="where">The where clause.</param>
            <returns>The DataTable with the returned rows.
            The row count will be 0 if no rows returned.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.QueryField(System.String,System.String)">
            <summary>
            Returns an array of values for the specified field for all rows on
            the path.
            </summary>
            <param name="path">The xml path.</param>
            <param name="field">The desired field.</param>
            <returns>The array of string values for each row qualified by the path.
            A null is returned if the query results in 0 rows.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.QueryField(System.String,System.String,System.String)">
            <summary>
            Returns an array of values for the specified field for all rows on
            the path.
            The where clause is appended to the last element of the path.
            Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="where">The where clause.</param>
            <param name="field">The desired field.</param>
            <returns>The array of string values for each row qualified by the path.
            A null is returned if the query results in 0 rows.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Query(System.String,System.String[])">
            <summary>
            Returns a DataTable of specified fields for all rows on the specified
            path.
            </summary>
            <param name="path">The xml path.</param>
            <param name="fieldList">The string array of desired fields.</param>
            <returns>The DataTable.  If no rows are returned, the DataTable row
            count will be 0.</returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.Query(System.String,System.String,System.String[])">
            <summary>
            Returns a DataTable of specified fields for all rows on the specified
            path qualified by the where clause.
            The where clause is appended to the last element of the path.
            Qualifiers applied to elements other than the last element
            must be specified in the path statement itself using xml syntax.
            </summary>
            <param name="path">The xml path.</param>
            <param name="where">The where clause.</param>
            <param name="fieldList">The string array of desired fields.</param>
            <returns>The DataTable.  If no rows are returned, the DataTable row
            count will be 0.</returns>
            <returns></returns>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
            <remarks>Additional exceptions may be thrown by the XmlDocument class.</remarks>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.InsertNode(System.Xml.XmlNode,System.String[],System.Int32)">
            <summary>
            Inserts a node at the specified segment if it doesn't exist, otherwise
            traverses the node.
            </summary>
            <param name="node">The current node.</param>
            <param name="segments">The path segment list.</param>
            <param name="idx">The current segment.</param>
            <returns></returns>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.CreateColumns(System.Data.DataTable,System.Xml.XmlNode)">
            <summary>
            Creates columns given an XmlNode.
            </summary>
            <param name="dt">The target DataTable.</param>
            <param name="node">The source XmlNode.</param>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.CreateColumns(System.Data.DataTable,System.String[])">
            <summary>
            Creates columns given a string array.
            </summary>
            <param name="dt">The target DataTable.</param>
            <param name="fieldList">The string array of fields</param>
        </member>
        <member name="P:Clifton.Tools.Xml.XmlDatabase.FileName">
            <summary>
            Get/set the filename to save to/from.
            </summary>
        </member>
        <member name="P:Clifton.Tools.Xml.XmlDatabase.RootName">
            <summary>
            Get/set the root element name.
            </summary>
        </member>
        <member name="T:Clifton.Tools.Xml.XmlDatabase.FieldValuePair">
            <summary>
            Embedded class for constructing field-value pairs.
            </summary>
        </member>
        <member name="F:Clifton.Tools.Xml.XmlDatabase.FieldValuePair.field">
            <summary>
            The field name.
            </summary>
        </member>
        <member name="F:Clifton.Tools.Xml.XmlDatabase.FieldValuePair.val">
            <summary>
            The value name.
            </summary>
        </member>
        <member name="M:Clifton.Tools.Xml.XmlDatabase.FieldValuePair.#ctor(System.String,System.String)">
            <summary>
            Constructor.
            </summary>
            <param name="field">The field name.</param>
            <param name="val">The initial value.</param>
            <exception cref="T:System.ArgumentNullException">Thrown when an argument is null.</exception>
        </member>
        <member name="P:Clifton.Tools.Xml.XmlDatabase.FieldValuePair.Field">
            <summary>
            Gets/sets the field name.
            </summary>
        </member>
        <member name="P:Clifton.Tools.Xml.XmlDatabase.FieldValuePair.Value">
            <summary>
            Gets/sets the field value.
            </summary>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.

Comments and Discussions