void DemoR2() { "\n Demonstrating Requirement #2".Wrap(); " Persisting previously created databases from XML files".Wrap(); " Displaying contents of XML file of persisted database of type Int-String".Wrap(); DisplayXMLfile(); " Displaying current state of the database".Wrap(); IntKeyDB = XMLtoIntDB(); Console.WriteLine(IntKeyDB.DisplayKVP <int, Element <int, string>, string>()); }
public void DisplayDBafterProcessing() { "\n\n Database is persisted at the end of every read client automatically.".Wrap(); "\n Although order and number of queries to persist database can be changed by editing XML file of MessageStream in the respective client folders".Wrap(); "\n Once all processing is done, XML of persisted database is created in the parent folder of project titled as PersistedDB.xml".Wrap(); "\n In order to demonstrate the requirement to persist and reload database from XML, this project persists the latest state of database and reloads it".Wrap(); "\n Press any key to retrieve the last state of processed database".Wrap(); Console.ReadKey(); DatabaseDictionary <int, Element <int, string> > AfterProcessing = new DatabaseDictionary <int, Element <int, string> >(); AfterProcessing = XMLtoDBAfterProcessing(); Console.WriteLine(AfterProcessing.DisplayKVP <int, Element <int, string>, string>()); }
//Shows current state of databases public void DisplayDBs() { "\n Displaying current state of database".Wrap(); Console.WriteLine(IntKeyDB.DisplayKVP <int, Element <int, string>, string>()); Console.WriteLine(StringKeyDB.DisplayKVP <string, Element <string, List <string> >, List <string>, string>()); }