Skip to content

Commit

Permalink
refactor: 增加 static 关键字
Browse files Browse the repository at this point in the history
  • Loading branch information
ArgoZhang committed Jan 2, 2021
1 parent 23c9db6 commit 534a3a8
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.Extensions.DependencyInjection
public static class DisplayNamesExtensions
{

private static ConcurrentDictionary<(Type ModelType, string FieldName), string> _displayNameCache = new ConcurrentDictionary<(Type, string), string>();
private static readonly ConcurrentDictionary<(Type ModelType, string FieldName), string> _displayNameCache = new ConcurrentDictionary<(Type, string), string>();

/// <summary>
/// 向系统中加入实体类显示名称字典
Expand Down

0 comments on commit 534a3a8

Please sign in to comment.