Пример #1
0
        /// <summary>
        /// Unregisters a SharpShell server. This will remove the associations defined by the
        /// server's COMServerAssociation attribute.
        /// </summary>
        /// <param name="server">The server.</param>
        /// <param name="registrationType">Type of the registration to undo.</param>
        public static void UnregisterServer(ISharpShellServer server, RegistrationType registrationType)
        {
            //  Unapprove the extension.
            UnapproveExtension(server, registrationType);

            //  Pass the server type to the SharpShellServer internal unregistration function and let it
            //  take over from there.
            SharpShellServer.DoUnregister(server.GetType(), registrationType);
        }
 /// <summary>
 /// Registers a SharpShell server. This will create the associations defined by the
 /// server's COMServerAssociation attribute.
 /// </summary>
 /// <param name="server">The server.</param>
 /// <param name="registrationType">Type of the registration.</param>
 public static void RegisterServer(ISharpShellServer server, RegistrationType registrationType)
 {
     //  Pass the server type to the SharpShellServer internal registration function and let it
     //  take over from there.
     SharpShellServer.DoRegister(server.GetType(), registrationType);
 }