다음을 통해 공유


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 캐스팅된 경우를 제외하고 반환되는 개체와 동일합니다.

적용 대상