Esempio n. 1
0
        public static void RegisterFunction(Type type)
        {
            if (null == type)
            {
                throw new ArgumentNullException("type");
            }
            if (null != type.GetCustomAttribute <DontRegisterAddinAttribute>())
            {
                return;
            }

            COMAddinRegisterHandler.ProceedUser(type, new string[] { _addinOfficeRegistryKey, _addinOfficeRegistryKey64 }, OfficeRegisterKeyState.NeedToCreate);
        }
Esempio n. 2
0
        private static void OptimizedRegisterFunction(Type type, int scope, int keyState)
        {
            if (null == type)
            {
                throw new ArgumentNullException("type");
            }
            if (null != type.GetCustomAttribute <DontRegisterAddinAttribute>())
            {
                return;
            }

            OfficeRegisterKeyState currentKeyState = (OfficeRegisterKeyState)keyState;

            COMAddinRegisterHandler.ProceedUser(type, new string[] { _addinOfficeRegistryKey, _addinOfficeRegistryKey64 }, currentKeyState);
        }