Skip to content

Commit 92c2fe9

Browse files
committed
Removed EnumValueAttribute.
Use ValueAttribute instead. Added "NoneWithLeadingDotRemoved" and "NoneWithTailingDotRemoved" options for ToAttribute.
1 parent ab02f89 commit 92c2fe9

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

CSharpToJavaScript/Utils/Attributes.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,13 @@ public ValueAttribute(string value)
1616
Value = value;
1717
}
1818
}
19-
[AttributeUsage(AttributeTargets.All)]
20-
public class EnumValueAttribute : Attribute
21-
{
22-
public string Value { get; init; }
23-
public EnumValueAttribute(string value)
24-
{
25-
Value = value;
26-
}
27-
}
2819

2920
[AttributeUsage(AttributeTargets.All)]
3021
public class ToAttribute : Attribute
3122
{
3223
public const string None = "None";
24+
public const string NoneWithLeadingDotRemoved = "NoneWithLeadingDotRemoved";
25+
public const string NoneWithTailingDotRemoved = "NoneWithTailingDotRemoved";
3326
public const string Default = "Default";
3427
public const string ToLower = "ToLower";
3528
public const string FirstCharToLowerCase = "FirstCharToLowerCase";
@@ -48,6 +41,8 @@ public string Convert(string str)
4841
return str.ToLower();
4942
case FirstCharToLowerCase:
5043
return str.FirstCharToLowerCase();
44+
case NoneWithLeadingDotRemoved:
45+
case NoneWithTailingDotRemoved:
5146
case None:
5247
return "";
5348
case Default:

0 commit comments

Comments
 (0)