小编Rya*_*son的帖子

Structuremap是否支持Lazy开箱即用?

structuremap是否允许您以懒惰的方式进行构造函数注入?意思是不创建在使用之前注入的对象?

.net c# structuremap dependencies dependency-injection

10
推荐指数
2
解决办法
2081
查看次数

调用TopShelf.HostFactory.Run后获取ServiceName/Instance

有没有办法在调用TopShelf.HostFactory.Run()之后将ServiceName和InstanceName赋予TopShelf服务?

一种选择是直接从命令行args中拉出它.

但好奇的是,TopShelf是否会暴露这些属性本身.

在挖掘TopShelf的源代码后,没有看到暴露的点/属性.

c# windows-services topshelf

6
推荐指数
1
解决办法
2302
查看次数

表达式Web 4格式代码快捷方式?

是否有用于格式化代码的键盘快捷键,如Visual Studio有Ctrl + K Ctrl + D?

html expression-web

4
推荐指数
2
解决办法
3738
查看次数

EventStore和RavenDB持久性JsonReaderException

试图将JOliver的EventStoreRavenDB连接起来并遇到麻烦.我在Raven中创建了一个名为RavenEventStore的新数据库.

以下是我的连线;

return Wireup.Init()
           .UsingRavenPersistence("RavenEventStore")
             .UsingAsynchronousDispatchScheduler()
                .DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
           .Build();
Run Code Online (Sandbox Code Playgroud)

当调用Wireup.Init()时,RavenDb端会发生此异常;

Url:"/ indexes/RavenCommitByDate"Newtonsoft.Json.JsonReaderException:解析值时遇到意外的字符:.第1行,位于1.:Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs中的Newtonsoft.Json.JsonTextReader.ParseValue(Char currentChar):位于Newtonsoft.Json.JsonTextReader.ReadInternal的第699行()位于d:\ Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:第4行,位于d:\中的Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader,Type t,JsonConverter propertyConverter)开发\发布\ Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:第10行,位于d:\ Development\Releases\Json中的Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Type objectType)\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:位于c:\ Builds\raven\Raven.Database\Extensions\HttpExtensions.cs中Raven.Database.Extensions.HttpExtensions.ReadJsonObject [T](IHttpContext context)的第118行:第57行在Raven.Database.Server.Responders.Index.Put(IHttpContext conte xt,String index)在c:\ Builds\raven\Raven.Database\Server\Responders\Index.cs:第64行,位于c:\ Builds\raven中的Raven.Database.Server.Responders.Index.Respond(IHttpContext context)\Raven.Database\Server\Responders\Index.cs:位于c:\ Builds\raven\Raven.Database\Server\HttpServer.cs:第477行的Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx)第49行c:\ Builds\raven\Raven.Database\Server\HttpServer.cs中的Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx):第259行

我也可以在RavenDB日志中看到异常;

Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Line 1, position 1.   at Newtonsoft.Json.JsonTextReader.ParseValue(Char currentChar) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 699 at Newtonsoft.Json.JsonTextReader.ReadInternal() in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 499 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, Type t, JsonConverter propertyConverter) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1072 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType) in …
Run Code Online (Sandbox Code Playgroud)

c# cqrs ravendb event-sourcing event-store

1
推荐指数
1
解决办法
811
查看次数