mirror of
https://github.com/chylex/Backup-Essentials.git
synced 2025-04-09 23:15:43 +02:00
Added value search into backup report
This commit is contained in:
parent
725c7d65d9
commit
dc39b0df31
@ -48,6 +48,19 @@ namespace BackupEssentials.Backup{
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public int TryFindValue(string key, int defaultValue){
|
||||
key = key+'=';
|
||||
|
||||
foreach(string line in SplitByLine(_plain)){
|
||||
if (line.Length > 0 && line[0] == 'V' && line.Substring(1).StartsWith(key)){
|
||||
int value;
|
||||
return int.TryParse(line.Substring(key.Length+1),out value) ? value : defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public override string ToString(){
|
||||
return Report;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user