private void EnumOptions(uint totalLength, EnumOptions options)
{
intend++;
while (totalLength != 0)
{
int type, no;
var l = GetTypeAndFieldNo(out type, out no);
ix += l;
totalLength -= (uint)l;
switch (no)
{
case 2: // bool allow_alias
{
uint value;
var ixl = GetVarint(out value);
ix += ixl;
totalLength -= (uint)ixl;
options.AllowAlias = value != 0;
Write(string.Format("Type = {0}, F#= {1}, Length = {2}, allow_alias = {3}", type, no, ixl, value));
break;
}
case 3: // bool deprecated
{
uint value;
var ixl = GetVarint(out value);
ix += ixl;
totalLength -= (uint)ixl;
options.Deprecated = value != 0;
Write(string.Format("Type = {0}, F#= {1}, Length = {2}, Deprecated = {3}", type, no, ixl, value));
break;
}
}
}
intend--;
}