언어

ForEachLoop.GetPackagePath 메서드

정의

패키지 위치까지의 상대 경로를 포함하는 문자열을 반환합니다.

public:
 virtual System::String ^ GetPackagePath();
public string GetPackagePath();
abstract member GetPackagePath : unit -> string
override this.GetPackagePath : unit -> string
Public Function GetPackagePath () As String

반품

패키지로 가는 경로를 포함하는 문자열입니다.

구현

예제

다음 코드 예시 ForEachLoop는 컬렉션을 사용하여 Properties 몇 가지 속성을 설정하고, 패키지 경로를 가져옵니다.

// Create the new package.  
Package package = new Package();  
// Add variables.  
package.Variables.Add("Id", false, "User", 0);  
// Create ForEachLoop task  
Executables executables = package.Executables;  
ForEachLoop forEachLoop = executables.Add("STOCK:FOREACHLOOP") as ForEachLoop;  
// Set properties on the ForEachLoop, like name and description.  
// Show how to set them using the Properties collection.  
forEachLoop.Properties["Name"].SetValue(forEachLoop, "ForEachLoop Container");  
forEachLoop.Properties["Description"].SetValue(forEachLoop, "ForEachLoop Container");  

// Retrieve the package path of the loop.  
String path = forEachLoop.GetPackagePath();  
Console.WriteLine("Package path: {0}", path);  
' Create the new package.  
Dim package As Package =  New Package()   
' Add variables.  
package.Variables.Add("Id", False, "User", 0)  
' Create ForEachLoop task  
Dim executables As Executables =  package.Executables   
Dim forEachLoop As ForEachLoop =  executables.Add("STOCK:FOREACHLOOP") as ForEachLoop   
' Set properties on the ForEachLoop, like name and description.  
' Show how to set them using the Properties collection.  
forEachLoop.Properties("Name").SetValue(forEachLoop, "ForEachLoop Container")  
forEachLoop.Properties("Description").SetValue(forEachLoop, "ForEachLoop Container")  

' Retrieve the package path of the loop.  
Dim path As String =  forEachLoop.GetPackagePath()   
Console.WriteLine("Package path: {0}", path)  

샘플 출력:

패키지 경로: \Package\ForEachLoop 컨테이너

적용 대상