Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ private sealed class Parser

private readonly Type _booleanType;
private readonly Type _charType;
private readonly Type _timeSpanType;
private readonly Type _dateTimeType;
private readonly Type _nullableOfTType;
private readonly Type _objectType;
Expand Down Expand Up @@ -202,6 +203,7 @@ public Parser(Compilation compilation, in JsonSourceGenerationContext sourceGene

_booleanType = _metadataLoadContext.Resolve(SpecialType.System_Boolean);
_charType = _metadataLoadContext.Resolve(SpecialType.System_Char);
_timeSpanType = _metadataLoadContext.Resolve(typeof(TimeSpan));
_dateTimeType = _metadataLoadContext.Resolve(SpecialType.System_DateTime);
_nullableOfTType = _metadataLoadContext.Resolve(SpecialType.System_Nullable_T);
_objectType = _metadataLoadContext.Resolve(SpecialType.System_Object);
Expand Down Expand Up @@ -1506,6 +1508,7 @@ private void PopulateKnownTypes()
_knownTypes.Add(_stringType);

AddTypeIfNotNull(_knownTypes, _byteArrayType);
AddTypeIfNotNull(_knownTypes, _timeSpanType);
AddTypeIfNotNull(_knownTypes, _dateTimeOffsetType);
AddTypeIfNotNull(_knownTypes, _guidType);
AddTypeIfNotNull(_knownTypes, _uriType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ protected static ActiveOrUpcomingEvent CreateActiveOrUpcomingEvent()
EndDate = DateTime.UtcNow.AddYears(1),
Name = "Just a name",
ImageUrl = "https://www.dotnetfoundation.org/theme/img/carousel/foundation-diagram-content.png",
StartDate = DateTime.UtcNow
StartDate = DateTime.UtcNow,
Offset = TimeSpan.FromHours(2)
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class ActiveOrUpcomingEvent
public string Description { get; set; }
public DateTimeOffset StartDate { get; set; }
public DateTimeOffset EndDate { get; set; }
public TimeSpan Offset { get; set; }
}

public class CampaignSummaryViewModel
Expand Down