ParseICal(string iCal)
{
Event @event = null;
@@ -108,6 +161,9 @@ namespace BlazorApp.Data
case "DTEND":
@event.DtEnd = _parseDateTime(value);
break;
+ case "DURATION":
+ @event.Duration = _parseDuration(value);
+ break;
}
}
@@ -122,7 +178,7 @@ namespace BlazorApp.Data
var client = new HttpClient();
if (AuthorizationHeader != null)
client.DefaultRequestHeaders.Add("Authorization", AuthorizationHeader);
-
+
var body = await client.GetStringAsync(Url);
var events = ParseICal(body);
diff --git a/BlazorApp/Pages/Calendar.razor b/BlazorApp/Pages/Calendar.razor
index ff79110..88c6a26 100644
--- a/BlazorApp/Pages/Calendar.razor
+++ b/BlazorApp/Pages/Calendar.razor
@@ -28,10 +28,10 @@ else
}
- @if (@event.DtEnd != null)
+ @if (@event.CalculatedEnd != null)
{
- End: @(@event.DtEnd)
+ End: @(@event.CalculatedEnd)
}
diff --git a/BlazorApp/Pages/Event.razor b/BlazorApp/Pages/Event.razor
index 3782c1e..577a728 100644
--- a/BlazorApp/Pages/Event.razor
+++ b/BlazorApp/Pages/Event.razor
@@ -22,10 +22,10 @@ else
}
- @if (_event.DtEnd != null)
+ @if (_event.CalculatedEnd != null)
{
- End: @_event.DtEnd
+ End: @_event.CalculatedEnd
}