I'd like to generate dictionary lookup code snippet that iterate through existing enums and does a foreach enum print "{ enum.A, "A"},"
Like how the code snippet does 'switch', but my own version of it.
I'm currently using "Snippet Designer" for convenience.
I currently have the following
IDictionary<$key$, $value$> _lookup = new Dictionary<$key$, $value$>()
{
{ $key$, $value$ },
};
$end$
Edit: Expected result (after filling out the code snippet in the IDE)
enum FakeEnum
{
Foo, Blah, Bar
}
IDictionary<FakeEnum, string> _lookup = new Dictionary<FakeEnum, string>()
{
{FakeEnum.Foo, string},
{FakeEnum.Blah, string},
{FakeEnum.Bar, string}
} ;