Microsoft.Protocols.TestSuites.Common.FlaggedPropertyValue.Parse C# (CSharp) Method

Parse() public method

Parse bytes in context into a FlaggedPropertyValueNode
public Parse ( Context context ) : void
context Context The value of Context
return void
        public override void Parse(Context context)
        {
            this.Flag = context.PropertyBytes[context.CurIndex++];
            switch (this.Flag)
            {
                // PropertyValue presents
                case 0:
                    break;

                // PropertyValue not presents
                case 1:
                    return;

                // Property error code
                case 0xA:

                    // If the Flag is 0x0A, the property type should be PtypErrorCode.
                    context.CurProperty.Type = PropertyType.PtypErrorCode;
                    break;

                // Not defined value
                default:
                    break;
            }
            
            base.Parse(context);
        }
    }
FlaggedPropertyValue