// Constructors

        public EnumAdvancedConverter(IAdvancedConverterProvider provider)
            : base(provider)
        {
            // Checking types
            Type toType   = typeof(TTo);
            Type fromType = typeof(TFrom);

            if (!toType.IsEnum && !fromType.IsEnum)
            {
                throw new InvalidOperationException();
            }
            intermediateConverter2 = provider.GetConverter <TUnderlyingFrom, TUnderlyingTo>();
        }
        // Constructors

        public EnumAdvancedConverter(IAdvancedConverterProvider provider)
            : base(provider)
        {
            Type toType   = typeof(TTo);
            Type fromType = typeof(TFrom);

            if (!toType.IsEnum && !fromType.IsEnum)
            {
                throw new InvalidOperationException();
            }
            if (!typeof(TFrom).IsEnum)
            {
                inputValueTypeAdvancedConverter = provider.GetConverter <TFrom, TIntermediate>();
            }
            if (!typeof(TTo).IsEnum)
            {
                outputValueTypeAdvancedConverter = provider.GetConverter <TIntermediate, TTo>();
            }
        }
        // Constructors

        /// <summary>
        /// Creates new instance of <see cref="WrappingAdvancedConverter{TFrom,TFromBase,TTo,TToBase}"/>.
        /// </summary>
        /// <param name="provider">Converter provider this converter is bound to.</param>
        public WrappingAdvancedConverter(IAdvancedConverterProvider provider)
            : base(provider)
        {
            BaseConverter = provider.GetConverter <TFromBase, TToBase>();
        }