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

GenerationFixture.GetPageAndFeatureTemplates has statement that needs clarity #869

Closed
crutkas opened this issue Jul 21, 2017 · 5 comments
Closed
Assignees
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Can Close Out Soon Work relating to this issue has been completed.
Milestone

Comments

@crutkas
Copy link
Member

crutkas commented Jul 21, 2017

inside: GetPageAndFeatureTemplates

var itemTemplates = GenerationFixture.Templates.Where(t => t.GetFrameworkList().Contains(framework) && t.GetTemplateType() == TemplateType.Page || t.GetTemplateType() == TemplateType.Feature && !t.GetIsHidden());

is this (framework and page) or (feature and hidden)

Assigned to @sibille as blame shows it is her function and want clarity before anything is done.

@crutkas crutkas added the bug The issue relates to the wizard not working or a problem with the generated code. label Jul 21, 2017
@crutkas crutkas added this to the 1.3 milestone Jul 21, 2017
@mrlacey
Copy link
Collaborator

mrlacey commented Jul 21, 2017

I think I've added some brackets to that query (and others like it) in the VB branch as I also had to add another clause and it got even harder to read. Also reformatted over multiple lines to improve readability.

From https://github.com/Microsoft/WindowsTemplateStudio/blob/VisualBasic/code/test/Templates.Test/GenerationFixture.cs

var itemTemplates = Templates.Where(t => t.GetFrameworkList().Contains(framework)
                                      && (t.GetTemplateType() == TemplateType.Page || t.GetTemplateType() == TemplateType.Feature)
                                      && t.GetLanguage() == language
                                      && !t.GetIsHidden());

Yes, this kind of "tidying up" also made things harder for me in terms of merging but is hopefully beneficial in the long run.

@crutkas
Copy link
Member Author

crutkas commented Jul 21, 2017

i'll create a dedicated branch for just this one adjustment for CR.

@crutkas
Copy link
Member Author

crutkas commented Jul 21, 2017

turns out, this is part of dead end code. referenced by GetPageAndFeatureTemplates and that has zero references

@mrlacey
Copy link
Collaborator

mrlacey commented Jul 21, 2017

No! This is used code.
It is called by GetPageAndFeatureTemplates in ProjectGenerationTest which is called indirectly by the test framework. Notice the string name in the attribute here.

 [Theory, MemberData("GetPageAndFeatureTemplates"), Trait("Type", "OneByOneItemGeneration")]
public async void GenerateProjectWithIsolatedItems(.....

@crutkas crutkas mentioned this issue Jul 21, 2017
@crutkas crutkas added the Can Close Out Soon Work relating to this issue has been completed. label Jul 21, 2017
@crutkas
Copy link
Member Author

crutkas commented Jul 22, 2017

Ah. Vs references didn't see that. Was looking at their reference count.

crutkas added a commit that referenced this issue Jul 24, 2017
@crutkas crutkas closed this as completed Jul 26, 2017
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue relates to the wizard not working or a problem with the generated code. Can Close Out Soon Work relating to this issue has been completed.
Projects
None yet
Development

No branches or pull requests

3 participants