-
Notifications
You must be signed in to change notification settings - Fork 476
Expand file tree
/
Copy pathRepositoryAppXmlConfiguration.cs
More file actions
48 lines (40 loc) · 1.67 KB
/
RepositoryAppXmlConfiguration.cs
File metadata and controls
48 lines (40 loc) · 1.67 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.IO;
using TestStack.White.Bricks;
using TestStack.White.Configuration;
namespace TestStack.White.ScreenObjects.Configuration
{
public class RepositoryAppXmlConfiguration : AssemblyConfiguration, RepositoryConfiguration
{
public static RepositoryConfiguration instance;
private static readonly Dictionary<string, object> DefaultValues = new Dictionary<string, object>();
private const string UseHistoryKey = "UseHistory";
private const string ServiceCallHistoryLocationKey = "ServiceCallHistoryLocation";
private const string RecordFlowKey = "RecordFlow";
static RepositoryAppXmlConfiguration()
{
DefaultValues[RecordFlowKey] = false;
DefaultValues[ServiceCallHistoryLocationKey] = ".";
DefaultValues[UseHistoryKey] = false;
}
public static RepositoryConfiguration Instance
{
get { return instance ?? (instance = new RepositoryAppXmlConfiguration()); }
}
private RepositoryAppXmlConfiguration() : base("White", "Repository", DefaultValues,
CoreAppXmlConfiguration.Instance.LoggerFactory.Create(typeof(RepositoryAppXmlConfiguration))) {}
public virtual bool RecordFlow
{
get { return Convert.ToBoolean(UsedValues[RecordFlowKey]); }
}
public virtual DirectoryInfo ServiceCallHistoryLocation
{
get { return new DirectoryInfo(UsedValues[ServiceCallHistoryLocationKey]); }
}
public virtual bool UseHistory
{
get { return Convert.ToBoolean(UsedValues[UseHistoryKey]); }
}
}
}