public EnforcementResult IsRequirementSatisfied(Installer installer) { switch (installer.Architecture) { case ArchitectureTypes.x86: { return(EnforcementResult.Pass()); } case ArchitectureTypes.x64: { if (_envInfo.Is64BitOperatingSystem) { return(EnforcementResult.Pass()); } return(EnforcementResult.Fail("x64 OS required for installation")); } default: { return(EnforcementResult.Fail("Unsupported architecture: " + installer.Architecture)); } } }
public EnforcementResult IsRequirementSatisfied(Installer installer) { if (installer.MinWindowsVersion == null) { return(EnforcementResult.Pass()); } if (_environmentProxy.WindowsVersion >= installer.MinWindowsVersion) { return(EnforcementResult.Pass()); } return(EnforcementResult.Fail($"Min supported OS version: {installer.MinWindowsVersion}. Current version: {_environmentProxy.WindowsVersion}")); }