/// <summary>
        ///   Creates a new <see cref="BehaviorChainConfiguration"/> from this
        ///   template.
        /// </summary>
        // TODO: Comment.
        internal BehaviorChainConfiguration CreateConfiguration(
            IBehaviorFactoryConfiguration factoryConfiguration
            )
        {
            Check.NotNull(factoryConfiguration, nameof(factoryConfiguration));

            var config = new BehaviorChainConfiguration();
            IBehaviorFactory factory = factoryConfiguration.GetFactory(_factoryProvider);

            foreach (BehaviorChainItemTemplate itemTemplate in _itemTemplates)
            {
                BehaviorKey key = itemTemplate.Key;

                if (itemTemplate.State == DefaultBehaviorState.DisabledWithoutFactory)
                {
                    config.Append(key);
                }
                else
                {
                    IBehavior instance = factory.Create(key);
                    config.Append(key, instance);

                    if (itemTemplate.State == DefaultBehaviorState.Enabled)
                    {
                        config.Enable(key);
                    }
                }
            }

            return(config);
        }
            ISinglePropertyBehaviorBuilder <TVM, TDescriptor, TValue> ISinglePropertyBehaviorBuilder <TVM, TDescriptor, TValue> .AppendBehavior(
                IBehavior behaviorInstance,
                BehaviorKey key
                )
            {
                string keyString = String.Format(
                    "{0} (manually configured)",
                    TypeService.GetFriendlyTypeName(behaviorInstance)
                    );

                key = key ?? new BehaviorKey(keyString);

                _propertyConfiguration.Append(key, behaviorInstance);
                _propertyConfiguration.Enable(key, behaviorInstance);
                return(this);
            }