Skip to content

Commit

Permalink
Remove dynamic artefacts, update C# RpDateTime.
Browse files Browse the repository at this point in the history
  • Loading branch information
Caparow committed Sep 25, 2024
1 parent 42d33de commit 9c55cda
Showing 1 changed file with 22 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,6 @@ class CSBaboonTranslator(defnTranslator: CSDefnTranslator,
|{
| public abstract TTo Convert<TCtx>(TCtx? context, $abstractBaboonConversions conversions, TFrom from);
|
| public TTo Convert<TCtx>(TCtx? context, $abstractBaboonConversions conversions, dynamic from)
| {
| return Convert<TCtx>(context, conversions, (TFrom)from);
| }
|
| IBaboonGenerated IBaboonGeneratedConversion.Convert<TCtx>(TCtx? context, $abstractBaboonConversions conversions, $iBaboonGenerated from) where TCtx : default
| {
| if (from is not TFrom fr)
Expand Down Expand Up @@ -477,6 +472,24 @@ class CSBaboonTranslator(defnTranslator: CSDefnTranslator,
| public static RpDateTime MinValue => new RpDateTime($csDateTime.MinValue);
| public static RpDateTime MaxValue => new RpDateTime($csDateTime.MaxValue);
|
| public int Year => Underlying.Year;
| public int Month => Underlying.Month;
| public int Day => Underlying.Day;
| public int DayOfYear => Underlying.DayOfYear;
|
| public $csTimeSpan TimeOfDay => Underlying.TimeOfDay;
| public $csDayOfWeek DayOfWeek => Underlying.DayOfWeek;
|
| public static RpDateTime operator -(RpDateTime left, TimeSpan delta)
| {
| return new RpDateTime(left.Underlying - delta);
| }
|
| public static RpDateTime operator +(RpDateTime left, TimeSpan delta)
| {
| return new RpDateTime(left.Underlying + delta);
| }
|
| public static bool operator ==(RpDateTime left, RpDateTime right)
| {
| return left.Equals(right);
Expand Down Expand Up @@ -959,6 +972,10 @@ object CSBaboonTranslator {
CSType(csSystemPkg, "Enum", fq = false)
val csDateTime: CSType =
CSType(csSystemPkg, "DateTime", fq = false)
val csTimeSpan: CSType =
CSType(csSystemPkg, "DateTime", fq = false)
val csDayOfWeek: CSType =
CSType(csSystemPkg, "DateTime", fq = false)
val rpDateTime: CSType =
CSType(baboonTimePkg, "RpDateTime", fq = false)
val csArgumentException: CSType =
Expand Down

0 comments on commit 9c55cda

Please sign in to comment.