public override IDictionary<string, object> Serialize()
{
var result = base.Serialize();
var commands = new List<IDictionary<string,object>>();
column.Commands.Each(c =>
{
var command = new Dictionary<string, object>();
FluentDictionary.For(command)
.Add("name", c.Name)
.Add("attr", c.HtmlAttributes.ToAttributeString(), () => c.HtmlAttributes.Any())
.Add("buttonType", c.ButtonType.ToString())
.Add("imageAttr", c.ImageHtmlAttributes.ToAttributeString(), () => c.ImageHtmlAttributes.Any());
commands.Add(command);
});
if (commands.Any())
{
result["commands"] = commands;
}
return result;
}