Beispiel #1
0
        /// <summary>
        /// Convert from <see cref="PropertyBag"/> to a <see cref="MapField{key,value}"/>
        /// </summary>
        /// <param name="propertyBag"><see cref="PropertyBag"/> to convert from</param>
        /// <returns>Converted <see cref="MapField{key,value}"/></returns>
        public static Events.Relativity.Protobuf.PropertyBag ToProtobuf(this Dolittle.PropertyBags.PropertyBag propertyBag)
        {
            var protobufPropertyBag = new Events.Relativity.Protobuf.PropertyBag();

            propertyBag.ForEach(kvp => protobufPropertyBag.Values.Add(kvp.Key, kvp.Value.ToProtobuf()));
            return(protobufPropertyBag);
        }