diff --git a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/AppDeployment.cs b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/AppDeployment.cs index 062dc6a1..8dc87504 100644 --- a/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/AppDeployment.cs +++ b/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Core/AppDeployment.cs @@ -366,6 +366,28 @@ public class PackageInfo [DataMember(Name = "Version")] public PackageVersion Version { get; private set; } + /// + /// Gets package origin, a measure of how the app was installed. + /// PackageOrigin_Unknown            = 0, + /// PackageOrigin_Unsigned           = 1, + /// PackageOrigin_Inbox              = 2, + /// PackageOrigin_Store              = 3, + /// PackageOrigin_DeveloperUnsigned  = 4, + /// PackageOrigin_DeveloperSigned    = 5, + /// PackageOrigin_LineOfBusiness     = 6 + /// + [DataMember(Name = "PackageOrigin")] + public int PackageOrigin { get; private set; } + + // + /// Helper method to determine if the app was sideloaded and therefore can be used with e.g. GetFolderContentsAsync + /// + /// True if the package is sideloaded. + public bool IsSideloaded() + { + return (this.PackageOrigin == 4 || this.PackageOrigin == 5); + } + /// /// Get a string representation of the package ///