(Aug 17, 2017 12:10 PM)gigajew Wrote: Yes it's very amazing, I am astounded with you
Please explain how this is good in any way? Or how it would be better than all of the real installer setups that are available out there? There's a reason a few of them have been around for years and have been used for years. What makes this good? Everytime I see a post by you here the percentage of quality source code snippets on this forum must decrease.
Code
private string _appName;
public string AppName {
get {
return GetAppName();
}
private set {
_appName = value;
}
}
public TinyInstall() { }
public TinyInstall(string appname) {
if(!SetAppName(appname)) {
throw new Exception("Invalid app name, or app name already taken!");
}
}
public string GetAppName() {
if(!string.IsNullOrEmpty(_appName))
{
return _appName;
}else {
return typeof(TinyInstall).FullName;
}
}
For instance, a lot of the problems implied by this absolute mess of code could be prevented if you understood constructors, and didn't provide a parameterless one that didn't set the backing field to the default value you use within the function...
Once again even your logic isn't even accurate:
Code
public bool Uninstall()
{
if (!AppNameTaken(AppName))
{
return true; // how is this indication of a true uninstall?
}
...