private ReadContentAsBase64 ( int maxByteArrayContentLength, int maxInitialCount ) : byte[] | ||
maxByteArrayContentLength | int | |
maxInitialCount | int | |
리턴 | byte[] |
internal byte[] ReadContentAsBase64(int maxByteArrayContentLength, int maxInitialCount)
{
int length;
if (TryGetBase64ContentLength(out length))
{
if (length <= maxInitialCount)
{
byte[] buffer = new byte[length];
int read = 0;
while (read < length)
{
int actual = ReadContentAsBase64(buffer, read, length - read);
if (actual == 0)
XmlExceptionHelper.ThrowBase64DataExpected(this);
read += actual;
}
return buffer;
}
}
return ReadContentAsBytes(true, maxByteArrayContentLength);
}
XmlDictionaryReader::ReadContentAsBase64 ( ) : byte[] |
public BinaryBodyReader(XmlDictionaryReader reader) { reader.ReadStartElement(BinaryElementName); _data = reader.ReadContentAsBase64(); if (reader.NodeType == XmlNodeType.Text) reader.Read(); reader.ReadEndElement(); }