-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOption.cs
More file actions
29 lines (26 loc) · 1.08 KB
/
Copy pathOption.cs
File metadata and controls
29 lines (26 loc) · 1.08 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
using System;
using System.Collections.Generic;
namespace STAGE
{
public class Option
{
public Option()
{
Files = new Dictionary<string, string>();
FileSwaps = new Dictionary<string, string>();
Manipulations = new List<string>();
}
public string Name { get; set; } = "";
public string Id { get; set; } = "";
public int? Priority { get; set; }
public string Description { get; set; } = "";
public Dictionary<string, string> Files { get; set; }
public Dictionary<string, string> FileSwaps { get; set; }
public List<string> Manipulations { get; set; }
public bool ShouldSerializeId() => !string.IsNullOrWhiteSpace(Id);
public bool ShouldSerializePriority() => Priority.HasValue;
public bool ShouldSerializeFiles() => Files != null && Files.Count > 0;
public bool ShouldSerializeFileSwaps() => FileSwaps != null && FileSwaps.Count > 0;
public bool ShouldSerializeManipulations() => Manipulations != null && Manipulations.Count > 0;
}
}