public ResolveResultConverterStrategyGrouping(Type resultType)
            : base(resultType)
        {
            if (resultType == null)
            {
                throw Logger.Fatal.ArgumentNull(nameof(resultType));
            }

            if (!HarshGrouping.IsGroupingType(resultType))
            {
                throw Logger.Fatal.ArgumentFormat(
                          nameof(resultType),
                          SR.ResolveResultConverterStrategyGrouping_NotAGrouping,
                          resultType
                          );
            }

            var keyType     = resultType.GenericTypeArguments[0];
            var elementType = resultType.GenericTypeArguments[1];

            _groupingFactory = new HarshGroupingDynamicFactory(keyType, elementType);

            _keyStrategy     = GetStrategyForType(keyType);
            _elementStrategy = GetStrategyForType(elementType);
        }
        public ResolveResultConverterStrategyGrouping(Type resultType)
            : base(resultType)
        {
            if (resultType == null)
            {
                throw Logger.Fatal.ArgumentNull(nameof(resultType));
            }

            if (!HarshGrouping.IsGroupingType(resultType))
            {
                throw Logger.Fatal.ArgumentFormat(
                    nameof(resultType),
                    SR.ResolveResultConverterStrategyGrouping_NotAGrouping,
                    resultType
                );
            }

            var keyType = resultType.GenericTypeArguments[0];
            var elementType = resultType.GenericTypeArguments[1];

            _groupingFactory = new HarshGroupingDynamicFactory(keyType, elementType);

            _keyStrategy = GetStrategyForType(keyType);
            _elementStrategy = GetStrategyForType(elementType);
        }