public IEnumerable <Core.Models.ApplicationVersion> GetVersion() { Core.Controllers.IVersionController controller = new Core.Controllers.VersionController(); return(controller.GetVersion()); }
public IEnumerable <Core.Models.ApplicationVersion> GetVersion() { var versions = new List <Core.Models.ApplicationVersion>(); Core.Controllers.IVersionController controller; controller = new Core.Controllers.VersionController(); versions.AddRange(controller.GetVersion()); if (ConfigurationManager.AppSettings["UseWCF"] == "true") { ChannelFactory <Core.Controllers.IVersionController> factory = new ChannelFactory <Core.Controllers.IVersionController>( "StatisticsServiceEndpoint"); controller = factory.CreateChannel(); versions.AddRange(controller.GetVersion()); } return(versions); }