internal Communication SetResponse() { switch (CommunicationReceived.Type) { case EType.CREATE: var address = CommunicationReceived.Content; var success = TestPing.Test(address); DomainRepository.add(new Domain { Address = address, Success = success }); return(SetCommunication(DomainRepository.GetAll)); case EType.READ: return(SetCommunication(DomainRepository.GetAll)); default: return(SetCommunication(null)); } }