mirror of
https://github.com/chylex/Backup-Essentials.git
synced 2025-06-02 06:34:08 +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;
|
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(){
|
public override string ToString(){
|
||||||
return Report;
|
return Report;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user