WebApplicationFactoryContentRootAttribute Sınıf

Tanım

WebApplicationFactory<TEntryPoint> TEntryPointile temsil edilen web uygulamasının içerik kökünü bulmak için kullanan meta veriler. WebApplicationFactory<TEntryPoint>tüm örnekleri üzerinde tekrarlar, WebApplicationFactoryContentRootAttribute Key TEntryPoint'eeşit olan örnekleri filtreler ve bunları artan FullName Priority düzende sıralar. WebApplicationFactory<TEntryPoint> , Path.Combine( ContentRootPath , Path.GetFileName( ContentRootTest ))" içinde işaretçinin varlığını kontrol eder ve dosya mevcutsa içerik kökü olarak ContentRootPath ayarlanır.

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
Devralma
WebApplicationFactoryContentRootAttribute
Öznitelikler

Oluşturucular

WebApplicationFactoryContentRootAttribute(String, String, String, String)

yeni bir örneğini WebApplicationFactoryContentRootAttribute başlatılır.

Özellikler

ContentRootPath

Verilen bir projenin içerik kök yolunu alır. Bu içerik kökü göreli veya mutlak olabilir. Göreli bir yol ise ile birleştirilmiş BaseDirectory olur.

ContentRootTest

İçerik kökünün ayarlanacak yolu doğru olduğundan emin olmak için kullanılan bir işaretçi dosyası.

Key

Bu projeyle ilişkili içerik kökünün anahtarını alır. Genellikle FullName .

Priority

testinde aynı anahtara sahip birden çok örnek mevcut olduğunda yoklama WebApplicationFactoryContentRootAttribute sırası belirlemek için bir sayı Assembly alır.

Şunlara uygulanır