public static void UnregisterClass(Type t) { CustomToolAttribute customToolAttribute = getCustomToolAttribute(t); foreach (var k in GetKeyNames(CSharpCategoryGuid, customToolAttribute.Name)) { Registry.LocalMachine.DeleteSubKey(k, false); } }
public static void RegisterClass(Type t) { GuidAttribute guidAttribute = getGuidAttribute(t); CustomToolAttribute customToolAttribute = getCustomToolAttribute(t); foreach (var k in GetKeyNames(CSharpCategoryGuid, customToolAttribute.Name)) { using (RegistryKey key = Registry.LocalMachine.CreateSubKey(k)) { key.SetValue("", customToolAttribute.Description); key.SetValue("CLSID", "{" + guidAttribute.Value + "}"); key.SetValue("GeneratesDesignTimeSource", 1); } } }