다음을 통해 공유


RunningPackage.InstanceID 속성

정의

실행하는 개체의 이 인스턴스와 연결된 고유 ID를 반환합니다. 이 필드는 읽기 전용입니다.

public:
 property Guid InstanceID { Guid get(); };
public Guid InstanceID { get; }
member this.InstanceID : Guid
Public ReadOnly Property InstanceID As Guid

속성 값

GUID를 반환합니다.

예제

다음 예제에서는 개체에서 Application 실행 중인 패키지의 컬렉션을 검색하고 각 패키지를 반복하여 InstanceID, PackageID, PackageDescriptionPackageNameUserName를 표시하는 방법을 보여 줍니다.

//...Declare and instantiate objects.  
//  
// Create a RunningPackages collection, pkgs, and fill it  
// with the running packages from the application object.  
RunningPackages pkgs = app.GetRunningPackages("yourserver");  
// Enumerate through each package in the collection and display some data.  
foreach(RunningPackage package in pkgs)  
    {  
        Console.WriteLine("InstanceID: "+package.InstanceID);  
        Console.WriteLine("PackageDescription: "+package.PackageDescription);  
        Console.WriteLine("PackageID: "+package.PackageID);  
        Console.WriteLine("PackageName: "+package.PackageName);  
        Console.WriteLine("UserName: "+package.UserName);  
    }  
//   more code here...  
'...Declare and instantiate objects.  
'  
' Create a RunningPackages collection, pkgs, and fill it  
' with the running packages from the application object.  
Dim pkgs As RunningPackages =  app.GetRunningPackages("yourserver")   
' Enumerate through each package in the collection and display some data.  
Dim package As RunningPackage  
For Each package In pkgs  
        Console.WriteLine("InstanceID: "+package.InstanceID)  
        Console.WriteLine("PackageDescription: "+package.PackageDescription)  
        Console.WriteLine("PackageID: "+package.PackageID)  
        Console.WriteLine("PackageName: "+package.PackageName)  
        Console.WriteLine("UserName: "+package.UserName)  
Next  
'   more code here...  

적용 대상