Closed floatas closed 5 years ago
For complex default values you can always just make the getter of your property do the work like this. No need to add more complexity to PowerArgs.
private string _tempPath;
public string TempPath
{
get
{
return _tempPath || System.IO.Path.GetTempPath();
}
set
{
_tempPath = value;
}
}
Hi, I'm just starting to use this library and wanted to discuss one issue before making any real changes and pull requests. I wanted to set temp directory path as default value. I come up with solution, but it's not prettiest solution and can be improved by making few small changes to PowerArgs. Maybe there is different way to achieve same result ?
Complex default value now:
Two small changes are required (see comments in code):
Complex default value after changes:
Let me know what you think, I can make pull request for this + tests if needed.