////////////////////////////////////////////////////////////////////// // Public methods. /// <include file='doc\ProvideLanguageEditorOptionPageAttribute.uex' path='docs/doc[@for="ProvideLanguageEditorOptionPageAttribute.Register"]' /> public override void Register(RegistrationAttribute.RegistrationContext context) { context.Log.WriteLine(SR.GetString(SR.Reg_NotifyLanguageOptionPage, LanguageName, PageNameResourceId)); // Create the registry entries using the creator object. LanguageToolsOptionCreator.CreateRegistryEntries(context, LanguageName, FullPathToPage, PageNameResourceId, PageGuid); }
/// <include file='doc\ProvideLanguageEditorOptionPageAttribute.uex' path='docs/doc[@for="ProvideLanguageEditorToolsOptionCategoryAttribute.Register"]' /> public override void Register(RegistrationAttribute.RegistrationContext context) { context.Log.WriteLine(SR.GetString(SR.Reg_NotifyLanguageOptionCategory, languageName, categoryName)); // Create the registry entries using the creator object. LanguageToolsOptionCreator.CreateRegistryEntries(context, languageName, categoryName, categoryResourceId, Guid.Empty); }
////////////////////////////////////////////////////////////////////// // ProvideLanguageCodeExpansionAttribute Public Methods. /// <include file='doc\ProvideLanguageCodeExpansionAttribute.uex' path='docs/doc[@for="ProvideLanguageCodeExpansionAttribute.Register"]' /> public override void Register(RegistrationAttribute.RegistrationContext context) { context.Log.WriteLine(string.Format(Resources.Culture, Resources.Reg_NotifyLanguageCodeExpansion, LanguageServiceSid.ToString("B"))); string packageGuid = context.ComponentType.GUID.ToString("B"); // Create our top-most language key using (Key serviceKey = context.CreateKey(LanguageRegistryKey)) { // Add specific entries corresponding to arguments to // ProvideLanguageCodeExpansionAttribute constructor. serviceKey.SetValue(string.Empty, LanguageServiceSid.ToString("B")); serviceKey.SetValue(RegistryPaths.package, packageGuid); serviceKey.SetValue(RegistryPaths.displayName, displayName); serviceKey.SetValue(RegistryPaths.languageStringId, languageIdString); serviceKey.SetValue(RegistryPaths.indexPath, snippetIndexPath); serviceKey.SetValue(RegistryPaths.showRoots, showRoots ? 1 : 0); if (!string.IsNullOrEmpty(SearchPaths)) { using (Key pathsKey = serviceKey.CreateSubkey(RegistryPaths.paths)) { pathsKey.SetValue(LanguageName, SearchPaths); } } if (!string.IsNullOrEmpty(ForceCreateDirs)) { using (Key forceCreateKey = serviceKey.CreateSubkey(RegistryPaths.forceCreateDirs)) { forceCreateKey.SetValue(LanguageName, ForceCreateDirs); } } } }
public override void Register(RegistrationContext context) { using (Key key = context.CreateKey(EditorRegKey)) { key.SetValue(string.Empty, FactoryType.Name); key.SetValue("DisplayName", string.Format(CultureInfo.InvariantCulture, "#{0}", NameResourceID)); key.SetValue("Package", context.ComponentType.GUID.ToString("B")); key.SetValue("CommonPhysicalViewAttributes", (int)_commonPhysicalViewAttributes); key.SetValue("EditorTrustLevel", (int)_trustLevel); using (Key key2 = key.CreateSubkey("LogicalViews")) { TypeConverter converter = TypeDescriptor.GetConverter(typeof(LogicalView)); object[] customAttributes = FactoryType.GetCustomAttributes(typeof(ProvideViewAttribute), true); foreach (ProvideViewAttribute attribute in customAttributes) { if (attribute.LogicalView != LogicalView.Primary) { Guid guid = (Guid)converter.ConvertTo(attribute.LogicalView, typeof(Guid)); string physicalView = attribute.PhysicalView ?? string.Empty; key2.SetValue(guid.ToString("B"), physicalView); } } } } }
public override void Register(RegistrationContext context) { using (Key key = context.CreateKey(RegKeyBaseName)) { key.SetValue("Code", Code); key.SetValue("State", (int)State); } }
/// <include file='doc\ProvideLanguageServiceAttribute.uex' path='docs/doc[@for="ProvideLanguageServiceAttribute.Register"]' /> public override void Register(RegistrationAttribute.RegistrationContext context) { context.Log.WriteLine(string.Format(Resources.Culture, Resources.Reg_NotifyLanguageService, LanguageName, LanguageServiceSid.ToString("B"))); // Create our top-most language key using (Key serviceKey = context.CreateKey(LanguageServicesKeyName)) { // Add specific entries corresponding to arguments to // ProvideLanguageServiceAttribute constructor. serviceKey.SetValue(string.Empty, LanguageServiceSid.ToString("B")); serviceKey.SetValue(RegistryPaths.package, context.ComponentType.GUID.ToString("B")); serviceKey.SetValue(RegistryPaths.languageResourceId, languageResourceID); // Now add any explicitly specified options. string name; string value; foreach (object item in optionsTable.Keys) { name = item.ToString(); if (optionsTable[item] is bool) { // Bool values are special-cased as they need to // be written as 0 or 1 instead of false or true. int nValue = 0; if ((bool)optionsTable[item]) { nValue = 1; } serviceKey.SetValue(name, nValue); } else if (optionsTable[item] is int) { serviceKey.SetValue(name, (int)optionsTable[item]); } else { // If not bool type, always write the value as a // string. value = optionsTable[item].ToString(); serviceKey.SetValue(name, value); } } if (debuggerLanguages.IsValid()) { // If any debugger language options have been specified then... // Note: we are assuming there can be only one of these entries // for each language service. string eeRegName = string.Format(CultureInfo.InvariantCulture, "{0}\\{1}", RegistryPaths.debuggerLanguages, debuggerLanguages.ExpressionEvaluator.ToString("B")); using (Key dbgLangKey = serviceKey.CreateSubkey(eeRegName)) { dbgLangKey.SetValue(null, debuggerLanguages.LanguageName); } } } }
public override void Register(RegistrationAttribute.RegistrationContext context) { var engineKey = context.CreateKey(ExceptionKey); var key = engineKey; foreach (var pathElem in _path) { key = key.CreateSubkey(pathElem); } key.SetValue("Code", _code); key.SetValue("State", _state); }
internal static void CreateRegistryEntries(RegistrationAttribute.RegistrationContext context, string languageName, string categoryName, string categoryResourceId, Guid pageGuid) { using (RegistrationAttribute.Key serviceKey = context.CreateKey(FormatRegKey(languageName, categoryName))) { // Add specific entries corresponding to arguments to // constructor. serviceKey.SetValue(string.Empty, categoryResourceId); serviceKey.SetValue(RegistryPaths.package, context.ComponentType.GUID.ToString("B")); if (pageGuid != Guid.Empty) { serviceKey.SetValue(RegistryPaths.page, pageGuid.ToString("B")); } } }
/// <include file='doc\ProvideLanguageEditorOptionPageAttribute.uex' path='docs/doc[@for="ProvideLanguageEditorOptionPageAttribute.Unregister"]' /> public override void Unregister(RegistrationAttribute.RegistrationContext context) { // Remove the registry entries for this page. LanguageToolsOptionCreator.RemoveRegistryEntries(context, LanguageName, FullPathToPage); }
/// <include file='doc\ProvideLanguageEditorOptionPageAttribute.uex' path='docs/doc[@for="ProvideLanguageEditorToolsOptionCategoryAttribute.Unregister"]' /> public override void Unregister(RegistrationAttribute.RegistrationContext context) { // Remove the entries using the creator object. LanguageToolsOptionCreator.RemoveRegistryEntries(context, languageName, categoryName); }
public override void Unregister(RegistrationAttribute.RegistrationContext context) { }
public override void Unregister(RegistrationAttribute.RegistrationContext context) { context.RemoveKey(PortSupplierRegKey); }
public override void Unregister(RegistrationAttribute.RegistrationContext context) { context.RemoveKey(EngineRegKey); }
public override void Unregister(RegistrationContext context) { string name; if (!string.IsNullOrEmpty(ExceptionNamespace)) name = string.Format(@"{0}\{1}", ExceptionNamespace, ExceptionName); else name = ExceptionName; string regKeyName = string.Format(@"AD7Metrics\Exception\{0:B}", DebugEngine, ExceptionKind, name); context.RemoveKey(regKeyName); }
public override void Register(RegistrationContext context) { using (Key key = context.CreateKey(RegKeyBaseName)) { Key parentKey = key; if (!string.IsNullOrEmpty(ExceptionNamespace)) parentKey = key.CreateSubkey(ExceptionNamespace); try { if (!string.IsNullOrEmpty(ExceptionNamespace)) { parentKey.SetValue("Code", 0); parentKey.SetValue("State", (int)DefaultState); } using (Key child = parentKey.CreateSubkey(ExceptionName)) { child.SetValue("Code", Code); child.SetValue("State", (int)State); } } finally { if (!string.IsNullOrEmpty(ExceptionNamespace)) parentKey.Close(); } } }
internal static void RemoveRegistryEntries(RegistrationAttribute.RegistrationContext context, string languageName, string categoryName) { context.RemoveKey(FormatRegKey(languageName, categoryName)); }
public override void Unregister(RegistrationContext context) { context.RemoveValue(RegKeyBaseName, "Code"); context.RemoveValue(RegKeyBaseName, "State"); }
/// <include file='doc\ProvideLanguageCodeExpansionAttribute.uex' path='docs/doc[@for="ProvideLanguageCodeExpansionAttribute.Unregister"]' /> public override void Unregister(RegistrationAttribute.RegistrationContext context) { context.RemoveKey(LanguageRegistryKey); }
/// <include file='doc\ProvideLanguageServiceAttribute.uex' path='docs/doc[@for="ProvideLanguageServiceAttribute.Unregister"]' /> public override void Unregister(RegistrationAttribute.RegistrationContext context) { context.RemoveKey(LanguageServicesKeyName); }
public override void Unregister(RegistrationAttribute.RegistrationContext context) { ProvideObjectAttribute objectProvider = new ProvideObjectAttribute(context.ComponentType); objectProvider.Unregister(context); }
public override void Unregister(RegistrationContext context) { context.RemoveKey(EditorRegKey); }