/// <summary>
        /// Initializes a new instance of the <see cref="DetachedValuesConverter"/> class.
        /// </summary>
        /// <param name="applicationContext">
        /// The <see cref="ApplicationContext"/>.
        /// </param>
        /// <param name="values">
        /// The resolved DefaultValueCorrection types.
        /// </param>
        internal DetachedValuesConverter(ApplicationContext applicationContext, IEnumerable <Type> values)
        {
            if (applicationContext != null)
            {
                _contentTypeService = applicationContext.Services.ContentTypeService;
                _dataTypeService    = applicationContext.Services.DataTypeService;
                _ready = true;
            }
            else
            {
                _ready = false;
            }

            // Instantiate the corrector
            _corrector = new DetachedValueCorrector(values);
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DetachedValuesConverter"/> class.
        /// </summary>
        /// <param name="applicationContext">
        /// The <see cref="ApplicationContext"/>.
        /// </param>
        /// <param name="values">
        /// The resolved DefaultValueCorrection types.
        /// </param>
        internal DetachedValuesConverter(ApplicationContext applicationContext, IEnumerable<Type> values)
        {
            if (applicationContext != null)
            {
                _contentTypeService = applicationContext.Services.ContentTypeService;
                _dataTypeService = applicationContext.Services.DataTypeService;
                _ready = true;
            }
            else
            {
                _ready = false;
            }

            // Instantiate the corrector
            _corrector = new DetachedValueCorrector(values);
        }