語言

LogPropertiesAttribute.Transitive 屬性

定義

取得或設定一個值,指示是否要傳遞地造訪複雜物件的屬性。

public:
 property bool Transitive { bool get(); void set(bool value); };
[System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0003", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public bool Transitive { get; set; }
public bool Transitive { get; set; }
[<System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0003", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
member this.Transitive : bool with get, set
member this.Transitive : bool with get, set
Public Property Transitive As Boolean

屬性值

預設為 false。

屬性

備註

在記錄物件屬性時,這個屬性會控制每個遇到屬性的行為。 當此屬性為 false時,則每個屬性透過呼叫 ToString() 序列化以產生該屬性的字串。 當此性質為 true時,則任何複雜物件的每個性質都會被個別展開。

適用於