def element_factory(): event_manager = EventManager() element_dispatcher = ElementDispatcher(event_manager, UMLModelingLanguage()) element_factory = ElementFactory(event_manager, element_dispatcher) yield element_factory element_factory.shutdown() element_dispatcher.shutdown() event_manager.shutdown()
def element_factory(event_manager): # noqa: F811 return ElementFactory( event_manager, ElementDispatcher(event_manager, MockModelingLanguage()))
def dispatcher(event_manager, modeling_language): return ElementDispatcher(event_manager, modeling_language)
def element_factory(event_manager): return ElementFactory( event_manager, ElementDispatcher(event_manager, UMLModelingLanguage()))
def element_factory(event_manager): element_factory = ElementFactory( event_manager, ElementDispatcher(event_manager, UMLModelingLanguage())) yield element_factory element_factory.shutdown()