Example #1
0
        public static bool OplogAddKVStat(int key, string value)
        {
            KVStatOpLog.Builder builder  = KVStatOpLog.CreateBuilder();
            KVStatItem.Builder  builder2 = KVStatItem.CreateBuilder();
            builder2.Key   = (uint)key;
            builder2.Value = value;
            builder.AddList(builder2.Build());
            builder.Count = (uint)builder.ListCount;

            Log.e("OpLogMgr", "************ OplogAddKVStat ************");
            return(add(new OpLog(0x24, builder.Build().ToByteArray())));
        }
Example #2
0
        public static bool OplogAddKVStat(List <KVStat> items)
        {
            if ((items == null) || (items.Count <= 0))
            {
                return(false);
            }
            KVStatOpLog.Builder builder = KVStatOpLog.CreateBuilder();
            for (int i = 0; i < items.Count; i++)
            {
                KVStatItem.Builder builder2 = KVStatItem.CreateBuilder();
                builder2.Key   = (uint)items[i].key;
                builder2.Value = items[i].value;
                builder.AddList(builder2.Build());
            }
            builder.Count = (uint)builder.ListCount;

            Log.e("OpLogMgr", "************ OplogAddKVStat items************");
            return(add(new OpLog(0x24, builder.Build().ToByteArray())));
        }