示例#1
0
        /// <exception cref="ArgumentNullException"><paramref name="spec"/> is <see langword="null" />.</exception>
        public GameArchiveSpec(InstallationSpec spec, OperatingSystem os)
        {
            if (spec == null)
            {
                throw new ArgumentNullException("spec");
            }

            Version            = spec.Version;
            Architecture       = spec.Architecture;
            BuildConfiguration = spec.BuildConfiguration;
            OperatingSystem    = os;
        }
示例#2
0
        /// <exception cref="ArgumentNullException"><paramref name="version"/> is <see langword="null" />.</exception>
        public GameArchiveSpec(VersionNumber version, CpuArchitecture architecture, BuildConfiguration buildConfiguration, OperatingSystem operatingSystem)
        {
            if (version == null)
            {
                throw new ArgumentNullException("version");
            }

            Version            = version;
            Architecture       = architecture;
            BuildConfiguration = buildConfiguration;
            OperatingSystem    = operatingSystem;
        }
示例#3
0
        /// <exception cref="ArgumentOutOfRangeException">os</exception>
        public static string GetArchiveExtension(OperatingSystem os)
        {
            switch (os)
            {
            case OperatingSystem.Windows:
                return(".zip");

            case OperatingSystem.Mac:
                return(".dmg");

            case OperatingSystem.Linux:
                return(".tar.gz");

            default:
                throw new ArgumentOutOfRangeException("os");
            }
        }