FakeLogRecord.StructuredState プロパティ

定義

読み取り専用リストとしてログ レコードを作成するときに呼び出し元によって提供される不透明な状態を取得します。

public:
 property System::Collections::Generic::IReadOnlyList<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ StructuredState { System::Collections::Generic::IReadOnlyList<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ get(); };
public System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<string,string?>>? StructuredState { get; }
member this.StructuredState : System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<string, string>>
Public ReadOnly Property StructuredState As IReadOnlyList(Of KeyValuePair(Of String, String))

プロパティ値

例外

状態オブジェクトは、サポートされているログ モデルと互換性がありません。また、読み取り専用リストではありません。

注釈

コード ジェネレーター ログ モデルを使用してログを記録する場合、ログ記録メソッドに指定した引数は、 Log<TState>(LogLevel, EventId, TState, Exception, Func<TState,Exception,String>) メソッドに配信される単一の状態オブジェクトにパッケージ化されます。 この状態は、読み取り専用リストでエンコードされた名前と値のペアのセットとして取得できます。

このプロパティによって返されるオブジェクトは、読み取り専用リストにキャストされている点を除き、 State が返すオブジェクトと同じです。

適用対象