Akka.Dispatch.Mailboxes.Mailboxes C# (CSharp) Method

Mailboxes() public method

Initializes a new instance of the Mailboxes class.
public Mailboxes ( ActorSystem system ) : System
system ActorSystem The system.
return System
        public Mailboxes(ActorSystem system)
        {
            _system = system;
            _deadLetterMailbox = new DeadLetterMailbox(system.DeadLetters);
            var mailboxConfig = system.Settings.Config.GetConfig("akka.actor.mailbox");
            var requirements = mailboxConfig.GetConfig("requirements").AsEnumerable().ToList();
            _requirementsMapping = new Dictionary<Type, Config>();
            foreach (var kvp in requirements)
            {
                var type = Type.GetType(kvp.Key);
                if (type == null)
                {
                    //TODO: can't log here, logger not created yet
                  //  system.Log.Warn("Mailbox Requirement mapping '{0}' is not an actual type",kvp.Key);
                    continue;
                }
                var config = system.Settings.Config.GetConfig(kvp.Value.GetString());
                _requirementsMapping.Add(type, config);
            }

            _defaultMailboxType = FromConfig(DefaultMailboxId);
        }