Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mock{T}"/> class.
 /// </summary>
 internal Mock(ActorExecutionContext.Mock context, T value)
     : base(value)
 {
     this.Context       = context;
     this.RegisterActor = context.CreateActor(typeof(SharedRegisterActor <T>));
     context.SendEvent(this.RegisterActor, SharedRegisterEvent.SetEvent(value));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Mock{T}"/> class.
 /// </summary>
 internal Mock(ControlledRuntime runtime, T value)
     : base(value)
 {
     this.Runtime       = runtime;
     this.RegisterActor = this.Runtime.CreateActor(typeof(SharedRegisterActor <T>));
     this.Runtime.SendEvent(this.RegisterActor, SharedRegisterEvent.SetEvent(value));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets current value of the register.
 /// </summary>
 public override void SetValue(T value)
 {
     this.Context.SendEvent(this.RegisterActor, SharedRegisterEvent.SetEvent(value));
 }