@@ -5,28 +5,45 @@ namespace GitHub.Unity
5
5
[ Serializable ]
6
6
public struct GitStatusEntry
7
7
{
8
- public string Path ;
9
- public string FullPath ;
10
- public string ProjectPath ;
11
- public string OriginalPath ;
12
- public GitFileStatus Status ;
13
- public bool Staged ;
8
+ public static GitStatusEntry Default = new GitStatusEntry ( ) ;
9
+
10
+ public string path ;
11
+ public string fullPath ;
12
+ public string projectPath ;
13
+ public string originalPath ;
14
+ public GitFileStatus status ;
15
+ public bool staged ;
14
16
15
17
public GitStatusEntry ( string path , string fullPath , string projectPath ,
16
18
GitFileStatus status ,
17
19
string originalPath = null , bool staged = false )
18
20
{
19
- Path = path ;
20
- Status = status ;
21
- FullPath = fullPath ;
22
- ProjectPath = projectPath ;
23
- OriginalPath = originalPath ;
24
- Staged = staged ;
21
+ Guard . ArgumentNotNullOrWhiteSpace ( path , "path" ) ;
22
+ Guard . ArgumentNotNullOrWhiteSpace ( fullPath , "fullPath" ) ;
23
+
24
+ this . path = path ;
25
+ this . status = status ;
26
+ this . fullPath = fullPath ;
27
+ this . projectPath = projectPath ;
28
+ this . originalPath = originalPath ;
29
+ this . staged = staged ;
25
30
}
26
31
32
+ public string Path => path ;
33
+
34
+ public string FullPath => fullPath ;
35
+
36
+ public string ProjectPath => projectPath ;
37
+
38
+ public string OriginalPath => originalPath ;
39
+
40
+ public GitFileStatus Status => status ;
41
+
42
+ public bool Staged => staged ;
43
+
27
44
public override string ToString ( )
28
45
{
29
- return String . Format ( "Path:'{0 }' Status:'{1 }' FullPath:'{2 }' ProjectPath:'{3 }' OriginalPath:'{4 }' Staged:'{5 }'" , Path , Status , FullPath , ProjectPath , OriginalPath , Staged ) ;
46
+ return $ "Path:'{ Path } ' Status:'{ Status } ' FullPath:'{ FullPath } ' ProjectPath:'{ ProjectPath } ' OriginalPath:'{ OriginalPath } ' Staged:'{ Staged } '";
30
47
}
31
48
}
32
49
}
0 commit comments