public string Get(IActivityIOOperationsEndPoint path, bool deferredRead = false)
{
try
{
byte[] bytes;
using(var s = path.Get(path.IOPath, _filesToDelete))
{
bytes = new byte[s.Length];
s.Position = 0;
s.Read(bytes, 0, (int)s.Length);
}
// TODO : Remove the need for this ;(
return Encoding.UTF8.GetString(bytes);
}
finally
{
_filesToDelete.ForEach(RemoveTmpFile);
}
}