Beispiel #1
0
        /// <summary>
        /// Unregisters a COM server in the current system.
        /// </summary>
        /// <param name="comServer">The COM server to be unregistered.</param>
        /// <param name="machineWide">Unregister the COM server machine-wide instead of just for the current user.</param>
        /// <exception cref="IOException">A problem occurs while writing to the filesystem or registry.</exception>
        /// <exception cref="UnauthorizedAccessException">Write access to the filesystem or registry is not permitted.</exception>
        /// <exception cref="InvalidDataException">The data in <paramref name="comServer"/> is invalid.</exception>
        public static void Unregister([NotNull] Store.Model.Capabilities.ComServer comServer, bool machineWide)
        {
            #region Sanity checks
            if (comServer == null)
            {
                throw new ArgumentNullException(nameof(comServer));
            }
            #endregion

            if (string.IsNullOrEmpty(comServer.ID))
            {
                throw new InvalidDataException("Missing ID");
            }

            // TODO: Implement
        }
Beispiel #2
0
        /// <summary>
        /// Registers a COM server in the current system.
        /// </summary>
        /// <param name="target">The application being integrated.</param>
        /// <param name="comServer">The COM server to be registered.</param>
        /// <param name="machineWide">Register the COM server machine-wide instead of just for the current user.</param>
        /// <param name="handler">A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.</param>
        /// <exception cref="OperationCanceledException">The user canceled the task.</exception>
        /// <exception cref="IOException">A problem occurs while writing to the filesystem or registry.</exception>
        /// <exception cref="WebException">A problem occured while downloading additional data (such as icons).</exception>
        /// <exception cref="UnauthorizedAccessException">Write access to the filesystem or registry is not permitted.</exception>
        /// <exception cref="InvalidDataException">The data in <paramref name="comServer"/> is invalid.</exception>
        public static void Register(FeedTarget target, [NotNull] Store.Model.Capabilities.ComServer comServer, bool machineWide, [NotNull] ITaskHandler handler)
        {
            #region Sanity checks
            if (comServer == null)
            {
                throw new ArgumentNullException("comServer");
            }
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            #endregion

            if (string.IsNullOrEmpty(comServer.ID))
            {
                throw new InvalidDataException("Missing ID");
            }

            // TODO: Implement
        }