Exemplo n.º 1
0
        public void Serialize(ISymbol member, ITypeSymbol type, CodeWriter code,
                              string name, string typeIdentifier, Location location)
        {
            var named = GenerationEngine.GetNamedTypeSymbol(type);
            var types = named.TypeArguments;

            WriteGenerator.Make(member, types[0], code, $"{name}.Key", location);
            WriteGenerator.Make(member, types[1], code, $"{name}.Value", location);
        }
Exemplo n.º 2
0
        public void Serialize(ISymbol member, ITypeSymbol type, CodeWriter code,
                              string name,
                              string typeIdentifier, Location location)
        {
            var named = GenerationEngine.GetNamedTypeSymbol(type);
            var types = named.TypeArguments;

            for (var idx = 0; idx < Items; idx++)
            {
                WriteGenerator.Make(member, types[idx], code, $"{name}.Item{idx + 1}", location);
            }
        }