Skip to content
This repository has been archived by the owner on May 21, 2018. It is now read-only.

new feature: generate comments from C# source to the TS definitions #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AkosLukacs
Copy link
Contributor

Check T4TS.Example/Models/Barfoo.cs and T4TS.Example/T4TS.d.ts for an example

This commit does have some repetitive code, but couldn't pinpoint a "utility" class for the string trimming/modifying code. Of course having a utility class is bad by default...

@cskeppstedt
Copy link
Owner

Hey @AkosLukacs, nice idea! I've been away for a while, so I haven't been able to keep up to speed with this project, but I'm back now.

I suggest that you pull from the current master and resolve merge-the conflicts.

As for the code, I think you should create a new class called Comment that takes the comment/doccomment string as constructor argument. Encapsulate the comment formatting there. The class can either override .ToString(), or have an explicit method, something like .GetFormattedComment(). Use that Comment class instead of strings for the Comment/DocComment properties of TypeScriptInterface and TypeScriptInterfaceMember. I think that should be pretty clean.

Cheers!

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.

2 participants