本文整理汇总了C#中IDependencyResolver.Create方法的典型用法代码示例。如果您正苦于以下问题:C# IDependencyResolver.Create方法的具体用法?C# IDependencyResolver.Create怎么用?C# IDependencyResolver.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDependencyResolver
的用法示例。
在下文中一共展示了IDependencyResolver.Create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AkkaDataService
// rename container ...
public AkkaDataService(IUnityContainer container, IEventAggregator eventAggregator)
{
var config = ConfigurationFactory.ParseString(@"
akka {
actor {
provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote""
}
remote {
helios.tcp {
transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote""
applied-adapters = []
transport-protocol = tcp
port = 0
hostname = localhost
}
}
}
");
_system = ActorSystem.Create("WebDB", config);
_resolver = new UnityDependencyResolver(container, _system);
var chatClient = _system.ActorOf(_resolver.Create<DBClientActor>(), "DBClientActor");
_system.ActorSelection("akka.tcp://[email protected]:8081/user/DBEntityRoot");
chatClient.Tell(new GetAllRequest("Party"));
/*
while (true) { System.Threading.Thread.Sleep(10); }
while (true)
{
var input = Console.ReadLine();
if (input.StartsWith("/"))
{
var parts = input.Split(' ');
var cmd = parts[0].ToLowerInvariant();
var rest = string.Join(" ", parts.Skip(1));
//if (cmd == "/nick")
//{
// chatClient.Tell(new NickRequest
// {
// NewUsername = rest
// });
//}
}
//else
//{
// chatClient.Tell(new SayRequest()
// {
// Text = input,
// });
//}
}
}
*/
}