Exemplo n.º 1
0
        protected override void BuildMessage(IEventArgs args)
        {
            builder.Key = args.GetInt(key);
            if (fields != null)
            {
                for (int i = 0; i < fields.Count; i++)
                {
                    switch (fields[i].type)
                    {
                    case KeyField:
                        builder.Ks.Add(args.GetInt(fields[i].value));
                        break;

                    case IntField:
                        builder.Ins.Add(args.GetInt(fields[i].value));
                        break;

                    case BoolField:
                        builder.Bs.Add(args.GetBool(fields[i].value));
                        break;

                    case StringField:
                        builder.Ss.Add(args.GetString(fields[i].value));
                        break;

                    case FloatField:
                        builder.Fs.Add(args.GetFloat(fields[i].value));
                        break;

                    case DoubleField:
                        builder.Ds.Add(args.getDouble(fields[i].value));
                        break;

                    case LongField:
                        builder.Ls.Add(args.GetLong(fields[i].value));
                        break;
                    }
                }
            }
        }