private void ExtensionRange(uint totalLength, MessageDescriptor.ExtensionRange er)
{
intend++;
while (totalLength != 0)
{
int type, no;
var l = GetTypeAndFieldNo(out type, out no);
ix += l;
totalLength -= (uint)l;
switch (no)
{
case 1: // int32 start
{
uint value;
var ixl = GetVarint(out value);
ix += ixl;
totalLength -= (uint)ixl;
er.Start = (int)value;
Write(string.Format("Type = {0}, F#= {1}, Length = {2}, start = {3}", type, no, ixl, value));
break;
}
case 2: // int32 end
{
uint value;
var ixl = GetVarint(out value);
ix += ixl;
totalLength -= (uint)ixl;
er.End = (int)value;
Write(string.Format("Type = {0}, F#= {1}, Length = {2}, end = {3}", type, no, ixl, value));
break;
}
}
}
intend--;
}