示例#1
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            // Write to the context's log what we are about to do
            context.Log.WriteLine(String.Format(CultureInfo.CurrentCulture,
                                                "Issue Repository Connector:\t\t{0}\n", RegName));

            // Declare the issue repository connector, its name, the provider's service
            using (Key connectors = context.CreateKey(REG_KEY_CONNECTORS))
            {
                using (Key connectorKey = connectors.CreateSubkey(RegGuid.ToString("B").ToUpperInvariant()))
                {
                    connectorKey.SetValue("", RegName);
                    connectorKey.SetValue(REG_VALUE_SERVICE, IssueRepositoryConnectorService.ToString("B").ToUpperInvariant());

                    using (Key connectorNameKey = connectorKey.CreateSubkey(REG_KEY_NAME))
                    {
                        connectorNameKey.SetValue("", UIName);
                        connectorNameKey.SetValue(REG_VALUE_PACKAGE, UINamePkg.ToString("B").ToUpperInvariant());

                        connectorNameKey.Close();
                    }
                    connectorKey.Close();
                }
                connectors.Close();
            }
        }
示例#2
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            var engineKey = context.CreateKey("AD7Metrics\\Exception\\" + _engineGuid);

            var key = engineKey.CreateSubkey(_category);

            foreach (var pathElem in _path)
            {
                key = key.CreateSubkey(pathElem);
            }
            key.SetValue("Code", _code);
            key.SetValue("State", (int)_state);

            // Debug engine load time can be improved by writing the exception category default
            // stop setting and exceptions to the default settings at the exception category reg
            // key node. This improves debug engine load time by getting necessary exception stop
            // settings for the entire category without having to enumerate the entire category
            // hive structure when loading the debug engine.
            string name = _path.LastOrDefault();

            if (name == null || !BreakByDefault)
            {
                engineKey.SetValue(name ?? "*", (int)(_state & DkmValidFlags));
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            using (var regKey = context.CreateKey(GetParentKey()))
            {
                RegisterWithKey(regKey, regKey.GetType());
            }
        }
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     if (string.IsNullOrEmpty(this.Name))
     {
         throw new ArgumentNullException("Name");
     }
     if (string.IsNullOrEmpty(this.Extension))
     {
         throw new ArgumentNullException("Extension");
     }
     if (string.IsNullOrEmpty(this.ProjectSystemPackage))
     {
         throw new ArgumentNullException("ProjectSystemPackage");
     }
     if (string.IsNullOrEmpty(this.ProjectSystem))
     {
         throw new ArgumentNullException("ProjectSystem");
     }
     context.RemoveKey(@"Generators\" + this.ProjectSystem + @"\" + this.Extension);
     if (StringComparer.OrdinalIgnoreCase.Compare(this.ProjectSystem, "{E24C65DC-7377-472b-9ABA-BC803B73C61A}") == 0)
     {
         context.RemoveKey(string.Format(CultureInfo.InvariantCulture, @"Projects\\\{{0}\}\\FileExtensions\\{1}", new object[] { this.ProjectSystem, this.Extension }));
     }
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideCodeGeneratorExtensionAttributeUnregisterLog, new object[] { this.Name, this.Extension }));
 }
示例#5
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            using (RegistrationAttribute.Key regKey = context.CreateKey(CLSIDKey))
            {
                RegisterWithKey(regKey, regKey.GetType(), context.InprocServerPath, context.CodeBase);
            }
        }
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (RegistrationAttribute.Key key = context.CreateKey(RegKey))
     {
         key.SetValue("ShowBraceCompletion", _enableCompletion ? 1 : 0);
     }
 }
示例#7
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            bool flag = false;

            RegistrationAttribute.Key key = context.CreateKey("AutomationProperties");
            if (key != null)
            {
                RegistrationAttribute.Key key2 = key.CreateSubkey(this.Category);
                if (key2 != null)
                {
                    RegistrationAttribute.Key key3 = key2.CreateSubkey(this.Subcategory);
                    if (key3 != null)
                    {
                        key3.SetValue("Name", this.Category + "." + this.Subcategory);
                        key3.SetValue("Package", "{" + context.ComponentType.GUID.ToString() + "}");
                        flag = true;
                    }
                }
            }
            if (flag)
            {
                context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideAutomationPropertiesLogRegistered, new object[] { this.Category, this.Subcategory }));
            }
        }
示例#8
0
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key serviceKey = context.CreateKey(LanguageServicesKeyName))
     {
         serviceKey.SetValue("ShowBraceCompletion", (int)1);
     }
 }
        // Token: 0x060001BE RID: 446 RVA: 0x00006784 File Offset: 0x00004984
        private void RegisterSoftEngine(RegistrationAttribute.RegistrationContext context)
        {
            string inprocServerPath = context.InprocServerPath;
            string text             = Path.Combine(context.ComponentPath, this.EngineAssemblyFileName);

            using (RegistrationAttribute.Key key = context.CreateKey(string.Format("AD7Metrics\\Engine\\{0}", RegisterMonoDebuggerAttribute.FormatGuid(this.EngineGuid))))
            {
                key.SetValue("CLSID", RegisterMonoDebuggerAttribute.FormatGuid(this.EngineClassGuid));
                key.SetValue("Name", this.EngineClassName);
                key.SetValue("PortSupplier", RegisterMonoDebuggerAttribute.FormatGuid(this.PortSupplierClassGuid));
                key.SetValue("CallstackBP", 1);
                key.SetValue("AutoselectPriority", 4);
                key.SetValue("Attach", 0);
                key.SetValue("AddressBP", 0);
                key.SetValue("Disassembly", 0);
                key.SetValue("RemotingDebugging", 0);
                key.SetValue("Exceptions", 1);
            }
            using (RegistrationAttribute.Key key2 = context.CreateKey(string.Format("CLSID\\{0}", RegisterMonoDebuggerAttribute.FormatGuid(this.EngineClassGuid))))
            {
                key2.SetValue("InprocServer32", inprocServerPath);
                key2.SetValue("Class", this.EngineClassName);
                key2.SetValue("CodeBase", text);
                key2.SetValue("Assembly", this.EngineAssemblyName);
            }
        }
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (RegistrationAttribute.Key key = context.CreateKey(RegKey))
     {
         key.SetValue(_fileExtension, "");
     }
 }
示例#11
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            AssemblyName name = typeof(Ankh.VS.VSVersionThunk).Assembly.GetName();

            using (Key key = context.CreateKey(GetKey()))
            {
                key.SetValue("name", name.Name);
                key.SetValue("culture", "neutral");
                key.SetValue("publicKeyToken", TokenToString(name.GetPublicKeyToken()));
                key.SetValue("version", name.Version);
                if (context.GetType().Name.ToUpperInvariant().Contains("PKGDEF"))
                {
                    string dllName = name.Name + "-V4.dll";

                    if (!context.GetType().FullName.Contains("Ankh"))
                    {
                        dllName = name.Name + ".dll"; // Doesn't work in debug mode at this time
                    }
                    key.SetValue("codeBase", Path.Combine("$PackageFolder$", dllName));
                }
                else
                {
                    key.SetValue("codeBase", "[#CF_" + name.Name + ".V4.dll" + "]");
                }
            }
        }
示例#12
0
 /// <summary>
 /// </summary>
 /// <param name="context"></param>
 /// <devdoc>
 /// Called to register this attribute with the given context.  The context
 /// contains the location where the registration information should be placed.
 /// It also contains such as the type being registered, and path information.
 /// This method is called both for registration and unregistration.  The difference is
 /// that unregistering just uses a hive that reverses the changes applied to it.
 /// </devdoc>
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key key = context.CreateKey(RegistryPath))
     {
         key.SetValue(Theme, flags);
     }
 }
示例#13
0
 public void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     foreach (var regKey in _keys)
     {
         Unregister(context, string.Empty, regKey);
     }
 }
        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));
        }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            Key key = context.CreateKey("BizTalkBindingToolDb");

            key.SetValue("GenerateBindings", this._generateBindings);
            key.SetValue("Server", this._bizTalkBindingToolDbServer);
            key.SetValue("Database", this._bizTalkBindingToolDbDatabase);
        }
示例#16
0
 public void Register(RegistrationAttribute.RegistrationContext context)
 {
     foreach (var regKey in _keys)
     {
         using (var key = context.CreateKey(regKey.Key)) {
             Register(context, key, regKey);
         }
     }
 }
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     context.RemoveValue(@"TextTemplating\IncludeFolders\" + this.Extension, string.Format(CultureInfo.InvariantCulture, "Include{0}", new object[] { this.Index }));
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideIncludeFolderLogUnregistered, new object[] { this.Extension, this.Index, this.Folder }));
 }
示例#18
0
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     context.RemoveKey(@"SolutionPersistence\" + this.Name);
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideSolutionPersistenceLogUnregistered, new object[] { this.Name }));
 }
示例#19
0
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            Key markerkey = context.CreateKey("Text Editor\\External Markers\\{" + _markerGUID + "}");

            markerkey.SetValue("", _markerName);
            markerkey.SetValue("Service", "{" + _markerProviderGUID + "}");
            markerkey.SetValue("DisplayName", "My Custom Text Marker");
            markerkey.SetValue("Package", "{" + context.ComponentType.GUID + "}");
        }
示例#20
0
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context != null)
     {
         context.RemoveKey(String.Format(CultureInfo.InvariantCulture, "{0}\\{1}",
                                         ToolboxControlsInstallerPath,
                                         context.ComponentType.AssemblyQualifiedName));
     }
 }
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     context.RemoveKey(@"TextTemplating\DirectiveProcessors\" + this.Name);
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideDirectiveProcessorLogUnregistered, new object[] { this.Type.FullName, this.Name, this.Description }));
 }
 // Token: 0x060001BB RID: 443 RVA: 0x0000664B File Offset: 0x0000484B
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         return;
     }
     this.UnregisterCommon(context);
     this.UnregisterSoft(context);
 }
 // Token: 0x060001BA RID: 442 RVA: 0x0000662D File Offset: 0x0000482D
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     this.RegisterCommon(context);
     this.RegisterSoftEngine(context);
 }
示例#24
0
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     context.RemoveKey(@"AutomationProperties\" + this.Category + @"\" + this.Subcategory);
     context.Log.WriteLine(string.Format(CultureInfo.CurrentCulture, Microsoft.VisualStudio.TextTemplating.VSHost.Resources.ProvideAutomationPropertiesLogUnregistered, new object[] { this.Category, this.Subcategory }));
 }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            Key packageKey = null, packageProviderRef = null, packageProvider = null;

            try
            {
                packageKey = context.CreateKey(@"DataSources\{" + dataSourceGuid + @"}");
                packageKey.SetValue("", dataSourceName);
                packageKey.SetValue("DefaultProvider", @"{" + dataProviderGuid + @"}");

                packageProviderRef = packageKey.CreateSubkey(@"SupportingProviders\{" + dataProviderGuid + @"}");
                packageProviderRef.SetValue("DisplayName", "Provider_Label, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
                packageProviderRef.SetValue("Description", "Provider_Help, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");

                packageProvider = context.CreateKey(@"DataProviders\{" + dataProviderGuid + @"}");
                packageProvider.SetValue("", dataProviderName);

                packageProvider.SetValue("Description", "Provider_Description, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
                packageProvider.SetValue("DisplayName", "Provider_DisplayName, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
                packageProvider.SetValue("ShortDisplayName", "Provider_ShortDisplayName, VSPackage, NuoDb.VisualStudio.DataTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b856dd8cd87216c3");
                //packageProvider.SetValue("CodeBase", context.CodeBase);

                packageProvider.SetValue("InvariantName", "NuoDb.Data.Client");
                //packageProvider.SetValue("RuntimeInvariantName", "System.Data.SqlServerCe.3.5");
                packageProvider.SetValue("Technology", "{77AB9A9D-78B9-4ba7-91AC-873F5338F1D2}");

                packageProvider.SetValue("FactoryService", "{" + factoryGuid + "}");
                //packageProvider.SetValue("AssociatedSource", "{" + dataSourceGuid + "}");
                //packageProvider.SetValue("PlatformVersion", "1.0");

                packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionProperties").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataConnectionProperties");
                packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionSupport").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataConnectionSupport");
                packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionUIControl").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataConnectionUIControl");
                packageProvider.CreateSubkey(@"SupportedObjects\DataViewSupport").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataViewSupport");
                packageProvider.CreateSubkey(@"SupportedObjects\DataObjectSupport").SetValue("", "NuoDb.VisualStudio.DataTools.NuoDbDataObjectSupport");
                packageProvider.CreateSubkey(@"SupportedObjects\DataConnectionPromptDialog");
                packageProvider.CreateSubkey(@"SupportedObjects\DataSourceSpecializer");
                packageProvider.CreateSubkey(@"SupportedObjects\Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataConnectionUIConnector");
                packageProvider.CreateSubkey(@"SupportedObjects\Microsoft.VisualStudio.Data.Core.IVsDataProviderDynamicSupport");
            }
            finally
            {
                if (packageKey != null)
                {
                    packageKey.Close();
                }
                if (packageProviderRef != null)
                {
                    packageProviderRef.Close();
                }
                if (packageProvider != null)
                {
                    packageProvider.Close();
                }
            }
        }
示例#26
0
 /// <summary>
 /// </summary>
 /// <param name="context"></param>
 /// <devdoc>
 /// Called to register this attribute with the given context.  The context
 /// contains the location where the registration information should be placed.
 /// It also contains such as the type being registered, and path information.
 /// This method is called both for registration and unregistration.  The difference is
 /// that unregistering just uses a hive that reverses the changes applied to it.
 /// </devdoc>
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key key = context.CreateKey(RegistryPath))
     {
         key.SetValue("", RegName);
         key.SetValue("Service", _providerType.GUID.ToString("B"));
         key.SetValue("Package", PackageGuid.ToString("B"));
         key.SetValue("DisplayName", DisplayName);
     }
 }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            using (var key = context.CreateKey(string.Format(SupportedTestTypesKey, _hostAdapterName))) {
                key.SetValue(_testTypeGuid, _testTypeName);
            }

            using (var key = context.CreateKey(string.Format(SupportedHostAdaptersKey, _testTypeGuid))) {
                key.SetValue(_hostAdapterName, _hostAdapterDisplayName);
            }
        }
示例#28
0
 /// <summary>
 /// Delete our specified keys
 /// </summary>
 /// <param name="context">The context that this registration attribute is being used in</param>
 public override void Unregister(RegistrationAttribute.RegistrationContext context)
 {
     context.RemoveKey(@"Generators\" + this.ProjectSystem + @"\" + this.Name);
     context.RemoveKey(@"CLSID\{" + this.Type.GUID + @"}");
     context.Log.WriteLine(string.Format(
                               CultureInfo.CurrentCulture,
                               Resources.ProvideCodeGeneratorAttribute_UnregisterLog,
                               this.Name,
                               this.Type.GUID));
 }
示例#29
0
 public override void Register(RegistrationAttribute.RegistrationContext context)
 {
     using (Key key = context.CreateKey(KeyName))
     {
         if (!string.IsNullOrEmpty(Name))
         {
             key.SetValue("", Name);
         }
         key.SetValue("flags", (int)_flags);
     }
 }
        public override void Register(RegistrationAttribute.RegistrationContext context)
        {
            try
            {
                context.Log.Write("Registering Csd generator ... ");

                // register class
                Key key    = context.CreateKey(@"CLSID");
                Key subKey = key.CreateSubkey(_generatorClsid);
                subKey.SetValue("ThreadingModel", "Both");
                subKey.SetValue("InprocServer32", Path.Combine(Environment.SystemDirectory, "mscoree.dll"));
                subKey.SetValue("Class", _generatorType.FullName);
                subKey.SetValue("Assembly", _generatorType.Assembly.FullName);
                subKey.Close();
                key.Close();

                // register custom generator
                key    = context.CreateKey(@"Generators\" + CSharpGeneratorsGuid);
                subKey = key.CreateSubkey("CsdFileGenerator");
                subKey.SetValue(string.Empty, "Configuration Section Designer Generator");
                subKey.SetValue("CLSID", _generatorClsid);
                subKey.SetValue("GeneratesDesignTimeSource", 1);
                subKey.Close();
                key.Close();

                key    = context.CreateKey(@"Generators\" + VBGeneratorsGuid);
                subKey = key.CreateSubkey("CsdFileGenerator");
                subKey.SetValue(string.Empty, "Configuration Section Designer Generator");
                subKey.SetValue("CLSID", _generatorClsid);
                subKey.SetValue("GeneratesDesignTimeSource", 1);
                subKey.Close();
                key.Close();

                // register .csd editor notification
                key    = context.CreateKey(@"Projects\" + CSharpProjectGuid + @"\FileExtensions");
                subKey = key.CreateSubkey(".csd");
                subKey.SetValue("EditorFactoryNotify", _editorFactoryGuid);
                subKey.Close();
                key.Close();
                context.Log.WriteLine("Success.");

                key    = context.CreateKey(@"Projects\" + VBProjectGuid + @"\FileExtensions");
                subKey = key.CreateSubkey(".csd");
                subKey.SetValue("EditorFactoryNotify", _editorFactoryGuid);
                subKey.Close();
                key.Close();
                context.Log.WriteLine("Success.");
            }
            catch (Exception e)
            {
                context.Log.WriteLine("Failure: " + e);
            }
        }