public void Consume(Do message) { if (string.IsNullOrEmpty(message.Id)) { var container = _root.GetContainer("test1"); container.Create(); container.GetItem("data").Write(s => { using (var writer = new StreamWriter(s, Encoding.UTF8)) { writer.Write(new string('*', 50000)); } }); _sender.SendOne(new Do { Id = "test1" }); return; } string result = null; _root.GetContainer(message.Id).GetItem("data").ReadInto((props, stream) => { using (var reader = new StreamReader(stream, Encoding.UTF8)) { result = reader.ReadToEnd(); } }); Assert.AreEqual(new string('*', 50000), result); _sender.SendOne(new Finish(), cb => cb.AddString("finish")); }
public SampleQuarantine(IStreamingRoot streamingRoot) { streamingRoot.GetContainer("sample-04-errors").Create(); }
public MailQuarantine(SmtpHandlerCore core, IStreamingRoot root) { _core = core; _container = root.GetContainer("sample-errors").Create(); }
public Quarantine(IStreamingRoot root) { _container = root.GetContainer(IdFor.ErrorBlob).Create(); }