AppActs.Client.Service.ReportService.GetGraphWithVersionsCompare C# (CSharp) Method

GetGraphWithVersionsCompare() public method

Gets the graph.
public GetGraphWithVersionsCompare ( System.Guid graphGuid, System.Guid applicationId, System.DateTime dateStart, System.DateTime dateEnd ) : string>.GraphWithTabularCompare
graphGuid System.Guid
applicationId System.Guid
dateStart System.DateTime
dateEnd System.DateTime
return string>.GraphWithTabularCompare
        public GraphWithTabularCompare<string, string> GetGraphWithVersionsCompare(Guid graphGuid, Guid applicationId, 
            DateTime dateStart, DateTime dateEnd)
        {
            GraphWithTabularCompare<string, string> graphWithVersionCompare =
                new GraphWithTabularCompare<string, string>();

            try
            {
                graphWithVersionCompare.Options = this.applicationRepository.GetVersionsByApplication(applicationId).ToList();

                if (graphWithVersionCompare.Options.Count() != 0)
                {
                    graphWithVersionCompare.Selected = graphWithVersionCompare.Options.Take(3).ToList();
                    graphWithVersionCompare.Consume(
                        this.GetGraphVersions(graphGuid, applicationId, graphWithVersionCompare.Selected, dateStart, dateEnd)
                    );

                    graphWithVersionCompare.Tabular = graphWithVersionCompare.Data.Series;
                }
                else
                {
                    graphWithVersionCompare.NotEnoughData = true;
                }
            }
            catch (DataAccessLayerException)
            {
                throw;
            }
            catch (ServiceLayerException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw new ServiceLayerException(ex);
            }

            return graphWithVersionCompare;
        }