本文整理汇总了C#中Select.WithClient方法的典型用法代码示例。如果您正苦于以下问题:C# Select.WithClient方法的具体用法?C# Select.WithClient怎么用?C# Select.WithClient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Select
的用法示例。
在下文中一共展示了Select.WithClient方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Select_WithClient_should_update_Client_and_copy_the_rest_of_the_properties_BUG_427
public void Select_WithClient_should_update_Client_and_copy_the_rest_of_the_properties_BUG_427()
{
var deadline = new TimeSpan(Sys.Scheduler.MonotonicClock.Ticks/2); //Some point in the past
Predicate<object> predicate = o => true;
var actorRef = new EmptyLocalActorRef(((ActorSystemImpl)Sys).Provider, new RootActorPath(new Address("akka", "test")), Sys.EventStream);
var select = new Select(deadline, predicate, actorRef);
var updatedActorRef = new EmptyLocalActorRef(((ActorSystemImpl)Sys).Provider, new RootActorPath(new Address("akka2", "test2")), Sys.EventStream);
var updatedSelect = (Select)select.WithClient(updatedActorRef);
updatedSelect.Deadline.ShouldBe(deadline);
updatedSelect.Predicate.ShouldBe(predicate);
updatedSelect.Client.ShouldBe(updatedActorRef);
}
示例2: Select_WithClient_should_update_Client_and_copy_the_rest_of_the_properties_BUG_427
public void Select_WithClient_should_update_Client_and_copy_the_rest_of_the_properties_BUG_427()
{
var deadline = new DateTime(1919, 5, 24);
Predicate<object> predicate = o => true;
var actorRef = new EmptyLocalActorRef(((ActorSystemImpl)Sys).Provider, new RootActorPath(new Address("akka", "test")), Sys.EventStream);
var select = new Select(deadline, predicate, actorRef);
var updatedActorRef = new EmptyLocalActorRef(((ActorSystemImpl)Sys).Provider, new RootActorPath(new Address("akka2", "test2")), Sys.EventStream);
var updatedSelect = (Select)select.WithClient(updatedActorRef);
updatedSelect.Deadline.ShouldBe(deadline);
updatedSelect.Predicate.ShouldBe(predicate);
updatedSelect.Client.ShouldBe(updatedActorRef);
}