-
Notifications
You must be signed in to change notification settings - Fork 163
Conversation
Excellent, thanks 😃 About the arguments, I think that we should be coherent with the existing commands: add a new parameter You are right about the location of the class, it should be in the Logic project. Could you move it to the Logic project and all necessary interface, in order to not have to just reference a class in Logic but have the command directly? About the name, I think that |
I have added the I have changed the name to |
Thanks for the modification, but I still have some remarks/questions:
|
|
For the ICommand part, it's just the will to have all the logic part in Pretzel.Logic, and allow the plugins creator to add new command. But you are right, I'll do that another time. About the |
|
||
parameters.Parse(arguments); | ||
|
||
var title = parameters.NewPostTitle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title
is not used, could you delete it?
I was about to merge the PR but there is still a modification to do. |
What did I forget to change/remove ? |
I added a comment about the |
I changed it in 6718e58, should have added a comment, sorry 😳 |
This is an first draft of the command. This is not yet finished and I have some questions regarding the implementation.
First, in the current state of the commands in Pretzel, if I use the
pretzel.exe newpost "A new post in Pretzel"
syntax for the command, it prevent me from using theparameters.Path
variable because it will contains the title (because of the SetPath method). This means that the-s
option will not be usable too. I could create a new option instead, but in my opinion, in this case, the default argument will be the title and not the path. So I'm not sure what is the best way to do it.Second, I added all the command logic the the SpiceCommand.cs file but it is not ideal for testing. So I was wondering if I should put the work in a file in the Pretzel.Logic project (in which folder?) and call this class from the command.
Finally, I tried to find a name that continue the cooking theme but I'm not sure that I came up with the best name :)