-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathQuotationMarkUpdateSettings.cs
More file actions
28 lines (25 loc) · 1002 Bytes
/
QuotationMarkUpdateSettings.cs
File metadata and controls
28 lines (25 loc) · 1002 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
using System.Collections.Generic;
namespace SIL.Machine.PunctuationAnalysis
{
public class QuotationMarkUpdateSettings
{
private readonly QuotationMarkUpdateStrategy _defaultChapterAction;
private readonly List<QuotationMarkUpdateStrategy> _chapterActions;
public QuotationMarkUpdateSettings(
QuotationMarkUpdateStrategy defaultChapterStrategy = QuotationMarkUpdateStrategy.ApplyFull,
List<QuotationMarkUpdateStrategy> chapterStrategies = null
)
{
_defaultChapterAction = defaultChapterStrategy;
_chapterActions = chapterStrategies ?? new List<QuotationMarkUpdateStrategy>();
}
public QuotationMarkUpdateStrategy GetActionForChapter(int chapterNumber)
{
if (chapterNumber > -1 && chapterNumber <= _chapterActions.Count)
{
return _chapterActions[chapterNumber - 1];
}
return _defaultChapterAction;
}
}
}