예제 #1
0
 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("");
     }
 }
예제 #2
0
 static void Main(string[] args)
 {
     DBEngine.DBInit();
     Console.WriteLine("Welcome to SaveStates Server");
 }