/// <exclude />
public string GetResult()
{
EntityTokenHtmlPrettyfierHelper helper = new EntityTokenHtmlPrettyfierHelper();
helper.StartTable();
helper.AddHeading("<b>Basic Information</b>");
OnWriteEntityTokenType(this.EntityToken, helper);
OnWriteType(this.EntityToken, helper);
OnWriteSource(this.EntityToken, helper);
OnWriteId(this.EntityToken, helper);
var extraInfo = EntityToken.OnGetExtraPrettyHtml();
if (!extraInfo.IsNullOrEmpty())
{
helper.AddFullRow(new[] { "<b>Extra</b>", extraInfo });
}
helper.AddHeading("<b>Custom Properties</b>");
foreach (var kvp in _customProperties)
{
PropertyInfo propertyInfo = this.EntityToken.GetType().GetPropertiesRecursively().Single(f => f.Name == kvp.Key);
kvp.Value(kvp.Key, propertyInfo.GetValue(this.EntityToken, null), helper);
}
helper.AddHeading("<b>Piggybag</b>");
foreach (var kvp in this.PiggyBag)
{
OnPiggyBagEntry(kvp.Key, kvp.Value, helper);
}
helper.AddHeading("<b>SecurityAncestorProvider</b>");
SecurityAncestorProviderAttribute attribute = this.EntityToken.GetType().GetCustomAttributesRecursively <SecurityAncestorProviderAttribute>().SingleOrDefault();
OnWriteSecurityAncestorProvider(attribute, helper);
helper.AddHeading("<b>AuxiliarySecurityAncestorProviders</b>");
foreach (IAuxiliarySecurityAncestorProvider auxiliarySecurityAncestorProvider in AuxiliarySecurityAncestorFacade.GetAuxiliaryAncestorProviders(this.EntityToken.GetType()))
{
OnWriteAuxiliarySecurityAncestorProvider(auxiliarySecurityAncestorProvider, helper);
}
helper.EndTable();
return(helper.GetResult());
}