2 using System.Collections.Generic;
8 public abstract class Profile {
10 static Profile current;
12 public static Profile Current {
17 current = CreateProfile ("MonoTouch");
21 current = CreateProfile ("MonoDroid");
25 current = CreateProfile ("MonoMac");
29 throw new NotSupportedException ("No active profile");
33 static Profile CreateProfile (string name)
35 var type = Type.GetType (string.Format ("{0}.Tuner.{0}Profile", name));
39 return (Profile) Activator.CreateInstance (type);
42 public static bool IsSdkAssembly (AssemblyDefinition assembly)
44 return Current.IsSdk (assembly);
47 public static bool IsSdkAssembly (string assemblyName)
49 return Current.IsSdk (assemblyName);
52 public static bool IsProductAssembly (AssemblyDefinition assembly)
54 return Current.IsProduct (assembly);
57 public static bool IsProductAssembly (string assemblyName)
59 return Current.IsProduct (assemblyName);
62 protected virtual bool IsSdk (AssemblyDefinition assembly)
64 return IsSdk (assembly.Name.Name);
67 protected virtual bool IsProduct (AssemblyDefinition assembly)
69 return IsProduct (assembly.Name.Name);
72 protected abstract bool IsSdk (string assemblyName);
73 protected abstract bool IsProduct (string assemblyName);