Add the service location behaviour to a contract (service)
Adds the context initializer as dispatch behaviour to be able to create/dispose child containers.
Inheritance: IContractBehavior
        /// <summary>
        /// Initializes a new instance of the <see cref="ServiceLocatorServiceHost"/> class.
        /// </summary>
        /// <param name="container">The container.</param>
        /// <param name="serviceConcrete">Type of the service.</param>
        /// <param name="baseAddresses">The base addresses.</param>
        public ServiceLocatorServiceHost(IParentContainer container, Type serviceConcrete, params Uri[] baseAddresses)
            : base(serviceConcrete, baseAddresses)
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }

            ApplyServiceBehaviors(container);
            ApplyContractBehaviors(container);

            foreach (var contractDescription in ImplementedContracts.Values)
            {
                var contractBehavior =
                    new ServiceLocationContractBehavior(new ServiceLocatorInstanceProvider(container,
                                                                                           contractDescription.
                                                                                               ContractType));

                contractDescription.Behaviors.Add(contractBehavior);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ServiceLocatorServiceHost"/> class.
        /// </summary>
        /// <param name="container">The container.</param>
        /// <param name="serviceConcrete">Type of the service.</param>
        /// <param name="baseAddresses">The base addresses.</param>
        public ServiceLocatorServiceHost(IParentContainer container, Type serviceConcrete, params Uri[] baseAddresses)
            : base(serviceConcrete, baseAddresses)
        {
            if (container == null)
            {
                throw new ArgumentNullException("container");
            }

            ApplyServiceBehaviors(container);
            ApplyContractBehaviors(container);

            foreach (var contractDescription in ImplementedContracts.Values)
            {
                var contractBehavior =
                    new ServiceLocationContractBehavior(new ServiceLocatorInstanceProvider(container,
                                                                                           contractDescription.
                                                                                           ContractType));

                contractDescription.Behaviors.Add(contractBehavior);
            }
        }