Beispiel #1
0
        public override void Put(Message message, object transaction)
        {
            if (Disposed)
            {
                return;
            }

            var channel = message.Channel;

            if (channel.IsZero)
            {
                channel = m_DefaultChannel;
            }

            var doc = m_Serializer.Serialize(message, KNOWN_TYPES);

            var map = Mapper.StoreMap(message.ArchiveDimensions);

            if (map != null)
            {
                foreach (var item in map)
                {
                    doc.Set(DataDocConverter.String_CLRtoBSON("__" + item.Key, item.Value));
                }
            }

            m_Database[channel.Value].Insert(doc);
        }