// Token: 0x06000EC8 RID: 3784 RVA: 0x0005E184 File Offset: 0x0005C384
        private object ParseStruct(OwaEventStructAttribute structInfo)
        {
            uint   num = 0U;
            object obj = Activator.CreateInstance(structInfo.StructType);

            if (this.reader.MoveToFirstAttribute())
            {
                int num2 = 0;
                do
                {
                    if (num2 >= 32)
                    {
                        this.ThrowParserException("Reached maximum number of fields per struct");
                    }
                    num2++;
                    OwaEventFieldAttribute owaEventFieldAttribute = structInfo.FindFieldInfo(this.reader.Name);
                    if (owaEventFieldAttribute == null)
                    {
                        this.ThrowParserException(string.Format(CultureInfo.InvariantCulture, "Field '{0}' doesn't exist", new object[]
                        {
                            this.reader.Name
                        }));
                    }
                    FieldInfo fieldInfo = owaEventFieldAttribute.FieldInfo;
                    Type      fieldType = owaEventFieldAttribute.FieldType;
                    object    value;
                    if (fieldType != typeof(string))
                    {
                        value = base.ConvertToStrongType(owaEventFieldAttribute.FieldType, this.reader.Value);
                    }
                    else
                    {
                        value = this.reader.Value;
                    }
                    fieldInfo.SetValue(obj, value);
                    if ((num & owaEventFieldAttribute.FieldMask) != 0U)
                    {
                        this.ThrowParserException(string.Format(CultureInfo.InvariantCulture, "Field '{0}' is found twice", new object[]
                        {
                            this.reader.Name
                        }));
                    }
                    num |= owaEventFieldAttribute.FieldMask;
                }while (this.reader.MoveToNextAttribute());
            }
            if ((structInfo.RequiredMask & num) != structInfo.RequiredMask)
            {
                this.ThrowParserException("A required field in the struct wasn't present");
            }
            if (num != structInfo.AllFieldsMask)
            {
                uint num3 = ~num & structInfo.AllFieldsMask;
                for (int i = 0; i < structInfo.FieldCount; i++)
                {
                    if ((num3 & 1U) != 0U)
                    {
                        OwaEventFieldAttribute owaEventFieldAttribute2 = structInfo.FieldInfoIndexTable[i];
                        owaEventFieldAttribute2.FieldInfo.SetValue(obj, owaEventFieldAttribute2.DefaultValue);
                    }
                    num3 >>= 1;
                }
            }
            return(obj);
        }