2
RunInMemory = true
でRavenDBを使って統合テストを行っています。私がデバッグしている問題の1つは、JSONのシリアル化に関連しています。メモリ内のシリアル化されたJSONデータ(文字列として)を表示する最も簡単な方法は何ですか?DocumentStore
?RavenDBのRaw JSONをRunInMemoryで参照してください
RunInMemory = true
でRavenDBを使って統合テストを行っています。私がデバッグしている問題の1つは、JSONのシリアル化に関連しています。メモリ内のシリアル化されたJSONデータ(文字列として)を表示する最も簡単な方法は何ですか?DocumentStore
?RavenDBのRaw JSONをRunInMemoryで参照してください
あなたはこのようにそれを行うことができます。
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の内部で起こるすべてのものを見てみましょうされます。
ありがとうございました。すべてのエンティティをデバッグするために何かを添付する方が簡単かどうかと思います。しかし今のところこれで私の問題は解決します。 –