Revision | b3312628f29e9ca633e5bb4fb5faafeefabac31a (tree) |
---|---|
Time | 2022-08-17 23:45:21 |
Author | yoshy <yoshy.org.bitbucket@gz.j...> |
Commiter | yoshy |
[MOD] AbstractMessageRepository の公開メソッドを virtual に修正
@@ -6,7 +6,7 @@ namespace CleanAuLait.Core.Resource | ||
6 | 6 | { |
7 | 7 | protected readonly IDictionary<string, string> map = new Dictionary<string, string>(); |
8 | 8 | |
9 | - protected void RegisterMessages(string properties) | |
9 | + protected virtual void RegisterMessages(string properties) | |
10 | 10 | { |
11 | 11 | string[] lines = properties.Split('\n'); |
12 | 12 |
@@ -22,16 +22,21 @@ namespace CleanAuLait.Core.Resource | ||
22 | 22 | } |
23 | 23 | } |
24 | 24 | |
25 | - public string Get(string key) | |
25 | + public virtual string Get(string key) | |
26 | 26 | { |
27 | - return map[key]; | |
27 | + return GetMap()[key]; | |
28 | 28 | } |
29 | 29 | |
30 | - public string Get(string key, params string[] args) | |
30 | + public virtual string Get(string key, params string[] args) | |
31 | 31 | { |
32 | - string msg = map[key]; | |
32 | + string msg = GetMap()[key]; | |
33 | 33 | |
34 | 34 | return string.Format(msg, args); |
35 | 35 | } |
36 | + | |
37 | + public virtual IDictionary<string, string> GetMap() | |
38 | + { | |
39 | + return map; | |
40 | + } | |
36 | 41 | } |
37 | 42 | } |