protected override void ProcessRecord()
        {
            // Define the cancellation token.
            CancellationTokenSource source            = new CancellationTokenSource();
            CancellationToken       cancellationToken = source.Token;

            var installHelper = new InstallHelper(update: true, cancellationToken, this);

            installHelper.ProcessInstallParams(_name, _version, _prerelease, _repository, _scope, _acceptLicense, _quiet, _reinstall: false, _force: false, _trustRepository, _noClobber, _credential, _requiredResourceFile: null, _requiredResourceJson: null, _requiredResourceHash: null);
        }
        protected override void ProcessRecord()
        {
            // Define the cancellation token.
            CancellationTokenSource source            = new CancellationTokenSource();
            CancellationToken       cancellationToken = source.Token;

            // If PSModuleInfo object
            if (_inputObject != null && _inputObject[0].GetType().Name.Equals("PSModuleInfo"))
            {
                foreach (PSModuleInfo pkg in _inputObject)
                {
                    var installHelp = new InstallHelper(update: false, cancellationToken, this);
                    var prerelease  = false;

                    if (pkg.PrivateData != null)
                    {
                        Hashtable privateData = (Hashtable)pkg.PrivateData;
                        if (privateData.ContainsKey("PSData"))
                        {
                            Hashtable psData = (Hashtable)privateData["PSData"];

                            if (psData.ContainsKey("Prerelease") && !string.IsNullOrEmpty((string)psData["Prerelease"]))
                            {
                                prerelease = true;
                            }
                        }
                    }

                    installHelp.ProcessInstallParams(new[] { pkg.Name }, pkg.Version.ToString(), prerelease, _repository, _scope, _acceptLicense, _quiet, _reinstall, _force: false, _trustRepository, _noClobber, _credential, _requiredResourceFile, _requiredResourceJson, _requiredResourceHash);
                }
            }
            else if (_inputObject != null && _inputObject[0].GetType().Name.Equals("PSObject"))
            {
                // If PSObject
                foreach (PSObject pkg in _inputObject)
                {
                    var installHelp = new InstallHelper(update: false, cancellationToken, this);

                    if (pkg != null)
                    {
                        var name       = (string)pkg.Properties["Name"].Value;
                        var version    = (NuGetVersion)pkg.Properties["Version"].Value;
                        var prerelease = version.IsPrerelease;

                        installHelp.ProcessInstallParams(new[] { name }, version.ToString(), prerelease, _repository, _scope, _acceptLicense, _quiet, _reinstall, _force: false, _trustRepository, _noClobber, _credential, _requiredResourceFile, _requiredResourceJson, _requiredResourceHash);
                    }
                }
            }

            var installHelper = new InstallHelper(update: false, cancellationToken, this);

            installHelper.ProcessInstallParams(_name, _version, _prerelease, _repository, _scope, _acceptLicense, _quiet, _reinstall, _force: false, _trustRepository, _noClobber, _credential, _requiredResourceFile, _requiredResourceJson, _requiredResourceHash);
        }