Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Remove DateTime and Decimal from empty apps
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky committed Feb 3, 2020
1 parent 5e23800 commit c462f44
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Common/src/System/CommonRuntimeTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ internal static class CommonRuntimeTypes
internal static Type IntPtr { get { return s_intPtr; } }
internal static Type Single { get { return s_single; } }
internal static Type Double { get { return s_double; } }
internal static Type Decimal { get { return s_decimal; } }
internal static Type DateTime { get { return s_datetime; } }
internal static Type Decimal { get { return NotSoCommonTypes.s_decimal; } }
internal static Type DateTime { get { return NotSoCommonTypes.s_datetime; } }
internal static Type Nullable { get { return s_nullable; } }
internal static Type Void { get { return s_void; } }
internal static Type MulticastDelegate { get { return s_multicastDelegate; } }
Expand All @@ -58,10 +58,17 @@ internal static class CommonRuntimeTypes
private static Type s_intPtr = typeof(IntPtr);
private static Type s_single = typeof(float);
private static Type s_double = typeof(double);
private static Type s_decimal = typeof(decimal);
private static Type s_datetime = typeof(DateTime);
private static Type s_nullable = typeof(Nullable<>);
private static Type s_void = typeof(void);
private static Type s_multicastDelegate = typeof(MulticastDelegate);

// Following types are not so common and their ToString and formatting is particularly heavy.
// Make it less likely that they'll get included in small projects by placing them into
// a separate class constructor.
private static class NotSoCommonTypes
{
internal static Type s_decimal = typeof(decimal);
internal static Type s_datetime = typeof(DateTime);
}
}
}

0 comments on commit c462f44

Please sign in to comment.