protected override WuRemoteCallResult CallInternal(IWuEndpoint endpoint, object param)
        {
            bool value = (param is bool) ? (bool)param : true;

            if (ReconnectIfDisconnected(endpoint))
            {
                endpoint.Service.SetAutoSelectUpdates(value);
                endpoint.RefreshSettings();
                return(WuRemoteCallResult.SuccessResult(endpoint, this));
            }
            return(WuRemoteCallResult.EndpointNotAvailableResult(endpoint, this));
        }
        protected override WuRemoteCallResult CallInternal(IWuEndpoint endpoint, object param)
        {
            UpdateDescription update = param as UpdateDescription;

            if (update == null)
            {
                throw new ArgumentException($"A {nameof(UpdateDescription)} parameter which includes an update id is required.", nameof(param));
            }
            if (ReconnectIfDisconnected(endpoint))
            {
                if (endpoint.Service.AcceptEula(update.ID))
                {
                    return(WuRemoteCallResult.SuccessResult(endpoint, this, $"The EULA of update {update.Title} was accepted."));
                }
                return(new WuRemoteCallResult(endpoint, this, false, null, $"The EULA of update {update.Title} could not be accepted."));
            }
            return(WuRemoteCallResult.EndpointNotAvailableResult(endpoint, this));
        }
Ejemplo n.º 3
0
 protected override WuRemoteCallResult CallInternal(IWuEndpoint endpoint, object param)
 {
     endpoint.Reconnect();
     endpoint.RefreshState();
     return(WuRemoteCallResult.SuccessResult(endpoint, this));
 }