Akka.Actor.Internal.AbstractStash.AbstractStash C# (CSharp) Method

AbstractStash() protected method

INTERNAL Abstract base class for stash support Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.
protected AbstractStash ( IActorContext context, int capacity = 100 ) : System
context IActorContext
capacity int
return System
        protected AbstractStash(IActorContext context, int capacity = 100)
        {
            var actorCell = (ActorCell)context;
            var mailbox = actorCell.Mailbox as IDequeBasedMailbox;
            if(mailbox == null)
            {
                string message = @"DequeBasedMailbox required, got: " + actorCell.Mailbox.GetType().Name + @"
An (unbounded) deque-based mailbox can be configured as follows:
    my-custom-mailbox {
        mailbox-type = ""Akka.Dispatch.UnboundedDequeBasedMailbox""
    }";
                throw new NotSupportedException(message);
            }
            _theStash = new LinkedList<Envelope>();
            _actorCell = actorCell;

            // TODO: capacity needs to come from dispatcher or mailbox config
            // https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/Stash.scala#L126
            _capacity = capacity;
        }