Please note that the StructsViz package is no longer for sale.
The information in this page is kept for completeness.
Features
The StructsViz package is composed of a collection of graphical visualizers. For example,
the BitArray Visualizer is shown in the following image:

All of the objects that form the data structure can be inspected. Also, all the visualizers
provide basic information about the data structure being visualized and a bar that can be
used to zoom in or out the current data structure diagram.

The list of data structures that can be visualized with the StructViz package follows:
- ArrayList
- BitArray
- HashTable
- Queue
- SortedList
- Stack
- Dictionary<TKey, TValue>
- LinkedList<T>
- List<T>
- Queue<T>
- SortedDictionary<TKey, TValue>
- SortedList<TKey, TValue>
- Stack<T>
- HybridDictionary
- ListDictionary
- NameValueCollection
- OrderedDictionary
- StringCollection
- StringDictionary
- CollectionBase
- ReadOnlyCollectionBase
- Collection
- ReadOnlyCollection
- ITree
- ITreeNode

The diagramming engine is extensible, so you can create new shapes and compose elements.
The styles can cascade from the parent element to the child elements, similar to CSS. Also,
there are two positioning modes for an element of the diagram: fixed positioning and relative
positioning. For example, in the pictures shown, the shapes are instances of the
RoundedCornerShape, that contains a CategoryList element to show the fields and properties
of the object.

The automatic layout of the diagram is independent of the diagramming engine and can be
customized if needed.

Unfortunately, Visual Studio.NET 2005 doesn’t let us to associate a DebuggerVisualizer
with an Interface, so if you create a custom collection from scratch you can not debug it with a
Visualizer out of the box. However, the StructsViz package contains a lot of useful
classes that will let you create your custom collection visualizer with very little code.
For example:
[assembly : DebuggerVisualizer(typeof(IListVisualizer),
typeof(IListVisualizerSource),
Target = typeof(PersonCollection),
Description = "PersonCollection visualizer")]
The above code is enough to create a visualizer for our custom PersonCollection class:

Graphically displaying linear data structures like a list or a queue has some added
value. However, you can inspect those data structures with the debugger without
much trouble. However, if you use trees in your application, graphically displaying
the tree is an invaluable help to debug the application. StructsViz has support
for displaying trees:

The .NET Framework doesn't has any class or interface for a tree data structure. However, StructsViz comes
with a basic tree implementation, and with an ITreeNode interface that can be easily implemented by any
custom tree implementation in order to visualize it:
/// <summary>Interface to represent a tree node.</summary>
public interface ITreeNode : IEnumerable
{
/// <summary>Gets or sets the value of the node.</summary>
object Value { get; set; }
/// <summary>Gets or sets the parent of this node.</summary>
ITreeNode Parent { get; set; }
/// <summary>Gets a value indicating whether this node has children.</summary>
bool HasChildren { get; }
/// <summary>Gets the collection of child nodes.</summary>
ICollection Children { get; }
}
And its generic counterpart:
/// <summary>Interface to represent a generic tree node.</summary>
/// <typeparam name="T">The type to store in the node.</typeparam>
public interface ITreeNode<T> : ITreeNode, IEnumerable<ITreeNode<T>>
{
/// <summary>Gets or sets the value of the node.</summary>
new T Value { get; set; }
/// <summary>Gets or sets the parent of this node.</summary>
new ITreeNode<T> Parent { get; set; }
/// <summary>Gets the collection of child nodes.</summary>
new ICollection<ITreeNode<T>> Children { get; }
}
If you want to visualiza a tree and you don't have its source code or you don't
want to change its implementation, you can create a wrapper for it in order to display
it:


For more information take a look at the samples in the evaluation version (You can
download the evaluation version in the Purchase page).
|