Esempio n. 1
0
 /// <summary>
 ///     PCLBuildProcess constructor
 /// </summary>
 /// <param name="llbpd">
 ///     PCLBuildProcessDescripton describes PCL build parameters
 /// </param>
 public PCLBuildProcess(PCLBuildProcessDescripton pclbpd)
 {
     destinationFolder = pclbpd.destinationFolder;
     compilerType      = pclbpd.compilerType;
     pclVersion        = pclbpd.pclVersion;
     platform          = pclbpd.platform;
 }
Esempio n. 2
0
        /// <summary>
        ///     GetPCLZipFileName method gets the PCL zip file name for requested PCL version
        /// </summary>
        /// <param name="version">
        ///     PCL version for which zip file name is requested
        /// </param>
        /// <returns>
        ///     PCL zip file name for matching PCL version from PCL information list
        /// </returns>
        public static string GetPCLZipFileName(ePCLVersion version)
        {
            foreach (PCLInfo lib in CreateInfoList())
            {
                if (lib.pclVersion == version)
                {
                    return(lib.ZIPFilename);
                }
            }

            throw new Exception("Unknown PCL version");
        }
Esempio n. 3
0
        /// <summary>
        ///     GetDownloadURL method gets the download URL for requested PCL version from PCLInfo list
        /// </summary>
        /// <param name="version">
        ///     PCL version for which download URL is required
        /// </param>
        /// <returns>
        ///     Download PCL URL for requested PCL version
        /// </returns>
        public static string GetDownloadURL(ePCLVersion version)
        {
            foreach (PCLInfo info in CreateInfoList())
            {
                if (info.pclVersion == version)
                {
                    return(info.DownloadURL);
                }
            }

            throw new Exception("Unknown PCL version.");
        }
Esempio n. 4
0
        /// <summary>
        ///     GetPCLInfo method returns a new PCLInfo instance
        /// </summary>
        /// <param name="version">
        ///     PCL version
        /// </param>
        /// <returns>
        ///     A new PCLInfo instance with matching PCL version
        /// </returns>
        public static PCLInfo GetPCLInfo(ePCLVersion version)
        {
            foreach (PCLInfo info in CreateInfoList())
            {
                if (info.pclVersion == version)
                {
                    return(new PCLInfo(info.ZIPFilename, info.downloadURL, info.pclVersion)); // hand back a copy
                }
            }

            throw new Exception("Unknown PCL version.");
        }
Esempio n. 5
0
        /// <summary>
        ///     TransformPCLVersionToString method transforms enum value of PCL version to PCL version string
        /// </summary>
        /// <param name="version">
        ///     Enum value of PCL version
        /// </param>
        /// <returns>
        ///     String value of enum PCL version
        /// </returns>
        public static string TransformPCLVersionToString(ePCLVersion version)
        {
            switch (version)
            {
            case ePCLVersion.PCL_1_7_1:
                return("1.7.1");

            case ePCLVersion.FromSourceGIT:
                return("From Source (GIT)");
            }

            throw new Exception("Unknown PCL version");
        }
Esempio n. 6
0
 /// <summary>
 ///     PCLInfo constructor
 /// </summary>
 /// <param name="filename">
 ///     PCL zip file to be downloaded
 /// </param>
 /// <param name="downloadURL">
 ///     PCL download URL string
 /// </param>
 /// <param name="pclVersion">
 ///     PCL version to be downloaded
 /// </param>
 PCLInfo(string filename, string downloadURL, ePCLVersion pclVersion)
 {
     this.zipFilename = filename;
     this.downloadURL = downloadURL;
     this.pclVersion  = pclVersion;
 }