static string ProcessData(string dataToProcess) { if (dataToProcess.Equals("regreq")) { var tempToken = TokenGenerator.GenerateToken(32); DBEngine.AddData(tempToken, ""); return(tempToken); } else if (dataToProcess.Contains("datareq")) { var temp = dataToProcess.Split(':')[1]; return(DBEngine.DbLookup(temp)); } else if (dataToProcess.Contains("storereq")) { var temp = dataToProcess.Split(':'); DBEngine.AddData(temp[1], temp[2]); return(""); } else { return(""); } }
static void Main(string[] args) { DBEngine.DBInit(); Console.WriteLine("Welcome to SaveStates Server"); }