16 using System.Collections.Generic;
19 namespace TargetPlatforms {
22 static string[] names = {
"clr",
"rrotor"};
23 static TargetPlatform[] platforms = {TargetPlatform.CLR, TargetPlatform.RRotor};
29 System.Diagnostics.Debug.Assert(names.Length==platforms.Length);
30 for (
int i=0;i<names.Length;i++) {
31 this.representations[platforms[i]] = names[i];
32 this.platformsFromName[names[i]] = platforms[i];
36 get {
return instance; }
42 private IDictionary<TargetPlatform, string> representations =
new Dictionary<TargetPlatform, string>();
47 private IDictionary<string,TargetPlatform> platformsFromName =
new Dictionary<string,TargetPlatform>();
55 return this.representations[targetPlatform];
59 return this.platformsFromName[name];