コード例 #1
0
		private bool TryHandleToAttribute(XElement element, BindingBuilder<object> builder)
		{
			XAttribute toAttribute = element.Attribute("to");

			if (toAttribute == null)
				return false;

            if (toAttribute.Value.ToLowerInvariant().Equals("self"))
            {
                builder.ToSelf();
            }
            else
            {
                Type implementation = GetTypeFromAttributeValue(toAttribute);
                builder.To(implementation);
            }

			return true;
		}