public static LinkedList <GSRequest> Read(GSInstance gsInstance) { Log(gsInstance, "Reading Persistent Queue"); LinkedList <GSRequest> persistantQueue = new LinkedList <GSRequest> (); String path = GetPath(gsInstance); QueueReader qr = new QueueReader(); qr.Initialize(path); string content = qr.ReadFully(); qr.Dispose(); if (content != null) { using (StringReader reader = new StringReader(content)) { string line = null; do { line = reader.ReadLine(); if (line != null && line.Trim().Length > 0) { GSRequest request = StringToRequest(gsInstance, line); if (request != null) { Log(gsInstance, "read " + request.JSON); persistantQueue.AddLast(request); } } }while (line != null); } } return(persistantQueue); }