forked from ServiceStack/ServiceStack.Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppConfig.cs
More file actions
31 lines (25 loc) · 804 Bytes
/
Copy pathAppConfig.cs
File metadata and controls
31 lines (25 loc) · 804 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 System.Collections.Generic;
using System.IO;
using ServiceStack.Common.Utils;
using ServiceStack.Configuration;
namespace RestFiles.ServiceInterface
{
public class AppConfig
{
public AppConfig()
{
this.TextFileExtensions = new List<string>();
this.ExcludeDirectories = new List<string>();
}
public AppConfig(IResourceManager resources)
{
this.RootDirectory = resources.GetString("RootDirectory").MapHostAbsolutePath()
.Replace('\\', Path.DirectorySeparatorChar);
this.TextFileExtensions = resources.GetList("TextFileExtensions");
this.ExcludeDirectories = resources.GetList("ExcludeDirectories");
}
public string RootDirectory { get; set; }
public IList<string> TextFileExtensions { get; set; }
public IList<string> ExcludeDirectories { get; set; }
}
}