示例#1
0
        public void Dispose()
        {
            if (m_log != null)
            {
                m_log.Dispose();
                m_log = null;
            }

            if (m_key != null)
            {
                m_key.Dispose();
                m_key = null;
            }
        }
示例#2
0
文件: VsUtil.cs 项目: formist/LinkMe
        private static void ProcessPackages(string fullPath, bool register)
        {
            // Try to get the registry root.

            string registryRoot = GetRegistryRoot(fullPath);

            if (registryRoot == null)
            {
                return;
            }

            // Create the context to process the packages.

            using (VsRegistryKey key = new VsRegistryKey(registryRoot))
            {
                using (VsRegistrationContext context = new VsRegistrationContext(key, RegistrationMethod.CodeBase))
                {
                    ProcessPackages(fullPath, register, context);
                }
            }
        }
示例#3
0
 public VsRegistrationContext(VsRegistryKey key, RegistrationMethod method)
 {
     m_key    = key;
     m_method = method;
 }