Beispiel #1
0
 /// <summary>
 /// Internal method not to be called by app developers.
 /// Called from custom bindings to inject binding-specific context
 /// </summary>
 public void __SetBindingSpecificContext(Msg other)
 {
     m_BindingSpecificContext = other == null ? null : other.m_BindingSpecificContext;
 }
Beispiel #2
0
        /// <summary>
        /// Clones message state from another message instance.
        /// State includes binding-specific context and optionally headers and correlation data
        /// </summary>
        public void CloneState(Msg from, bool cloneHeaders = true, bool cloneCorrelation = true)
        {
            if (cloneHeaders)
                  if (from.HasHeaders)
                    this.Headers.AddRange(from.Headers);

              if (cloneCorrelation)
                  if (from.HasCorrelationData)
                    this.m_CorrelationData = new Dictionary<string,object>( from.CorrelationData );

              __SetBindingSpecificContext(from);
        }