Revision d9b1cbeb trunk/Pithos.Network/CloudFilesClient.cs
b/trunk/Pithos.Network/CloudFilesClient.cs | ||
---|---|---|
1042 | 1042 |
using(var reader=new StreamReader(stream)) |
1043 | 1043 |
{ |
1044 | 1044 |
Debug.Assert(stream.Position == 0); |
1045 |
//We need to cleanup the content before returning it because it contains
|
|
1045 |
//We used to have to cleanup the content before returning it because it contains
|
|
1046 | 1046 |
//error content after the list of hashes |
1047 |
var hashes = new List<string>(); |
|
1048 |
string line=null; |
|
1049 |
//All lines up to the first empty line are hashes |
|
1050 |
while(!String.IsNullOrWhiteSpace(line=reader.ReadLine())) |
|
1051 |
{ |
|
1052 |
hashes.Add(line); |
|
1053 |
} |
|
1047 |
// |
|
1048 |
//As of 30/1/2012, the result is a proper Json array so we don't need to read the content |
|
1049 |
//line by line |
|
1050 |
|
|
1051 |
var serializer = new JsonSerializer(); |
|
1052 |
var hashes=(List<string>)serializer.Deserialize(reader, typeof (List<string>)); |
|
1054 | 1053 |
|
1055 | 1054 |
return hashes; |
1056 | 1055 |
} |
Also available in: Unified diff