I have Written behavior to auto-format the AggregateDescription.StringFormat.
Now, I need to list all possible AggregateDescription's, with reference to their DLL.
if (e.Description is LocalAggregateDescription)
{
(e.Description as LocalAggregateDescription).StringFormat = MyStringFormat;
}
else if (e.Description is QueryableAggregateDescription)
{
(e.Description as QueryableAggregateDescription).StringFormat = MyStringFormat;
}
else if (e.Description is Other_XYZ_AggregateDescription)
{
(e.Description as Other_XYZ_AggregateDescription).StringFormat = MyStringFormat;
}
But, if IStringFormattableAggregate was public, I would can write it better:
if (e.Description is IStringFormattableAggregate)
{
(e.Description as IStringFormattableAggregate).StringFormat = MyStringFormat;
}