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

ConnectionManager handling #52

Open
carl-berg opened this issue Sep 28, 2020 · 0 comments
Open

ConnectionManager handling #52

carl-berg opened this issue Sep 28, 2020 · 0 comments

Comments

@carl-berg
Copy link
Collaborator

carl-berg commented Sep 28, 2020

As an attempt to work around #50 i attempted to use the #51 solution in my own custom field -implementation but it is quite hard to override some of GWM's behaviors (interal/private stuff) that it eventually proved unfeasible to do (without copying alot of GWM's code). Some pain points:

  • TransactionManager (in a file named ConnectionManager 😄 ) is internal can therefore cannot be replaced
  • MigrationBase._connectionManager is private and and gets set like this
        public async Task ManageGalacticWaste()
        {
            using (var connectionManager = ManageConnection())
            {
                _connectionManager = connectionManager;
                await ManageWaste();
            }
        }

...which makes it quite hard to override

I think if maybe a TransactionManager was passed into ManageGalacticWaste (and maybe ManageWaste method aswell) it would simplify overriding stuff. In a longer term maybe MigrationBase could be replaced with a service or something instead of a somewhat clunky inheritance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant