예제 #1
0
        private bool GetArgumentNames(ExpressionData expressionData, out IReadOnlyList <string> argumentNames)
        {
            if (_typeToArgumentNames == null)
            {
                argumentNames = new List <string>();
                return(false);
            }

            if (_typeToArgumentNames.TryGetValue(expressionData.Type.TrimEnd('?'), out argumentNames))
            {
                return(true);
            }

            var typeWithoutNamespace = _concreteTypeAnalyzer.GetTypeWithoutNamespace(expressionData.Type);

            return(_typeToArgumentNames.TryGetValue(typeWithoutNamespace, out argumentNames));
        }
예제 #2
0
        public void GetForGenericType_RemoveNamespace_FromType(string input, string expected)
        {
            var result = _concreteTypeAnalyzer.GetTypeWithoutNamespace(input);

            result.Should().Be(expected);
        }