Skip to content

Commit

Permalink
use GetValues method instead of GetNames
Browse files Browse the repository at this point in the history
  • Loading branch information
testfirstcoder committed Mar 21, 2024
1 parent 06bb354 commit 106120c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ public OpenApiToTypeScriptClientCommand Command
.ToArray();

/// <summary>Gets the list of date time types.</summary>
public TypeScriptDateTimeType[] DateTimeTypes { get; } = Enum.GetNames(typeof(TypeScriptDateTimeType))
.Select(t => (TypeScriptDateTimeType)Enum.Parse(typeof(TypeScriptDateTimeType), t))
.ToArray();
public TypeScriptDateTimeType[] DateTimeTypes { get; } =
(TypeScriptDateTimeType[])Enum.GetValues(typeof(TypeScriptDateTimeType));

/// <summary>Gets the list of null values.</summary>
public TypeScriptNullValue[] NullValues { get; } = Enum.GetNames(typeof(TypeScriptNullValue))
Expand Down

0 comments on commit 106120c

Please sign in to comment.