Zway-Bot [v1.7.2] Add Logging to some Modules, fixing a bug in overtaker (now it not removes every time all events, so only the latest event are watched)
[Utils] Fixing a bug if more than one argument with params
This commit is contained in:
parent
f2706b2b29
commit
47fb4f8c27
@ -38,7 +38,7 @@ namespace BlubbFish.Utils
|
|||||||
public ArgTouple(String type)
|
public ArgTouple(String type)
|
||||||
{
|
{
|
||||||
this.Type = type;
|
this.Type = type;
|
||||||
this.Data = "";
|
this.Data = null;
|
||||||
}
|
}
|
||||||
public String Type { get; private set; }
|
public String Type { get; private set; }
|
||||||
public String Data { get; private set; }
|
public String Data { get; private set; }
|
||||||
@ -100,7 +100,8 @@ namespace BlubbFish.Utils
|
|||||||
if (this.args.Length > i + 1) {
|
if (this.args.Length > i + 1) {
|
||||||
arg.SetData(this.args[++i]);
|
arg.SetData(this.args[++i]);
|
||||||
} else {
|
} else {
|
||||||
throw new ArgumentException();
|
Console.WriteLine(this.GetUsageList(""));
|
||||||
|
throw new ArgumentException("Argument: "+this.args[i]+" missing second argument.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.argList.Add(arg);
|
this.argList.Add(arg);
|
||||||
@ -142,11 +143,9 @@ namespace BlubbFish.Utils
|
|||||||
foreach (ArgTouple t in this.argList) {
|
foreach (ArgTouple t in this.argList) {
|
||||||
if (t.Type == name && t.Data != null) {
|
if (t.Type == name && t.Data != null) {
|
||||||
return t.Data;
|
return t.Data;
|
||||||
} else {
|
|
||||||
throw new ArgumentNullException();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
throw new ArgumentNullException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean HasAllRequiredArguments()
|
public Boolean HasAllRequiredArguments()
|
||||||
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Utils")]
|
[assembly: AssemblyProduct("Utils")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2014 - 15.05.2018")]
|
[assembly: AssemblyCopyright("Copyright © 2014 - 02.10.2018")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.1.2")]
|
[assembly: AssemblyVersion("1.1.3")]
|
||||||
[assembly: AssemblyFileVersion("1.1.2")]
|
[assembly: AssemblyFileVersion("1.1.3")]
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user