示例#1
0
        public List <LaunchPadDetails> GetLaunchPadDetails(LaunchPadDetails launchPadDetails)
        {
            //TODO: Call api gateway
            SpacexGateway gateway = new SpacexGateway();
            var           launchPadDetailsList = gateway.GetLaunchpadDetails(launchPadDetails.LaunchPadID).Result;

            return(launchPadDetailsList.Where(x => x.LaunchPadID == launchPadDetails.LaunchPadID || x.LaunchPadName == launchPadDetails.LaunchPadName || x.LaunchPadStatus == launchPadDetails.LaunchPadStatus).ToList());
        }
示例#2
0
        public List <LaunchPadDetails> GetLaunchPadDetails(string Id)
        {
            //TODO: Call api gateway
            SpacexGateway gateway = new SpacexGateway();

            return(gateway.GetLaunchpadDetails(Id).Result);
            //returning new instance for testing
            //return new LaunchPadDetails { LaunchPadID="1", LaunchPadName ="SomeName", LaunchPadStatus ="ready" };
            //throw new NotImplementedException();
        }