public static void Write(GSInstance gsInstance, List <GSRequest> queue) { try { String path = GetPath(gsInstance); File.WriteAllText(path, String.Empty); QueueWriter qw = new QueueWriter(); qw.Initialize(path); foreach (var request in queue) { if (request != null) { IDictionary <String, Object> queuedItem = new Dictionary <string, object>(); String json = request.JSON; if (json != null) { Log(gsInstance, "write " + json); queuedItem.Add("rq", json); queuedItem.Add("sg", gsInstance.GSPlatform.MakeHmac(json, gsInstance.GSPlatform.ApiSecret)); qw.WriteLine(GSJson.To(queuedItem)); } } } Log(gsInstance, "Writing Data to disk. "); qw.Dispose(); } catch (Exception e) { Log(gsInstance, e.ToString()); } }