public Offset <StringDictionary> Serialize(FlatBufferBuilder flatBufferBuilder) { var list = new List <Offset <StringKeyValue> >(); foreach (var key in FullInfoList.Keys) { var val = FullInfoList[key]; var keyOffset = flatBufferBuilder.CreateString(key); var valOffset = flatBufferBuilder.CreateString(val); var keyValue = StringKeyValue.CreateStringKeyValue(flatBufferBuilder, keyOffset, valOffset); list.Add(keyValue); } var listOffset = StringDictionary.CreateKeyValueListVector(flatBufferBuilder, list.ToArray()); StringDictionary.StartStringDictionary(flatBufferBuilder); StringDictionary.AddKeyValueList(flatBufferBuilder, listOffset); var endOffset = StringDictionary.EndStringDictionary(flatBufferBuilder); return(endOffset); }