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

UsingStatement Formatting #19

Closed
belav opened this issue Mar 1, 2021 · 3 comments
Closed

UsingStatement Formatting #19

belav opened this issue Mar 1, 2021 · 3 comments
Labels

Comments

@belav
Copy link
Owner

belav commented Mar 1, 2021

This may be cleaned up by InvocationExpression. Do that formatting first.

            using (var http = new HttpClient())
            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(
                "GraphQLApiGenerator.MetadataQuery.gql"))
            using (var queryReader = new StreamReader(stream))
            using (var content = new ByteArrayContent(
                Encoding.UTF8.GetBytes(
                    JsonConvert.SerializeObject(
                        new { query = await queryReader.ReadToEndAsync() }))))
            {
@belav belav added this to the Beta milestone Mar 12, 2021
@belav belav added the type:bug Something isn't working label Mar 14, 2021
@belav
Copy link
Owner Author

belav commented Apr 10, 2021

Currently looks like this, could probably be improved

        using (var http = new HttpClient())
        using (var stream = Assembly.GetExecutingAssembly()
            .GetManifestResourceStream("GraphQLApiGenerator.MetadataQuery.gql"))
        using (var queryReader = new StreamReader(stream))
        using (var content = new ByteArrayContent(
            Encoding.UTF8.GetBytes(
                JsonConvert.SerializeObject(
                    new { query = await queryReader.ReadToEndAsync() }
                )
            )
        ))
        {
            return;
        }

@belav belav removed this from the Beta milestone Jun 14, 2021
@belav
Copy link
Owner Author

belav commented Jul 19, 2021

This should be looked at after #7

@belav
Copy link
Owner Author

belav commented Oct 19, 2021

The only improvement I see will come with #451

@belav belav closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant