using System;
using System.Configuration;
using System.ServiceModel.Configuration;

namespace SignalRWorkflowTracking
{
    public class SignalRTrackingExtension : BehaviorExtensionElement
    {
        const string ProfilePropertyName = "profileName";
        private const string BusURLName = "busURL";
        [ConfigurationProperty(ProfilePropertyName)]
        public string ProfileName
        {
            get
            {
                return (string)base[ProfilePropertyName];
            }
            set
            {
                base[ProfilePropertyName] = value;
            }
        }

        [ConfigurationProperty(BusURLName)]
        public string BusName
        {
            get
            {
                return (string)base[BusURLName];
            }
            set
            {
                base[BusURLName] = value;
            }
        }
        protected override object CreateBehavior()
        {
            return new SignalRTrackingBehavior(ProfileName, BusName);
        }

        public override Type BehaviorType
        {
            get { return typeof(SignalRTrackingBehavior); }
        }


    }
}