Dev2.Scheduler.ScheduledResourceModel.DebugHasErrors C# (CSharp) Method

DebugHasErrors() private method

private DebugHasErrors ( string debugHistoryPath, string correlationId ) : bool
debugHistoryPath string
correlationId string
return bool
        bool DebugHasErrors(string debugHistoryPath, string correlationId)
        {
            var serializer = new Dev2JsonSerializer();
            var file = DirectoryHelper.GetFiles(debugHistoryPath).FirstOrDefault(a => a.Contains(correlationId));

            if (file == null)
            {
                return false;
            }

             return  serializer.Deserialize<List<IDebugState>>(FileHelper.ReadAllText(file)).Last().HasError;
        }