Beispiel #1
0
        /// <summary>
        /// Convert restriction parameter to RestrictionDataWrapper item.
        /// </summary>
        /// <param name="value">Restriction parameter.</param>
        /// <param name="targetType">Ignored.</param>
        /// <param name="parameter">Ignored.</param>
        /// <param name="culture">Ignored.</param>
        /// <returns>RestrictionDataWrapper.</returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var usageParameter = value as Parameter;

            // Get wrapper for parameter which is selected in combobox.
            return(RestrictionUsageParameterValueWrapper.GetSelectedItemWrapper(usageParameter));
        }
        /// <summary>
        /// Convert restriction parameter to corresponding string.
        /// </summary>
        /// <param name="value">Ignored.</param>
        /// <param name="targetType">Ignored.</param>
        /// <param name="parameter">Ignored.</param>
        /// <param name="culture">Ignored.</param>
        /// <returns>RestrictionDataWrapper.</returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var usageParameter = value as Parameter;

            // Get wrapper which is corresponding to current parameter.
            return(RestrictionUsageParameterValueWrapper.GetValueWrapper(usageParameter));
        }
Beispiel #3
0
        /// <summary>
        /// Get source collection.
        /// </summary>
        /// <param name="value">Restriction parameter.</param>
        /// <param name="targetType">Ignored.</param>
        /// <param name="parameter">Ignored.</param>
        /// <param name="culture">Ignored.</param>
        /// <returns>RestrictionDataWrapper.</returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var selectedParameter = value as Parameter;

            // Get default wrappers for restriction parameters.
            return(RestrictionUsageParameterValueWrapper.GetDefaultWrappers(selectedParameter));
        }