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);
    }