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

Added cli #19

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

Added cli #19

wants to merge 2 commits into from

Conversation

NicoJuicy
Copy link

@NicoJuicy NicoJuicy commented May 12, 2017

I split some functions classes to support the use in a CLI

Main differences:

  • Split the generator function in a seperate dll ( core)

  • Changed the integer values of the programming languages to a Enum

  • Nest function changed somewhat, you could easily support a namespace now, if you change the view. The code from the web stays the same. In the background it checks the following

    bool nest = ! String.IsNullOrEmpty(model.NameSpace);
    

Here's an example of the CLI

 JsonUtils.CLI.exe -i "C:\Users\Nico\Downloads\JsonUtils\JsonUtils.AutoGen\bin\Debug\Example\JsonInput.json" -o "C:\Users\Nico\Downloads\JsonUtils\JsonUtils.AutoGen\bin\Debug\Example\JsonInput.cs" -n "theNamespace" -g "CSharp" -r "RootObject" 

There is an unfinished test class for now, i will finish it later. But don't have the time right now. (it's unloaded fyi)

Merge if you are interested, the use case i'm going to use it for: Building a project with VS and converting some code automaticly, after i converted the CSharp class to json ;)

PS. I should mention i changed the samespace of JsonUtils to JsonUtils.Web, so if you are updating the web application. Make sure you delete JsonUtils.dll in the bin folder. Otherwhise the project could detect HomeController twice and give an error

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.

1 participant