Description
In 9.2 we added resource icons to the resources table and graph views. We should go further and enable resources to specify their own custom icons to be used when displayed in the dashboard. This should be done in such a way that hosting integrations can specify custom icons for their resources, so that, e.g., the Redis resource could show up with the Redis icon in the dashboard.
The icon itself would need to be sent from the app host resource server to the dashboard process so would need to be serializable. I imagine we'd want to support SVG which has the advantage of being vector and text-based. We could support bitmap-based formats like PNG, ICO, JPG, etc., by encoding them as data-uris.
I imagine an API kinda like the following for using a file on disk:
builder.AddContainer("foo", "foo")
.WithResourceIcon("./myicon.svg");
And perhaps something like this for something embedded, e.g. in a hosting integration:
builder.AddContainer("foo", "foo")
.WithResourceIcon(EncodeAsDataUri(Resources.MyIcon), ImageFormat.Png);