InstallationManager.FindPackagesForCurrentPublisher 메서드

정의

이 메서드를 호출하는 앱과 동일한 게시자 ID를 가진 모든 앱 패키지를 반환합니다.

public:
 static IIterable<Package ^> ^ FindPackagesForCurrentPublisher();
 static IIterable<Package> FindPackagesForCurrentPublisher();
public static IEnumerable<Package> FindPackagesForCurrentPublisher();
function findPackagesForCurrentPublisher()
Public Shared Function FindPackagesForCurrentPublisher () As IEnumerable(Of Package)

반환

이 메서드를 호출하는 앱과 동일한 게시자 ID를 가진 앱 패키지 목록입니다.

예제

using Windows.ApplicationModel;
using Windows.Phone.Management.Deployment;

void DisplayApplicationInfo(string ProductId)
{

    IEnumerable<Package> packages = InstallationManager.FindPackagesForCurrentPublisher();

    // Loop over all installed applications looking for the specified ProductId 
    // (not the most efficient way to search, but a simple way to show how to use   
    // the functionality. 
    foreach (Package package in packages)
    {
        if (package.Id.ProductId.ToString().ToLower()== ProductId.ToLower())
        {
            // Dislay the title info in the ApplicationTitle textlock.
            ApplicationTitle.Text = package.Id.Name;

            // Retrieve the icon image by getting its DSS Token.
            string token = package.GetThumbnailToken();

            // Do something with image token.

        }
    }
}

이 방법을 사용하여 게시자 ID의 다른 앱이 휴대폰에 설치되어 있는지 확인할 수도 있습니다. 설치되어 있는 경우 시작할 수 있습니다. 다음 예제에서는 현재 게시자 ID에 대한 모든 앱을 열거하고 열거형에서 첫 번째 앱을 시작합니다(해당 앱이 현재 앱이 아닌 경우).

IEnumerable<Package> apps = Windows.Phone.Management.Deployment.InstallationManager.FindPackagesForCurrentPublisher();
apps.First().Launch(string.Empty);

설명

이 메서드는 호출 앱의 게시자 ID와 연결된 모든 애플리케이션을 반환합니다. 다음 내용이 포함됩니다.

  • 휴대폰에 미리 로드된 앱.
  • 사용자가 설치한 앱입니다.
  • 현재 휴대폰의 SD 카드 저장된 앱.
  • 엔터프라이즈 앱.

적용 대상