Skip to content

Create view with writer output - #8

Merged
oformaniuk merged 3 commits into
oformaniuk:masterfrom
fhogberg:create-view-with-writer-output
May 30, 2020
Merged

oformaniuk merged 3 commits into
oformaniuk:masterfrom
fhogberg:create-view-with-writer-output

Conversation

@fhogberg

Copy link
Copy Markdown

Unused to contributing on github.
Help me do it correct and i can perhaps supply more PRs.
Unsure how you want to test this. Since basically the same code is executed it seams unnessecary to duplicate test for writer and string mode.
Also i dont know about the name CreateWriterView. Since the parameterlist is the same overloads won't work.

@oformaniuk oformaniuk linked an issue May 17, 2020 that may be closed by this pull request

@oformaniuk oformaniuk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

From #6 conversation:

Perhaps the PR looks strange but what i needed was a Compile that returned a Action<TextWriter,object> and worked with templates. To read templates from a reader was never a concern.

Action<TextWriter, object> CompileWriterView(string templatePath) breaks the interface consistency so it's probably not the best option. I'd still like to have Action<TextWriter, object> CompileView(...) overload.

In addition you need to update Handlebars.cs with the new method.

@oformaniuk
oformaniuk force-pushed the create-view-with-writer-output branch from 8de8fea to b5ef30d Compare May 30, 2020 21:45
@oformaniuk
oformaniuk self-requested a review May 30, 2020 21:46
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

82.5% 82.5% Coverage
0.0% 0.0% Duplication

@oformaniuk
oformaniuk merged commit a40e0ff into oformaniuk:master May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layout when using TextWriter overloads

2 participants