Skip to content

Remove unuse static field in ImageDrawing.cs#5651

Closed
lindexi wants to merge 1 commit into
dotnet:mainfrom
dotnet-campus:t/lindexi/RemoveStaticFieldImageDrawing.cs
Closed

Remove unuse static field in ImageDrawing.cs#5651
lindexi wants to merge 1 commit into
dotnet:mainfrom
dotnet-campus:t/lindexi/RemoveStaticFieldImageDrawing.cs

Conversation

@lindexi
Copy link
Copy Markdown
Member

@lindexi lindexi commented Nov 7, 2021

Description

Remove unuse static field in ImageDrawing.cs

Customer Impact

No.

Regression

.NET 7

Testing

Just CI

Risk

Low.

@lindexi lindexi requested a review from a team as a code owner November 7, 2021 09:27
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Nov 7, 2021
@ghost ghost requested review from SamBent, fabiant3 and ryalanms November 7, 2021 09:27
RussKie
RussKie previously approved these changes Nov 26, 2021
@ThomasGoulet73
Copy link
Copy Markdown
Contributor

This file seems to be generated and it says at the top of the file to not edit it manually: https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageDrawing.cs#L7.

I thinkg that this field is generated from this entry in the xml: https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet.Wpf/src/WpfGfx/codegen/mcg/xml/Resource.xml#L3426.

You can try removing the entry in the xml and then running the codegen (I haven't tried running the codegen but you can take a look at the readme). It also generates some C++ code so this field might be used elsewhere.

@vishalmsft
Copy link
Copy Markdown
Contributor

Thank you @ThomasGoulet73 for highlighting the catch.
Yes for generated code, editing manually is not a good idea. Will take a deeper look at XML and all generated source code.

@RussKie
Copy link
Copy Markdown
Contributor

RussKie commented Nov 30, 2021

Haha, I should've paid more attention

//
//
// This file was generated, please do not edit it directly.
//
// Please see MilCodeGen.html for more information.
//

@dipeshmsft
Copy link
Copy Markdown
Member

@lindexi, Can we go ahead and close this PR ??

@lindexi
Copy link
Copy Markdown
Member Author

lindexi commented Jan 29, 2022

@dipeshmsft Yes.

@lindexi lindexi closed this Jan 29, 2022
@ThomasGoulet73 ThomasGoulet73 mentioned this pull request Feb 16, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

PR metadata: Label to tag PRs, to facilitate with triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants