本文整理汇总了C#中Microsoft.VisualStudio.Shell.RegistrationAttribute.RemoveKeyIfEmpty方法的典型用法代码示例。如果您正苦于以下问题:C# RegistrationAttribute.RemoveKeyIfEmpty方法的具体用法?C# RegistrationAttribute.RemoveKeyIfEmpty怎么用?C# RegistrationAttribute.RemoveKeyIfEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.VisualStudio.Shell.RegistrationAttribute
的用法示例。
在下文中一共展示了RegistrationAttribute.RemoveKeyIfEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Unregister
public override void Unregister(RegistrationAttribute.RegistrationContext context)
{
context.RemoveValue(string.Format(SupportedTestTypesKey, _hostAdapterName), _testTypeGuid);
context.RemoveKeyIfEmpty(string.Format(SupportedTestTypesKey, _hostAdapterName));
context.RemoveValue(string.Format(SupportedHostAdaptersKey, _testTypeGuid), _hostAdapterName);
context.RemoveKeyIfEmpty(string.Format(SupportedHostAdaptersKey, _testTypeGuid));
}
示例2: Unregister
/// <summary>Removes registration information about a VSPackage when called by an external registration tool such as regpkg.exe.</summary>
/// <param name="context">A registration context provided by an external registration tool. The context can be used to remove registry keys, log registration activity, and obtain information about the component being registered. </param>
public override void Unregister(RegistrationAttribute.RegistrationContext context)
{
if (context == null) return;
#if DEBUG
Console.WriteLine("Unregistering AsmHighlighter Expression Evaluator");
#endif
context.RemoveKey(string.Format("AD7Metrics\\ExpressionEvaluator\\{0:B}\\{1:B}", languageGuid, vendorGuid));
context.RemoveKeyIfEmpty(string.Format("AD7Metrics\\ExpressionEvaluator\\{0:B}", languageGuid));
}