/// <summary>
        /// Initializes the binding with the configuration properties
        /// </summary>
        /// <param name="binding">The binding instance</param>
        protected override void InitializeFrom(Binding binding)
        {
            base.InitializeFrom(binding);
            MockAdapterBinding adapterBinding = (MockAdapterBinding)binding;

            this["Encoding"]           = adapterBinding.Encoding;
            this["PromotedProperties"] = adapterBinding.PromotedProperties;
        }
        /// <summary>
        /// Applies the configuration
        /// </summary>
        /// <param name="binding">The binding instance</param>
        protected override void OnApplyConfiguration(Binding binding)
        {
            if (binding == null)
            {
                throw new ArgumentNullException("binding");
            }

            MockAdapterBinding adapterBinding = (MockAdapterBinding)binding;

            adapterBinding.Encoding           = (string)this["Encoding"];
            adapterBinding.PromotedProperties = (string)this["PromotedProperties"];
        }