/// <summary> /// Deserializes the specified configuration in an <see cref="Bind"/> object /// </summary> /// <param name="configuration">The configuration.</param> /// <returns></returns> public override SqlTag Deserialize(IConfiguration configuration) { Bind bind = new Bind(accessorFactory); bind.Prepend = ConfigurationUtils.GetStringAttribute(configuration.Attributes, "prepend"); bind.Property = ConfigurationUtils.GetStringAttribute(configuration.Attributes, "property"); bind.Value = ConfigurationUtils.GetStringAttribute(configuration.Attributes, "value"); bind.Name = ConfigurationUtils.GetStringAttribute(configuration.Attributes, "name"); return bind; }
/// <summary> /// NOTE: Seems as though this class was written to not have knowledge of BaseTag, I just don't understand why. /// </summary> /// <param name="tag"></param> public void RememberBinding(Bind tag) { if (tag == null) return; var bindExpression = GetBindExpression(tag.Name); var exists = bindExpression != null; if (bindExpression == null) bindExpression = new BindingExpression(tag.Name); bindExpression.Value = tag.Value; bindExpression.PropertyName = tag.Property; bindExpression.FullPropertyName = ReflectionMapper.GetReflectedFullName(this, tag, tag.Property); if (!exists) _bindings.Add(bindExpression); }