Exemple #1
0
        private bool CanApplyRecursion(TargetInfo targetInfo)
        {
            if (!Options.EnableRecursiveInstantiation)
            {
                return(false);
            }

            if (targetInfo.IsNullable())
            {
                return(false);
            }

            var isExcludedType = targetInfo.TargetType == typeof(string) ||
                                 targetInfo.TargetType == typeof(DateTime);

            if (isExcludedType)
            {
                return(false);
            }

            return(true);
        }