Beispiel #1
0
        private void Register()
        {
#if !DEBUG_NET
            try
            {
                RegSvr.RegisterServer(Path.Combine(filterPath, filterDll));
            }
            catch (Exception x)
            {
                if (x is IOException)
                {
                    throw new UpdaterException($"Failed to open {filterDll}.", x);
                }

                if (x is ArgumentException || x is ServerRegException)
                {
                    throw new UpdaterException(x.Message, x);
                }

                throw;
            }
#endif
        }
Beispiel #2
0
 public static void UnregisterServer(string dllFileName)
 {
     using (var svr = new RegSvr(dllFileName))
         svr.Unregister();
 }