예제 #1
0
        /// <summary> Creates a string representation of the data displayed in this column. </summary>
        /// <param name="obj"> The <see cref="IBusinessObject"/> to be displayed in this column. </param>
        /// <returns> A <see cref="string"/> representing the contents of <paramref name="obj"/>. </returns>
        public override string GetStringValue(IBusinessObject obj)
        {
            ArgumentUtility.CheckNotNull("obj", obj);

            var propertyPath = _propertyPathBinding.GetPropertyPath();

            var result = propertyPath.GetResult(
                obj,
                BusinessObjectPropertyPath.UnreachableValueBehavior.ReturnNullForUnreachableValue,
                BusinessObjectPropertyPath.ListValueBehavior.GetResultForFirstListEntry);

            return(result.GetString(_formatString));
        }
 public IBusinessObjectPropertyPath GetPropertyPath()
 {
     return(_propertyPathBinding.GetPropertyPath());
 }