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 void Unpack(byte[] data)
    {
        stream = new MemoryStream(data);
        if (transport == null)
        {
            transport = new TStreamTransport(stream, null);
        }
        else
        {
            transport.InputStream = stream;
        }

        if (protocol == null)
        {
            protocol = new TCompactProtocol(transport);
        }
        else
        {
            protocol.reset();
            protocol.Transport = transport;
        }

        protocol.ReadStructBegin();
        while (true)
        {
            fieldReader = protocol.ReadFieldBegin();
            if (fieldReader.Type == TType.Stop)
            {
                break;
            }

            switch (fieldReader.ID)
            {
            case 1:
                if (fieldReader.Type == TType.Map)
                {
                    if (context == null)
                    {
                        context = new ADAGEEventInfoDictionary();
                    }
                    else
                    {
                        context.Clear();
                    }

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

            case 2:
                if (fieldReader.Type == TType.Struct)
                {
                    if (events == null)
                    {
                        events = new ADAGEEventInfoDictionary();
                    }
                    else
                    {
                        events.Clear();
                    }

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

            default:
                TProtocolUtil.Skip(protocol, fieldReader.Type);
                break;
            }

            protocol.ReadFieldEnd();
        }
        protocol.ReadStructEnd();
    }