public void Write(IHtmlList htmlList)
{
// Setup initial conditions.
if (Script.IsNullOrUndefined(instance)) return;
// Create the property list.
htmlList.Container.AddClass(LogCssClasses.PropertyList);
// Insert the property values.
foreach (DictionaryEntry entry in Dictionary.GetDictionary(instance))
{
string propName = isDictionary ? entry.Key : GetPropertyName(entry.Key);
if (propName == null) continue;
object value = isDictionary ?
FormatPropertyValue(entry.Value, false) :
GetPropertyValue(instance, entry);
string item = string.Format(
"<span class='{0}'>{1}:</span> {2}",
LogCssClasses.PropertyName,
propName,
value);
htmlList.Add(item);
}
}
#endregion