Example #1
0
    /// <summary>
    /// Returns an existing or new box for the given entry which can
    /// be used to connect/disconnect/send messages
    /// </summary>
    public static FFMessageBox <EventType> Box(string entry)
    {
        GetReady();
        ++lookupCountGlobal;
        ++lookupCountLocal;

        if (messageBoard.ContainsKey(entry))
        {
            var box = messageBoard[entry];
            box.Active(activeLocal && activeGlobal);
            return(box);
        }
        else
        {
            var box = new FFMessageBox <EventType>(messageBoardSystem, entry);
            box.Active(activeLocal && activeGlobal);
            messageBoard.Add(entry, box);
            return(box);
        }
    }