Ejemplo n.º 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
        }
Ejemplo n.º 2
0
 public static void UnregisterServer(string dllFileName)
 {
     using (var svr = new RegSvr(dllFileName))
         svr.Unregister();
 }