Esempio n. 1
0
        private static Baggage MergeBaggages(IList <Reference> references)
        {
            var baggage = new Baggage();

            foreach (var reference in references)
            {
                if (reference.Context.GetBaggageItems() != null)
                {
                    foreach (var bagItem in reference.Context.GetBaggageItems())
                    {
                        baggage.Set(bagItem.Key, bagItem.Value);
                    }
                }
            }

            return(baggage);
        }
Esempio n. 2
0
 /// <summary>
 ///     Combines two baggage into one.
 /// </summary>
 /// <param name="other"></param>
 public void Merge(Baggage other)
 {
     Merge(other?.GetAll());
 }