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

ConsoleUtility Refactor #53

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

ConsoleUtility Refactor #53

wants to merge 10 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 22, 2019

  • Simplified several methods
  • Added a check to prevent a user from entering an empty string into the AskForString method
  • Updated documentation throughout to be more concise and detailed
  • Renamed the the logging methods to be more explicit
  • In the AskYesAndNoQuestion method the user can now also enter yes and no explicitly

@ghost ghost requested a review from CreepPork February 22, 2019 15:20
@ghost ghost added the enhancement label Feb 22, 2019
Copy link
Member

@CreepPork CreepPork left a comment

Choose a reason for hiding this comment

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

AskToEnterString should have an option to enter an empty string. For example, game arguments can be empty and for the future the private key path can be empty so it doesn’t build with a key.

@ghost
Copy link
Author

ghost commented Feb 22, 2019

Yeah I don't know why I thought that.

Copy link
Member

@CreepPork CreepPork left a comment

Choose a reason for hiding this comment

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

Perhaps message print methods should be shortened to PrintInfo, PrintError or to stay in C# conventions (like the Console class): WriteInfo, WriteError, etc.

@ghost
Copy link
Author

ghost commented Feb 22, 2019

I did ShowErrorMessage as it was more explicit in that it would be print to the console and would receive a user defined string to output.

Write to me sounds like something that you would use if you were writing more to a stream that was not being used for simple console output. (Like a log file on the filesystem)

@ghost
Copy link
Author

ghost commented Feb 22, 2019

AskToEnterString should have an option to enter an empty string. For example, game arguments can be empty and for the future the private key path can be empty so it doesn’t build with a key.

Resolved

@ghost ghost requested a review from CreepPork February 22, 2019 15:43
@CreepPork
Copy link
Member

CreepPork commented Feb 22, 2019

ShowErrorMessage to me seems more like a dialog box that shows up not a console output. I think that it's quite unnecessary to include the message part in the method name as it would be quite obvious.

I'd prefer PrintInfo and so on.

@ghost
Copy link
Author

ghost commented Feb 22, 2019

ShowErrorMessage to me seems more like a dialog box that shows up not a console output. I think that it's quite unnecessary to include the message part in the method name as it would be quite obvious.

I'd prefer PrintInfo and so on.

Resolved, personally I think its better to be explicit even if it is obvious as someone might not get it but its your codebase so i'll abide by your conventions. (I did PrintErrorMessage not show as that does sound like a dialog prompt)

@CreepPork CreepPork assigned ghost Feb 26, 2019
@CreepPork CreepPork self-requested a review March 2, 2019 08:28
Copy link
Member

@CreepPork CreepPork left a comment

Choose a reason for hiding this comment

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

Looks fine but needs testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant