Ejemplo n.º 1
0
        public IHttpActionResult Available()
        {
            try
            {
                XmlFootbagTrickService trickService = new XmlFootbagTrickService();

                return(Ok(trickService.FootbagTricks));
            }
            catch (Exception exception)
            {
                return(InternalServerError(exception));
            }
        }
        /// <summary>Gets the contact arrangers.</summary>
        private static IEnumerable <IShred30ContactArranger> GetContactArrangers(Shred30Options shred30Options)
        {
            IFootbagTrickService footbagTrickService;

            if (shred30Options.FootbagTrickService == "xml")
            {
                footbagTrickService = new XmlFootbagTrickService();
            }
            else
            {
                throw new System.Exception(
                          string.Format("Unsupported footbag trick service type: {0}", shred30Options.FootbagTrickService)
                          );
            }

            return(new List <IShred30ContactArranger>()
            {
                new FootbagTrickArranger(footbagTrickService),
                new StartSideArranger()
            });
        }