Streaming附加Blob

时间:2016-05-04 07:29:16

标签: c# azure azure-storage-blobs

有没有什么方法可以从azure流中添加斑点?我不是指普通的流到blob的末尾,然后什么都不做,但我的意思是流可以在向该blob附加内容之后继续读取。

这样的事情:

var blob = GetAppendBlob("SomeBlob");
var stream = blob.OpenRead();
var streamReader = new StreamReader(stream);
while (true) {
    if (!streamReader.EndOfStream) {
        // I want to continue output appended text even after I've reached EOF
        var line = streamReader.ReadLine();
        Console.WriteLine(line);
    }
    else {
        // Instead, I'm just getting here and I cannot get to previous wblock in any way.
        Thread.Sleep(50);
    }
}

1 个答案:

答案 0 :(得分:0)

好的,我发现了我需要的here