public void Read(TField reader, TCompactProtocol protocol)
    {
        protocol.ReadStructBegin();
        while (true)
        {
            reader = protocol.ReadFieldBegin();
            if (reader.Type == TType.Stop)
            {
                break;
            }

            switch (reader.ID)
            {
            case 1:
                if (reader.Type == TType.Map)
                {
                    if (properties == null)
                    {
                        properties = new ADAGEDataPropertyInfoDictionary();
                    }
                    else
                    {
                        properties.Clear();
                    }

                    TMap _map17 = protocol.ReadMapBegin();
                    for (int _i18 = 0; _i18 < _map17.Count; ++_i18)
                    {
                        tempKey   = protocol.ReadString();
                        tempValue = new ADAGEDataPropertyInfo();
                        tempValue.Read(reader, protocol);
                        properties[tempKey] = tempValue;
                    }
                    protocol.ReadMapEnd();
                }
                else
                {
                    TProtocolUtil.Skip(protocol, reader.Type);
                }
                break;

            default:
                TProtocolUtil.Skip(protocol, reader.Type);
                break;
            }
            protocol.ReadFieldEnd();
        }
        protocol.ReadStructEnd();
    }
 public ADAGEArrayInfo(Type elementType)
 {
     Type        = elementType;
     elementInfo = ADAGEDataPropertyInfo.Build(elementType);
 }
    private ADAGEEventInfo GetEventInfo(Type type)
    {
        ADAGEEventInfo newEvent = new ADAGEEventInfo();

        bool inherit = false;

        //Get properties for current type
        PropertyInfo[] propsInfo;
        if (inherit)
        {
            propsInfo = type.GetProperties();
        }
        else
        {
            propsInfo = type.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
        }

        foreach (PropertyInfo p_info in propsInfo)
        {
            bool            skip  = false;
            System.Object[] attrs = p_info.GetCustomAttributes(false);
            if (attrs.Length > 0)
            {
                for (int j = 0; (j < attrs.Length && !skip); j++)
                {
                    skip = (attrs[j].GetType() == typeof(LitJson.SkipSerialization));
                }
            }

            if (p_info.Name == "Item")
            {
                continue;
            }

            ADAGEDataPropertyInfo propertyInfo = ADAGEDataPropertyInfo.Build(p_info.PropertyType);

            if (propertyInfo == null)
            {
                continue;
            }

            newEvent.properties.Add(p_info.Name, propertyInfo);
        }

        //Get fields for current type
        FieldInfo[] fieldsInfo;
        if (inherit)
        {
            fieldsInfo = type.GetFields();
        }
        else
        {
            fieldsInfo = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
        }

        foreach (FieldInfo f_info in fieldsInfo)
        {
            bool            skip  = false;
            System.Object[] attrs = f_info.GetCustomAttributes(false);
            if (attrs.Length > 0)
            {
                for (int j = 0; (j < attrs.Length && !skip); j++)
                {
                    skip = (attrs[j].GetType() == typeof(LitJson.SkipSerialization));
                }
            }

            if (skip)
            {
                continue;
            }

            if (!f_info.Name.Contains("<"))
            {
                ADAGEDataPropertyInfo propertyInfo = ADAGEDataPropertyInfo.Build(f_info.FieldType);

                if (propertyInfo == null)
                {
                    continue;
                }

                newEvent.properties.Add(f_info.Name, propertyInfo);
            }
        }

        return(newEvent);
    }