-
-
Notifications
You must be signed in to change notification settings - Fork 282
Expand file tree
/
Copy pathTextProviderBuilder.cs
More file actions
31 lines (28 loc) · 833 Bytes
/
TextProviderBuilder.cs
File metadata and controls
31 lines (28 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using MvvmCross.IoC;
using MvvmCross.Plugin.JsonLocalization;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Babel.Core.Services
{
public class TextProviderBuilder : MvxTextProviderBuilder
{
public TextProviderBuilder()
: base(Constants.GeneralNamespace, Constants.RootFolderForResources)
{
}
protected override IDictionary<string, string> ResourceFiles
{
get
{
var dictionary = this.GetType()
.GetTypeInfo()
.Assembly
.CreatableTypes()
.Where(t => t.Name.EndsWith("ViewModel"))
.ToDictionary(t => t.Name, t => t.Name);
return dictionary;
}
}
}
}