Skip to content
Open
Changes from all commits
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
16 changes: 4 additions & 12 deletions src/CommandLine/BaseAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public abstract class BaseAttribute : Attribute
private int max;
private object @default;
private Infrastructure.LocalizableAttributeProperty helpText;
private string metaValue;
private Infrastructure.LocalizableAttributeProperty metaValue;
private Type resourceType;

/// <summary>
Expand All @@ -24,7 +24,7 @@ protected internal BaseAttribute()
min = -1;
max = -1;
helpText = new Infrastructure.LocalizableAttributeProperty(nameof(HelpText));
metaValue = string.Empty;
metaValue = new Infrastructure.LocalizableAttributeProperty(nameof(MetaValue));
resourceType = null;
}

Expand Down Expand Up @@ -101,16 +101,8 @@ public string HelpText
/// </summary>
public string MetaValue
{
get { return metaValue; }
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}

metaValue = value;
}
get => metaValue.Value ?? string.Empty;
set => metaValue.Value = value ?? throw new ArgumentNullException("value");
}

/// <summary>
Expand Down