Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing feature to execute resource initializer from facade #246

Open
dbeuchler opened this issue Mar 28, 2023 · 0 comments
Open

Missing feature to execute resource initializer from facade #246

dbeuchler opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dbeuchler
Copy link
Member

dbeuchler commented Mar 28, 2023

Is your feature request related to a problem? Please describe.
We want to auto install our application and want to execute a resource initializer from outside the resource management module.
There is no possibility to execute an initializer on the ResourceManagement-Facade (compare to execute product importer).

Describe the solution you'd like
A new method ExecuteInitializer(IResourceIntializer initializer);

Describe alternatives you've considered
There is a workaround to get the ResourceGraph by reflection.

var resourceInitializer = new MyResourceInitializer();
var resourceGraph = ResourceManagement.GetType().GetProperty("ResourceGraph").GetValue(ResourceManagement, null) as IResourceGraph;
var resources = resourceInitializer.Execute(resourceGraph);
resources.ForEach(r => resourceGraph.Save(r));

Additional context
Add any other context or screenshots about the feature request here.

@dbeuchler dbeuchler added the enhancement New feature or request label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant