Пример #1
0
 public static void ParseByElementType(byte[] buffer, ref int pos, IPropertyProcess process)
 {
     var property = (UInt32)ParseSerialize.ParseInt32(buffer, pos);
     ElementTypeProcessBase elementTypeProcess = null;
     if (MetaProperty.JudgePropIsMetaProp(property))
     {
         elementTypeProcess = new MetaPropertyProcess(process);
     }
     else if (Marker.JudgeIsMarker(property))
     {
         elementTypeProcess = new MarkerProcess(process);
     }
     else
     {
         elementTypeProcess = new PropValueProcess(process);
     }
     elementTypeProcess.Parse(buffer, ref pos);
 }
Пример #2
0
        public static void ParseByElementType(byte[] buffer, ref int pos, IPropertyProcess process)
        {
            var property = (UInt32)ParseSerialize.ParseInt32(buffer, pos);
            ElementTypeProcessBase elementTypeProcess = null;

            if (MetaProperty.JudgePropIsMetaProp(property))
            {
                elementTypeProcess = new MetaPropertyProcess(process);
            }
            else if (Marker.JudgeIsMarker(property))
            {
                elementTypeProcess = new MarkerProcess(process);
            }
            else
            {
                elementTypeProcess = new PropValueProcess(process);
            }
            elementTypeProcess.Parse(buffer, ref pos);
        }