示例#1
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()));
        }
示例#2
0
        /// <summary>
        /// Answers the <c>ICompletes</c> instance for this <c>Actor</c>, or <c>null</c> if the behavior of the currently
        /// delivered <c>IMessage</c> does not answer a <c>ICompletes</c>
        /// </summary>
        /// <returns><c>ICompletes</c> or <c>null</c>, depending on the current <c>IMessage</c> delivered.</returns>
        protected internal virtual ICompletes Completes()
        {
            if (completes == null)
            {
                throw new InvalidOperationException("Completes is not available for this protocol behavior");
            }

            return(completes.ClientCompletes());
        }
示例#3
0
        /// <summary>
        /// Answers the <c>ICompletes</c> instance for this <c>Actor</c>, or <c>null</c> if the behavior of the currently
        /// delivered <c>IMessage</c> does not answer a <c>ICompletes</c>
        /// </summary>
        /// <returns><c>ICompletes</c> or <c>null</c>, depending on the current <c>IMessage</c> delivered.</returns>
        protected internal virtual ICompletes Completes()
        {
            if (CompletesImpl == null || CompletesImpl.InternalClientCompletes == null)
            {
                throw new InvalidOperationException("Completes is not available for this protocol behavior; return type must not be void.");
            }

            return(CompletesImpl.ClientCompletes() !);
        }
示例#4
0
 /// <summary>
 /// Answers a <c>ICompletesEventually</c> if the behavior of the currently
 /// delivered <c>IMessage</c> does answers a <c>ICompletes</c>. Otherwise the outcome
 /// is undefined.
 /// </summary>
 /// <returns>A <c>ICompletesEventually</c> instance.</returns>
 protected internal virtual ICompletesEventually CompletesEventually()
 => LifeCycle.Environment.Stage.World.CompletesFor(completes.ClientCompletes());