You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pavlovboris
changed the title
Addinig IServiceProvider to XpandObjectSpaceProvider initialisation
Addinig IServiceProvider to XpandObjectSpaceProvider initialization
Sep 26, 2024
Please provide why u want this change possibly with a sample so I can understand how u plan to use it and why the current implementation suffers. Cause at the end the IServiceProvider is nothing more than sugar coat and unless you plan to build rockets and want to test them with different parts has no real value other than complexity and support cost.
It should be fine, as the base XPObjectSpaceProvider has this initialization. I use it mainly to access the current user in XPO(other ways do not always work); it also allows alignment with the newly recommended Devexpress approach. This also opens further possibilities for using dependency injections in XPO objects. I have made a custom inherited from the XpandObjectSpaceProvider class, in which I get the IServiceProvider, but I thought this would be useful in the future. In any case, if it is no real value other than complexity and support cost, It is ok with me; it is just a suggestion.
Without having a sample using proxies I am afraid I will break the functionality so until then I will leave it as is. I personally prefer the FastObjectSpaceProvider so my apps do not use this class to test uppon. In addition the IObjectSpace, XafApplication classes have IServiceProvider as a dependency.
Hello,
Could you please add an initialization of XpandObjectSpaceProvider that is passing IServiceProvider serviceProvider?
I mean something like adding:
Many thanks for considering my request.
The text was updated successfully, but these errors were encountered: