417 |
throw new ArgumentOutOfRangeException |
throw new ArgumentOutOfRangeException |
418 |
("count", _("ArgRange_NonNegative")); |
("count", _("ArgRange_NonNegative")); |
419 |
} |
} |
420 |
|
|
421 |
buffer = new byte [count]; |
buffer = new byte [count]; |
422 |
result = Read(buffer, 0, count); |
|
423 |
if(result == 0) |
do |
424 |
{ |
{ |
425 |
throw new EndOfStreamException(_("IO_ReadEndOfStream")); |
int num2 = Read(buffer, result, count); |
426 |
|
if(num2 == 0) |
427 |
|
{ |
428 |
|
throw new EndOfStreamException(_("IO_ReadEndOfStream")); |
429 |
|
break; |
430 |
|
} |
431 |
|
result += num2; |
432 |
|
count -= num2; |
433 |
} |
} |
434 |
if(result != count) |
while(count > 0); |
435 |
|
|
436 |
|
if(result != buffer.Length) |
437 |
{ |
{ |
438 |
byte[] newBuffer = new byte [result]; |
byte[] newBuffer = new byte [result]; |
439 |
Array.Copy(buffer, newBuffer, result); |
Array.Copy(buffer, newBuffer, result); |