Share via


OutputGroups.Parent 속성

OutputGroups 컬렉션의 바로 위 부모 개체를 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property Parent As Configuration
    Get
Configuration Parent { get; }
property Configuration^ Parent {
    Configuration^ get ();
}
abstract Parent : Configuration
function get Parent () : Configuration

속성 값

형식: EnvDTE.Configuration
Configuration 개체입니다.

설명

Parent 속성은 개체나 컬렉션의 바로 위 부모를 반환합니다.

예제

public void CodeExample(DTE2 dte)
{  
    try
    {
        // Open a project before running this example.
        Project proj = dte.Solution.Projects.Item(1);
        OutputGroups groups = proj.ConfigurationManager.ActiveConfiguration.OutputGroups;
        int c = 1;
        int x = 0;
        string msg;
        // Find the last outputgroup with at least one file.
        foreach (OutputGroup grp in groups)
        {
            x++;
            if (grp.FileCount > 0)
                c = x;
        }
        OutputGroup group = groups.Item(c);
        msg = "The " + c + "/" + groups.Count + " item in the OutputGroups groups collection is " +
            group.DisplayName;
        msg += "\nThe parent of the collection is the Configuration: " + groups.Parent.ConfigurationName;
        msg += "\nThe application containing this collection is: " + groups.DTE.Name;
        MessageBox.Show(msg);
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

OutputGroups 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행