Пример #1
0
        private static string calculateResponse(TypeSyntax type, SemanticModel model)
        {
            var typeSymbol = model.GetSymbolInfo(type).Symbol as ITypeSymbol;

            Debug.Assert(typeSymbol != null);
            return(ResponseVisitor.Get(typeSymbol, "response"));
        }
Пример #2
0
        private void addProperty(ITypeSymbol type, string name)
        {
            _data.Push(name);
            try
            {
                var typeInstantiation = ResponseVisitor.Get(type, currentData());
                if (typeInstantiation == null)
                {
                    Success = false;
                    return;
                }

                _result.AppendLine($"{name} = {typeInstantiation},");
            }
            finally
            {
                _data.Pop();
            }
        }