from typing import Any, Dict

from ._ContextMessageBus import ContextMessageBus


class Context(object):
    def __init__(self, context_name, message_bus, **kwargs):
        # type: (str, ContextMessageBus, Dict[str, Any]) -> None
        self.context_name = context_name
        self.message_bus = message_bus
        self.kwargs = kwargs

    def __getattr__(self, name: str) -> Any:
        return self.kwargs[name]
