diff --git a/Clockodo.NET/ClockodoService.cs b/Clockodo.NET/ClockodoService.cs index 61059ef..8928cec 100644 --- a/Clockodo.NET/ClockodoService.cs +++ b/Clockodo.NET/ClockodoService.cs @@ -1,13 +1,14 @@ using System.Collections.Immutable; using Clockodo.NET.DataContracts; using Clockodo.NET.Filter; +using Newtonsoft.Json; namespace Clockodo.NET; public class ClockodoService : ITimeEntryService { - private readonly JsonSerializerSettings _jsonSettings; private readonly HttpClient _client; + private readonly JsonSerializerSettings _jsonSettings; public ClockodoService(Credentials credentials) { diff --git a/Clockodo.NET/DataContracts/RawTimeEntry.cs b/Clockodo.NET/DataContracts/RawTimeEntry.cs index f82f25f..3722a86 100644 --- a/Clockodo.NET/DataContracts/RawTimeEntry.cs +++ b/Clockodo.NET/DataContracts/RawTimeEntry.cs @@ -1,4 +1,6 @@ -namespace Clockodo.NET.DataContracts; +using Newtonsoft.Json; + +namespace Clockodo.NET.DataContracts; public class RawTimeEntry { diff --git a/Clockodo.NET/DataContracts/TimeEntry.cs b/Clockodo.NET/DataContracts/TimeEntry.cs index 296c6bc..74030f1 100644 --- a/Clockodo.NET/DataContracts/TimeEntry.cs +++ b/Clockodo.NET/DataContracts/TimeEntry.cs @@ -14,18 +14,13 @@ internal TimeEntry(RawTimeEntry rawTimeEntry) ServicesName = rawTimeEntry.ServiceName; } - public TimeEntry() - { - - } - - public DateTime Start { get; set; } - public DateTime End { get; set; } - public int Duration { get; set; } + public DateTime Start { get; } + public DateTime End { get; } + public int Duration { get; } - public string CustomerName { get; set; } - public string ProjectName { get; set; } - public string EmployeeName { get; set; } - public decimal Revenue { get; set; } - public string ServicesName { get; set; } + public string CustomerName { get; } + public string ProjectName { get; } + public string EmployeeName { get; } + public decimal Revenue { get; } + public string ServicesName { get; } } \ No newline at end of file diff --git a/Clockodo.NET/DataContracts/TimeEntryPaging.cs b/Clockodo.NET/DataContracts/TimeEntryPaging.cs index dd26e1e..777cecd 100644 --- a/Clockodo.NET/DataContracts/TimeEntryPaging.cs +++ b/Clockodo.NET/DataContracts/TimeEntryPaging.cs @@ -1,4 +1,6 @@ -namespace Clockodo.NET.DataContracts +using Newtonsoft.Json; + +namespace Clockodo.NET.DataContracts { internal class TimeEntryPaging { diff --git a/Clockodo.NET/Filter/YearFilter.cs b/Clockodo.NET/Filter/YearFilter.cs index d59b86b..d173439 100644 --- a/Clockodo.NET/Filter/YearFilter.cs +++ b/Clockodo.NET/Filter/YearFilter.cs @@ -1,19 +1,18 @@ using Clockodo.NET.DataContracts; -namespace Clockodo.NET.Filter +namespace Clockodo.NET.Filter; + +public class YearFilter : IFilterTimeEntries { - public class YearFilter : IFilterTimeEntries - { - private readonly string _year; + private readonly string _year; - public YearFilter(string year) - { - _year = year; - } + public YearFilter(string year) + { + _year = year; + } - public IEnumerable Filter(IEnumerable source) - { - return source.Where(entry => entry.Start.Year.ToString() == _year); - } + public IEnumerable Filter(IEnumerable source) + { + return source.Where(entry => entry.Start.Year.ToString() == _year); } -} +} \ No newline at end of file