Example #1
0
        public static string GetPackageTypeStringFrom(MsixPackageType packageType, PackageTypeDisplay displayType = PackageTypeDisplay.Normal)
        {
            var isUwp = (packageType & MsixPackageType.Uwp) == MsixPackageType.Uwp;

            if (isUwp)
            {
                switch (displayType)
                {
                case PackageTypeDisplay.Long:
                    return("Universal Windows Platform (UWP) app");

                default:
                    return("UWP");
                }
            }

            var isBridge = (packageType & MsixPackageType.BridgeDirect) == MsixPackageType.BridgeDirect;

            if (isBridge)
            {
                switch (displayType)
                {
                case PackageTypeDisplay.Long:
                    return("Classic Win32 app");

                default:
                    return("Win32");
                }
            }

            var isPsf = (packageType & MsixPackageType.BridgePsf) == MsixPackageType.BridgePsf;

            if (isPsf)
            {
                switch (displayType)
                {
                case PackageTypeDisplay.Long:
                    return("Classic Win32 app enhanced by Package Support Framework (PSF)");

                case PackageTypeDisplay.Short:
                    return("PSF");

                default:
                    return("Win32 + PSF");
                }
            }

            var isWeb = (packageType & MsixPackageType.Web) == MsixPackageType.Web;

            if (isWeb)
            {
                switch (displayType)
                {
                case PackageTypeDisplay.Long:
                    return("Web application");

                default:
                    return("Web");
                }
            }

            var isFramework = (packageType & MsixPackageType.Framework) == MsixPackageType.Framework;

            if (isFramework)
            {
                switch (displayType)
                {
                case PackageTypeDisplay.Short:
                    return("FRAMEWORK");

                default:
                    return("Framework");
                }
            }

            switch (displayType)
            {
            case PackageTypeDisplay.Short:
                return("App");

            default:
                return("Unknown");
            }
        }
Example #2
0
 public static string GetPackageTypeStringFrom(string entryPoint, string executable, string startPage, bool isFramework, PackageTypeDisplay displayType = PackageTypeDisplay.Normal)
 {
     return(GetPackageTypeStringFrom(GetPackageTypeFrom(entryPoint, executable, startPage, isFramework), displayType));
 }