예제 #1
0
    /// <summary>
    /// Initializes the newly created <c>Actor</c>.
    /// </summary>
    protected Actor()
    {
        var maybeEnvironment = ActorFactory.ThreadLocalEnvironment.Value;

        LifeCycle = new LifeCycle(maybeEnvironment ?? new TestEnvironment(), new Evictable(this));
        ActorFactory.ThreadLocalEnvironment.Value = null;
        CompletesImpl = new ResultCompletes <object>();
    }
예제 #2
0
    internal ICompletesEventually CompletesEventually(ResultCompletes completes)
    {
        if (CompletesEventuallyAddress == null)
        {
            var completesEventually = Stage.World.CompletesFor(completes.ClientCompletes());
            CompletesEventuallyAddress = completesEventually.Address;
            return(completesEventually);
        }

        return(Stage.World.CompletesFor(CompletesEventuallyAddress, completes.ClientCompletes()));
    }
예제 #3
0
        public override ICompletes <O> With <O>(O outcome)
        {
            HasInternalOutcomeSet = true;
            InternalOutcome       = outcome;

            if (!resultHolder.IsOfSameGenericType <O>())
            {
                resultHolder = new ResultCompletes <O>(InternalClientCompletes, InternalOutcome, HasInternalOutcomeSet);
            }

            return((ICompletes <O>)resultHolder);
        }