static void CloneProperties(MessageProperties destination, MessageProperties source)
            {
                MessageEncoder encoder = destination.Encoder;

                destination.CopyProperties(source);
                destination.Encoder = encoder;
                FilterProperties(destination);
            }
示例#2
0
		public void CopyProperties ()
		{
			var mp = new MessageProperties ();
			var obj = new object ();
			var obj2 = new object ();
			mp.Add ("FooProperty", obj);
			var mp2 = new MessageProperties ();
			mp2.Add ("BarProperty", obj2);
			mp.CopyProperties (mp2);
			Assert.AreEqual (obj, mp ["FooProperty"], "#1");
			Assert.AreEqual (obj2, mp ["BarProperty"], "#2");
		}
示例#3
0
        public void CopyProperties()
        {
            var mp   = new MessageProperties();
            var obj  = new object();
            var obj2 = new object();

            mp.Add("FooProperty", obj);
            var mp2 = new MessageProperties();

            mp2.Add("BarProperty", obj2);
            mp.CopyProperties(mp2);
            Assert.AreEqual(obj, mp ["FooProperty"], "#1");
            Assert.AreEqual(obj2, mp ["BarProperty"], "#2");
        }
 static void CloneProperties(MessageProperties destination, MessageProperties source)
 {
     MessageEncoder encoder = destination.Encoder;
     destination.CopyProperties(source);
     destination.Encoder = encoder;
     FilterProperties(destination);
 }