|
5 | 5 | using System.Threading.Tasks; |
6 | 6 | using System.Collections.Generic; |
7 | 7 | using WGetNET.Models; |
8 | | -using WGetNET.HelperClasses; |
| 8 | +using WGetNET.Helper; |
9 | 9 |
|
10 | 10 | namespace WGetNET |
11 | 11 | { |
@@ -497,7 +497,7 @@ public void ExportSourcesToFile(string file) |
497 | 497 | ArgsHelper.ThrowIfStringIsNullOrWhiteSpace(file, "file"); |
498 | 498 | ArgsHelper.ThrowIfPathIsInvalid(file); |
499 | 499 |
|
500 | | - FileHandler.WriteTextToFile( |
| 500 | + FileHelper.WriteTextToFile( |
501 | 501 | file, |
502 | 502 | SourcesToJson( |
503 | 503 | GetInstalledSources())); |
@@ -546,7 +546,7 @@ public void ExportSourcesToFile(string file, string sourceName) |
546 | 546 | ArgsHelper.ThrowIfStringIsNullOrWhiteSpace(sourceName, "sourceName"); |
547 | 547 | ArgsHelper.ThrowIfPathIsInvalid(file); |
548 | 548 |
|
549 | | - FileHandler.WriteTextToFile( |
| 549 | + FileHelper.WriteTextToFile( |
550 | 550 | file, |
551 | 551 | SourcesToJson( |
552 | 552 | GetInstalledSources(sourceName))); |
@@ -645,7 +645,7 @@ public async Task ExportSourcesToFileAsync(string file) |
645 | 645 | ArgsHelper.ThrowIfStringIsNullOrWhiteSpace(file, "file"); |
646 | 646 | ArgsHelper.ThrowIfPathIsInvalid(file); |
647 | 647 |
|
648 | | - await FileHandler.WriteTextToFileAsync( |
| 648 | + await FileHelper.WriteTextToFileAsync( |
649 | 649 | file, SourcesToJson( |
650 | 650 | await GetInstalledSourcesAsync())); |
651 | 651 | } |
@@ -696,7 +696,7 @@ public async Task ExportSourcesToFileAsync(string file, string sourceName) |
696 | 696 | ArgsHelper.ThrowIfStringIsNullOrWhiteSpace(sourceName, "sourceName"); |
697 | 697 | ArgsHelper.ThrowIfPathIsInvalid(file); |
698 | 698 |
|
699 | | - await FileHandler.WriteTextToFileAsync( |
| 699 | + await FileHelper.WriteTextToFileAsync( |
700 | 700 | file, |
701 | 701 | SourcesToJson( |
702 | 702 | await GetInstalledSourcesAsync(sourceName))); |
@@ -784,7 +784,7 @@ public bool ImportSourcesFromJson(string jsonString) |
784 | 784 | { |
785 | 785 | ArgsHelper.ThrowIfStringIsNullOrWhiteSpace(jsonString, "jsonString"); |
786 | 786 |
|
787 | | - List<SourceModel> sources = JsonHandler.StringToObject<List<SourceModel>>(jsonString); |
| 787 | + List<SourceModel> sources = JsonHelper.StringToObject<List<SourceModel>>(jsonString); |
788 | 788 |
|
789 | 789 | bool success = true; |
790 | 790 | for (int i = 0; i < sources.Count; i++) |
@@ -829,10 +829,10 @@ public async Task<bool> ImportSourcesFromJsonAsync(string jsonString) |
829 | 829 |
|
830 | 830 | #if NETCOREAPP3_1_OR_GREATER |
831 | 831 | List<SourceModel> sources = |
832 | | - await JsonHandler.StringToObjectAsync<List<SourceModel>>(jsonString); |
| 832 | + await JsonHelper.StringToObjectAsync<List<SourceModel>>(jsonString); |
833 | 833 | #elif NETSTANDARD2_0 |
834 | 834 | List<SourceModel> sources = |
835 | | - JsonHandler.StringToObject<List<SourceModel>>(jsonString); |
| 835 | + JsonHelper.StringToObject<List<SourceModel>>(jsonString); |
836 | 836 | #endif |
837 | 837 |
|
838 | 838 | bool success = true; |
@@ -1036,7 +1036,7 @@ public string SourcesToJson(IEnumerable<IWinGetSource> sources) |
1036 | 1036 | { |
1037 | 1037 | ArgsHelper.ThrowIfObjectIsNull(sources, "sources"); |
1038 | 1038 |
|
1039 | | - return JsonHandler.GetJson(sources); |
| 1039 | + return JsonHelper.GetJson(sources); |
1040 | 1040 | } |
1041 | 1041 | //--------------------------------------------------------------------------------------------- |
1042 | 1042 | } |
|
0 commit comments