CustomActions.KbInstalledChecker.Execute C# (CSharp) Method

Execute() public method

public Execute ( IEnumerable acceptedKbs, string returnVar ) : bool
acceptedKbs IEnumerable
returnVar string
return bool
        public bool Execute(IEnumerable<string> acceptedKbs, string returnVar)
        {
            try
            {
                _session.Log("Begin KbInstalledChecker");
                var isUpdateInstalled = _installedUpdateChecker.IsUpdateInstalled(acceptedKbs);
                SetReturnValue(isUpdateInstalled, returnVar);
                _session.Log("End KbInstalledChecker");
                return true;
            }
            catch (Exception e)
            {
                _session.Log($"There was an issue executing the KbInstalledChecker. Exception: {e}");
                return false;
            }
        }

Same methods

KbInstalledChecker::Execute ( string acceptedKb, string returnVar ) : bool

Usage Example

Beispiel #1
0
 public static ActionResult IsRdpDtlsUpdateInstalled(Session session)
 {
     var kb = session["RDP_DTLS_KB"];
     var returnVar = "RDP_DTLS_UPDATE_INSTALLED";
     var kbInstalledChecker = new KbInstalledChecker(session);
     kbInstalledChecker.Execute(kb, returnVar);
     return ActionResult.Success;
 }
All Usage Examples Of CustomActions.KbInstalledChecker::Execute