public bool TryDestructure(object value, ITemplatePropertyValueFactory propertyValueFactory, out TemplatePropertyValue result)
        {
            var del = value as Delegate;
            if (del != null)
            {
                result = new ScalarValue(del.ToString());
                return true;
            }

            result = null;
            return false;
        }
        /// <summary>
        /// Construct a <see cref="TemplatePropertyValue"/> with the specified name and value.
        /// </summary>
        /// <param name="name">The name of the property.</param>
        /// <param name="value">The value of the property.</param>
        /// <exception cref="ArgumentException"></exception>
        /// <exception cref="ArgumentNullException"></exception>
        public TemplateProperty(string name, TemplatePropertyValue value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }
            if (!IsValidName(name))
            {
                throw new ArgumentException("Property name is not valid.");
            }

            Name  = name;
            Value = value;
        }