public string Invoke(string parameters)
{
string[] lines = parameters.Split(stringSeparators, StringSplitOptions.None);
string function = lines[0];
string result = "";
string mypath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\db\\";
switch (function)
{
case "version":
result = this.Version();
break;
case "write":
result = this.Write(mypath + lines[1], lines[2], lines[3], lines[4]);
break;
case "read":
result = this.Read(mypath + lines[1], lines[2], lines[3]);
break;
case "deletesection":
result = this.DeleteSection(mypath + lines[1], lines[2]);
break;
case "deletekey":
result = this.DeleteKey(mypath + lines[1], lines[2], lines[3]);
break;
case "delete":
result = this.Delete(mypath + lines[1]);
break;
case "exists":
result = this.Exists(mypath + lines[1]);
break;
case "gettimestamp":
result = this.GetTimeStamp();
break;
case "decodebase64":
result = this.DecodeBase64(lines[1]);
break;
case "encodebase64":
result = this.EncodeBase64(lines[1]);
break;
case "setseparator":
SetSeparator(lines[1]);
break;
case "getseparator":
result = GetSeparator();
break;
case "getsections":
result = GetSections(mypath + lines[1]);
break;
default:
break;
}
return result;
}