Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added localized MetaName, issue #728 #732

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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