Ejemplo n.º 1
0
        public static async void GelAllDipendentiListAsync()
        {
            DipendenteRequest dr = new DipendenteRequest()
            {
                Ok = 1
            };
            DipendentiReply drList = await service.GetAllDipendentiListAsync(dr);

            foreach (var dip in drList.ListaDipendenti)
            {
                Console.WriteLine(dip.Comune + " " + dip.Nominativo);
            }
        }
Ejemplo n.º 2
0
        public override async Task <DipendentiReply> GetAllDipendentiList(DipendenteRequest request, ServerCallContext context)
        {
            List <DipendenteReply> dips = new List <DipendenteReply>();

            for (int i = 0; i < 5; i++)
            {
                DipendenteReply d = new DipendenteReply();
                d.Comune     = "Roma " + i.ToString();
                d.Nominativo = "GioAppu" + i.ToString();
                dips.Add(d);
            }

            DipendentiReply dipend = new DipendentiReply();

            dipend.ListaDipendenti.Add(dips);
            return(dipend);
        }