2
RunInMemory = true
과 함께 RavenDB를 사용하여 통합 테스트를하고 있습니다. 디버깅 할 문제 중 하나는 JSON 직렬화와 관련이 있습니다. 메모리 내 직렬화 된 JSON 데이터 (문자열로)를 볼 수있는 가장 쉬운 방법은 무엇입니까? DocumentStore
?RunInMemory를 사용하여 RavenDB에서 원시 JSON보기
RunInMemory = true
과 함께 RavenDB를 사용하여 통합 테스트를하고 있습니다. 디버깅 할 문제 중 하나는 JSON 직렬화와 관련이 있습니다. 메모리 내 직렬화 된 JSON 데이터 (문자열로)를 볼 수있는 가장 쉬운 방법은 무엇입니까? DocumentStore
?RunInMemory를 사용하여 RavenDB에서 원시 JSON보기
당신은 이런 식으로 작업을 수행 할 수 있습니다
static public void WaitForUserToContinueTheTest(
EmbeddableDocumentStore documentStore)
{
if (Debugger.IsAttached == false)
return;
documentStore.DatabaseCommands.Put("Pls Delete Me", null,
RavenJObject.FromObject(new {
StackTrace = new StackTrace(true)
}), new RavenJObject());
documentStore.Configuration.AnonymousUserAccessMode =
AnonymousUserAccessMode.All;
using (var server = new HttpServer(documentStore.Configuration,
documentStore.DocumentDatabase))
{
server.StartListening();
// start the server
Process.Start(documentStore.Configuration.ServerUrl);
do
{
Thread.Sleep(100);
} while (
documentStore.DatabaseCommands.Get("Pls Delete Me") != null &&
Debugger.IsAttached);
}
}
이 뜻은 당신을 위해 서버를 열고, 당신은 RavenDB 내부에서 일어나는 모든 일을 볼 수있게된다.
감사합니다. 모든 엔티티를 Debug에 로깅하기 위해 뭔가를 첨부하는 것이 더 간단한 지 궁금합니다. 하지만 지금은 내 문제를 해결할 것입니다. –