AsmHighlighter.RegisterExpressionEvaluatorAttribute.Register C# (CSharp) Method

Register() public method

Provides registration information about a VSPackage when called by an external registration tool such as regpkg.exe.
public Register ( Microsoft.VisualStudio.Shell.RegistrationAttribute context ) : void
context Microsoft.VisualStudio.Shell.RegistrationAttribute A registration context provided by an external registration tool. The context can be used to create registry keys, log registration activity, and obtain information about the component being registered.
return void
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            #if DEBUG
            Console.WriteLine("Registering AsmHighlighter Expression Evaluator");
            #endif
            if (context == null) return;
            using (Key rk = context.CreateKey(string.Format("AD7Metrics\\ExpressionEvaluator\\{0:B}\\{1:B}", LanguageGuid, vendorGuid)))
            {
                rk.SetValue("CLSID", Type.GUID.ToString("B"));
                rk.SetValue("Language", "ASM Language");
                rk.SetValue("Name", "AsmHighlighter");
                using (Key rk2 = rk.CreateSubkey("Engine"))
                {
                    rk2.SetValue("0", guidCOMPlusOnlyEng.ToString("B"));
                    rk2.SetValue("1", guidCOMPlusNativeEng.ToString("B"));
                    rk2.SetValue("2", guidNativeOnlyEng.ToString("B"));
                }
            }
        }