WebApplicationFactoryContentRootAttribute 클래스

정의

를 사용하여 로 WebApplicationFactory<TEntryPoint> 표시되는 TEntryPoint웹 애플리케이션의 콘텐츠 루트를 찾는 메타데이터입니다. WebApplicationFactory<TEntryPoint>는 의 WebApplicationFactoryContentRootAttribute모든 인스턴스를 반복하고 와 Key 같은 인스턴스를 오름차순으로 TEntryPointFullNamePriority 정렬합니다. WebApplicationFactory<TEntryPoint>는 에 마커 Path.Combine(ContentRootPath, Path.GetFileName(ContentRootTest))" 가 있는지 검사 파일이 있으면 콘텐츠 루트ContentRootPath를 로 설정합니다.

public ref class WebApplicationFactoryContentRootAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true, Inherited=false)]
public sealed class WebApplicationFactoryContentRootAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true, Inherited=false)>]
type WebApplicationFactoryContentRootAttribute = class
    inherit Attribute
Public NotInheritable Class WebApplicationFactoryContentRootAttribute
Inherits Attribute
상속
WebApplicationFactoryContentRootAttribute
특성

생성자

WebApplicationFactoryContentRootAttribute(String, String, String, String)

WebApplicationFactoryContentRootAttribute의 새 인스턴스를 초기화합니다.

속성

ContentRootPath

지정된 프로젝트의 콘텐츠 루트 경로를 가져옵니다. 이 콘텐츠 루트는 상대 또는 절대일 수 있습니다. 상대 경로인 경우 와 BaseDirectory결합됩니다.

ContentRootTest

콘텐츠 루트가 설정되는 경로가 올바른지 확인하는 데 사용되는 표식 파일입니다.

Key

이 프로젝트와 연결된 콘텐츠 루트의 키를 가져옵니다. 일반적으로 입니다 FullName.

Priority

동일한 키를 가진 여러 WebApplicationFactoryContentRootAttribute 인스턴스가 테스트 Assembly에 있는 경우 검색 순서를 결정하는 숫자를 가져옵니다.

적용 대상