Exemplo n.º 1
0
        public ActionResult <Dictionary <string, EmulatorResponse> > ListEmulators()
        {
            var emulators = emulatorService.GetEmulators();

            return(emulators.ToDictionary(e => e.Emulator.ToString(), e => new EmulatorResponse
            {
                Installed = e.Installed,
                SupportedDeviceTypes = e.SupportedDeviceTypes.Select(x => x.ToString()).ToList()
            }));
        }
Exemplo n.º 2
0
        public void Handle(HttpListenerContext context)
        {
            var listEmulatorResponse = emulatorService.GetEmulators().ToDictionary(e => e.Name,
                                                                                   e => new EmulatorResponse
            {
                Installed            = e.Installed,
                SupportedDeviceTypes = e.SupportedDeviceTypes.Select(t => t.ToString()).ToList(),
            }
                                                                                   );

            context.Response.OutputStream.WriteJson(listEmulatorResponse);
        }