Example #1
0
        /// <summary>
        /// Reads the issue repository connector information from the registry
        /// </summary>
        private void ReadConnectorRegistry()
        {
            IAnkhPackage ankhPackage = GetService <IAnkhPackage>();

            if (ankhPackage != null)
            {
                using (RegistryKey key = ankhPackage.ApplicationRegistryRoot)
                {
                    using (RegistryKey aKey = key.OpenSubKey("IssueRepositoryConnectors"))
                    {
                        if (aKey == null)
                        {
                            return;
                        }

                        string[] connectorKeys = aKey.GetSubKeyNames();
                        foreach (string connectorKey in connectorKeys)
                        {
                            using (RegistryKey connector = aKey.OpenSubKey(connectorKey))
                            {
                                string serviceName = (string)connector.GetValue("");
                                IssueRepositoryConnector descriptor = new IssueRepositoryConnectorProxy(this, serviceName, connectorKey);
                                _nameConnectorMap.Add(serviceName, descriptor);
                            }
                        }
                    }
                }
            }
        }
Example #2
0
        /// <summary>
        /// Reads the issue repository connector information from the registry
        /// </summary>
        private void ReadConnectorRegistry()
        {
            IAnkhPackage ankhPackage = GetService<IAnkhPackage>();
            if (ankhPackage != null)
            {
                using (RegistryKey key = ankhPackage.ApplicationRegistryRoot)
                {
                    using (RegistryKey aKey = key.OpenSubKey("IssueRepositoryConnectors"))
                    {
                        if (aKey == null)
                            return;

                        string[] connectorKeys = aKey.GetSubKeyNames();
                        foreach (string connectorKey in connectorKeys)
                            using (RegistryKey connector = aKey.OpenSubKey(connectorKey))
                            {
                                string serviceName = (string)connector.GetValue("");
                                IssueRepositoryConnector descriptor = new IssueRepositoryConnectorProxy(this, serviceName, connectorKey);
                                _nameConnectorMap.Add(serviceName, descriptor);
                            }
                    }
                }
            }
        }