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

Why create a new QueryFactory when it can be assigned via an XQuery property #518

Closed
ghost opened this issue Aug 20, 2021 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Aug 20, 2021

Hi,

Why create a new QueryFactory when it can be assigned via an XQuery property.

       internal static QueryFactory CreateQueryFactory(XQuery xQuery)
        {
            //I don't understand what is the meaning of this new creation?
            var factory = new QueryFactory(xQuery.Connection, xQuery.Compiler); // Original

            //While it can be assigned like this:
            var factory = xQuery.QueryFactory; // Another solution

            factory.Logger = xQuery.Logger;

            return factory;
        }

Thanks

@generik0
Copy link

Looks like a candidate for an extension method in the package.

Why not fork, and maybe a PR?

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

No branches or pull requests

2 participants