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

Improve formatting for casting #407

Closed
respel opened this issue Aug 20, 2021 · 3 comments · Fixed by #641
Closed

Improve formatting for casting #407

respel opened this issue Aug 20, 2021 · 3 comments · Fixed by #641

Comments

@respel
Copy link

respel commented Aug 20, 2021

Right now, the casting formatting makes everything squished together and it's a bit hard to decipher at first glance what's happening.

//Is
var attribute =
    (AssemblyFileVersionAttribute)typeof(JsonConvert).GetTypeInfo()
        .Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));



//CouldBe
var attribute = (AssemblyFileVersionAttribute) 
    typeof(JsonConvert).GetTypeInfo()
        .Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));

//Or
var attribute = 
    (AssemblyFileVersionAttribute) 
        typeof(JsonConvert).GetTypeInfo()
            .Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));
@belav
Copy link
Owner

belav commented Aug 20, 2021

This probably somewhat relates to #7, or at least there will be some edge cases that involve both.

@belav belav added this to the Beta milestone Sep 18, 2021
@belav
Copy link
Owner

belav commented Oct 19, 2021

After #7 this is how things end up

        var attribute = (AssemblyFileVersionAttribute)typeof(JsonConvert)
            .GetTypeInfo()
            .Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));

        var attribute =
            (AssemblyFileVersionAttribute)typeof(JsonConvert________________________________________________)
                .GetTypeInfo()
                .Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));

@belav
Copy link
Owner

belav commented Oct 24, 2021

#338 is related

@belav belav modified the milestones: Beta, 1.0.0 Feb 5, 2022
@belav belav modified the milestones: 1.0.0, 0.17.0 Apr 4, 2022
belav added a commit that referenced this issue Apr 4, 2022
shocklateboy92 pushed a commit that referenced this issue Apr 6, 2022
* Better breaking for casting

closes #407

* Handling some edge cases

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

Successfully merging a pull request may close this issue.

2 participants