Beispiel #1
0
        private bool CheckDependency(IDependency dependency, bool downloadIfNeeded)
        {
            if (dependency.IsInstalled())
            {
                return(true);
            }

            if (!dependency.IsDownloaded())
            {
                if (!downloadIfNeeded)
                {
                    return(false);
                }

                dependency.Download();
            }

            dependency.Install();

            return(true);
        }