Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Conversation

@NTaylorMullen
Copy link

I split up the test portion of this PR to reduce noise. PR: #135

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this class in flux because I'm aware I suck at naming 😄 . Therefore it's partially completed so i can address code review comments quicker. Feel free to comment on the / suggest better names

@NTaylorMullen NTaylorMullen changed the title Create TagHelper specific C# code Generation. [Design] Create TagHelper specific C# code Generation. Sep 14, 2014
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make an interface for this if we want and have this be the default implementation. As @pranavkm and I discussed though it would probably be overkill.

@NTaylorMullen NTaylorMullen force-pushed the TagHelpers_CodeGeneration branch from df4136f to 7f3e80a Compare September 19, 2014 06:52
@NTaylorMullen NTaylorMullen changed the title [Design] Create TagHelper specific C# code Generation. Create TagHelper specific C# code Generation. Sep 20, 2014
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excuse that rest of class is undocumented doesn't work for me here. when would instanceName be anything except this? why bother qualifying the method name with this.? if this method handles calls to methods on some other instance (not the current object), make that clear in the name and with comments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's never called for this., just for other instances, what would be a better name? Will add comment.

@NTaylorMullen
Copy link
Author

Addressed comments in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest shortening to GeneratedTagHelperContext

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any chance of null anywhere in this dereference chain? guard if so

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, when code is generated everything is initialized and the chunks automatically have a root object. 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do [NotNull] instead

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will put [NotNull] just on this overload. Since all other overloads call into it 1 [NotNull] functionally works. As for an engineering guidelines standpoint I brought it up with @davidfowl because we should probably be consistent.

@NTaylorMullen
Copy link
Author

Addressed code review comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need contentBehavior here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not anymore, good catch

@NTaylorMullen
Copy link
Author

Addressed code review comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why isn't this restoration inside the finally block?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because if something goes wrong recovering doesn't matter. As @pranavkm mentioned the Host is the only sensitive piece of information here that absolutely requires it to be set back. Will put it in the finally block anyways, doesn't hurt.

@dougbu
Copy link
Contributor

dougbu commented Oct 2, 2014

:shipit: after fixing last couple of XML and code comments

@NTaylorMullen NTaylorMullen merged commit 0dac4a0 into TagHelpersFeature Oct 3, 2014
@NTaylorMullen NTaylorMullen force-pushed the TagHelpers_CodeGeneration branch from e67684e to 0dac4a0 Compare October 3, 2014 08:04
@NTaylorMullen NTaylorMullen deleted the TagHelpers_CodeGeneration branch October 3, 2014 08:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants