AdvancedLauncher.Management.ConfigurationManager.CheckLauncher C# (CSharp) Method

CheckLauncher() public method

public CheckLauncher ( GameModel model ) : bool
model AdvancedLauncher.SDK.Model.Config.GameModel
return bool
        public bool CheckLauncher(GameModel model)
        {
            if (model == null) {
                throw new ArgumentException("model argument cannot be null");
            }
            IConfiguration config = GetConfiguration(model);
            string pLauncherPath = GetLauncherPath(model);
            if (string.IsNullOrEmpty(pLauncherPath)) {
                return false;
            }

            new FileIOPermission(FileIOPermissionAccess.Read, pLauncherPath).Assert();
            if (!File.Exists(Path.Combine(pLauncherPath, config.LauncherExecutable))) {
                return false;
            }
            return true;
        }