55using System . Text ;
66using System . Collections . Generic ;
77using WGetNET . Models ;
8+ using WGetNET . Helper ;
89using WGetNET . Builder ;
910using WGetNET . Extensions ;
1011
11- namespace WGetNET . Helper
12+ namespace WGetNET . Components . Internal
1213{
1314 /// <summary>
14- /// The <see langword="static"/> <see cref="WGetNET.Helper .ProcessOutputReader"/> class,
15- /// provieds <see langword="static"/> methodes to process the output of the winget processes.
15+ /// The <see cref="WGetNET.Components.Internal .ProcessOutputReader"/> class,
16+ /// provieds methodes to read data from the output of the winget processes.
1617 /// </summary>
17- internal static class ProcessOutputReader
18+ internal class ProcessOutputReader
1819 {
20+ /// <summary>
21+ /// Initializes a new instance of the <see cref="WGetNET.Components.Internal.ProcessOutputReader"/> class.
22+ /// </summary>
23+ public ProcessOutputReader ( )
24+ {
25+ // Provide empty constructor
26+ }
27+
1928 //---To Package List------------------------------------------------------------------------------------------
2029 /// <summary>
2130 /// Converts a <see cref="System.Collections.Generic.List{T}"/>
@@ -33,7 +42,7 @@ internal static class ProcessOutputReader
3342 /// <returns>
3443 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetPackage"/>'s.
3544 /// </returns>
36- public static List < WinGetPackage > ToPackageList ( string [ ] output , PackageAction action = PackageAction . Default , string ? sourceName = null )
45+ public List < WinGetPackage > ToPackageList ( string [ ] output , PackageAction action = PackageAction . Default , string ? sourceName = null )
3746 {
3847 //Get top line index.
3948 //The array should always contain this line.
@@ -73,7 +82,7 @@ public static List<WinGetPackage> ToPackageList(string[] output, PackageAction a
7382 /// <returns>
7483 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetPackage"/>'s.
7584 /// </returns>
76- private static List < WinGetPackage > CreatePackageListFromOutput ( string [ ] output , int [ ] columnList , PackageAction action = PackageAction . Default , string ? sourceName = null )
85+ private List < WinGetPackage > CreatePackageListFromOutput ( string [ ] output , int [ ] columnList , PackageAction action = PackageAction . Default , string ? sourceName = null )
7786 {
7887 List < WinGetPackage > resultList = new ( ) ;
7988
@@ -195,7 +204,7 @@ private static List<WinGetPackage> CreatePackageListFromOutput(string[] output,
195204 /// <returns>
196205 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetPinnedPackage"/>'s.
197206 /// </returns>
198- public static List < WinGetPinnedPackage > ToPinnedPackageList ( string [ ] output )
207+ public List < WinGetPinnedPackage > ToPinnedPackageList ( string [ ] output )
199208 {
200209 //Get top line index.
201210 //The array should always contain this line.
@@ -229,7 +238,7 @@ public static List<WinGetPinnedPackage> ToPinnedPackageList(string[] output)
229238 /// <returns>
230239 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetPinnedPackage"/>'s.
231240 /// </returns>
232- private static List < WinGetPinnedPackage > CreatePinnedPackageListFromOutput ( string [ ] output , int [ ] columnList )
241+ private List < WinGetPinnedPackage > CreatePinnedPackageListFromOutput ( string [ ] output , int [ ] columnList )
233242 {
234243 List < WinGetPinnedPackage > resultList = new ( ) ;
235244
@@ -335,7 +344,7 @@ private static List<WinGetPinnedPackage> CreatePinnedPackageListFromOutput(strin
335344 /// <returns>
336345 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetSource"/>'s.
337346 /// </returns>
338- public static List < WinGetSource > ToSourceList ( string [ ] output )
347+ public List < WinGetSource > ToSourceList ( string [ ] output )
339348 {
340349 List < WinGetSource > sourceList = new ( ) ;
341350
@@ -363,7 +372,7 @@ public static List<WinGetSource> ToSourceList(string[] output)
363372 /// <returns>
364373 /// The <see cref="WGetNET.WinGetInfo"/> object created from the output.
365374 /// </returns>
366- public static WinGetInfo ToWingetInfo ( string [ ] output , InfoActionVersionId actionVersionId )
375+ public WinGetInfo ToWingetInfo ( string [ ] output , InfoActionVersionId actionVersionId )
367376 {
368377 if ( output . Length <= 0 )
369378 {
@@ -378,7 +387,7 @@ public static WinGetInfo ToWingetInfo(string[] output, InfoActionVersionId actio
378387 /// </summary>
379388 /// <param name="output"></param>
380389 /// <returns></returns>
381- private static string ReadVersionFromData ( string [ ] output )
390+ private string ReadVersionFromData ( string [ ] output )
382391 {
383392 string version = string . Empty ;
384393
@@ -411,7 +420,7 @@ private static string ReadVersionFromData(string[] output)
411420 /// <returns>
412421 /// The <see cref="WGetNET.WinGetInfo"/> object created from the output.
413422 /// </returns>
414- private static WinGetInfo ReadDataByRange ( string [ ] output , InfoActionVersionId actionVersionId )
423+ private WinGetInfo ReadDataByRange ( string [ ] output , InfoActionVersionId actionVersionId )
415424 {
416425 return actionVersionId switch
417426 {
@@ -430,7 +439,7 @@ private static WinGetInfo ReadDataByRange(string[] output, InfoActionVersionId a
430439 /// <returns>
431440 /// The <see cref="WGetNET.WinGetInfo"/> object created from the output.
432441 /// </returns>
433- private static WinGetInfo ReadDataForRange1 ( string [ ] output )
442+ private WinGetInfo ReadDataForRange1 ( string [ ] output )
434443 {
435444 InfoSetBuilder builder = new ( ) ;
436445
@@ -462,7 +471,7 @@ private static WinGetInfo ReadDataForRange1(string[] output)
462471 /// <returns>
463472 /// The <see cref="WGetNET.WinGetInfo"/> object created from the output.
464473 /// </returns>
465- private static WinGetInfo ReadDataForRange2 ( string [ ] output )
474+ private WinGetInfo ReadDataForRange2 ( string [ ] output )
466475 {
467476 InfoSetBuilder builder = new ( ) ;
468477
@@ -497,7 +506,7 @@ private static WinGetInfo ReadDataForRange2(string[] output)
497506 /// <returns>
498507 /// The <see cref="WGetNET.WinGetInfo"/> object created from the output.
499508 /// </returns>
500- private static WinGetInfo ReadDataForRange3 ( string [ ] output )
509+ private WinGetInfo ReadDataForRange3 ( string [ ] output )
501510 {
502511 InfoSetBuilder builder = new ( ) ;
503512
@@ -537,7 +546,7 @@ private static WinGetInfo ReadDataForRange3(string[] output)
537546 /// <returns>
538547 /// The <see cref="WGetNET.WinGetInfo"/> object created from the output.
539548 /// </returns>
540- private static WinGetInfo ReadDataForRange4 ( string [ ] output )
549+ private WinGetInfo ReadDataForRange4 ( string [ ] output )
541550 {
542551 InfoSetBuilder builder = new ( ) ;
543552
@@ -577,7 +586,7 @@ private static WinGetInfo ReadDataForRange4(string[] output)
577586 /// <returns>
578587 /// A <see cref="WinGetDirectory"/> instance if the action was successful, or null if it failed.
579588 /// </returns>
580- private static WinGetDirectory ? ReadSingleDirectoryEntry ( string [ ] output , int index )
589+ private WinGetDirectory ? ReadSingleDirectoryEntry ( string [ ] output , int index )
581590 {
582591 string [ ] entry = output [ index ] . Split ( ':' ) ;
583592 if ( entry . Length == 2 )
@@ -602,7 +611,7 @@ private static WinGetInfo ReadDataForRange4(string[] output)
602611 /// <returns>
603612 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetDirectory"/> objects.
604613 /// </returns>
605- private static List < WinGetDirectory > ReadDirectories ( string [ ] output )
614+ private List < WinGetDirectory > ReadDirectories ( string [ ] output )
606615 {
607616 List < WinGetDirectory > directories = new ( ) ;
608617
@@ -689,7 +698,7 @@ private static List<WinGetDirectory> ReadDirectories(string[] output)
689698 /// <returns>
690699 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetLink"/> objects.
691700 /// </returns>
692- private static List < WinGetLink > ReadLinks ( string [ ] output )
701+ private List < WinGetLink > ReadLinks ( string [ ] output )
693702 {
694703 List < WinGetLink > links = new ( ) ;
695704
@@ -750,7 +759,7 @@ private static List<WinGetLink> ReadLinks(string[] output)
750759 /// <returns>
751760 /// A <see cref="System.Collections.Generic.List{T}"/> of <see cref="WGetNET.WinGetAdminOption"/> objects.
752761 /// </returns>
753- private static List < WinGetAdminOption > ReadAdminSettings ( string [ ] output )
762+ private List < WinGetAdminOption > ReadAdminSettings ( string [ ] output )
754763 {
755764 List < WinGetAdminOption > adminSetting = new ( ) ;
756765
@@ -794,7 +803,7 @@ private static List<WinGetAdminOption> ReadAdminSettings(string[] output)
794803 /// <returns>
795804 /// A <see cref="System.String"/> containing the hash value.
796805 /// </returns>
797- public static string ResultToHash ( ProcessResult result )
806+ public string ResultToHash ( ProcessResult result )
798807 {
799808 string hash = "" ;
800809 if ( result . Output . Length > 0 && result . Output [ 0 ] . Contains ( ":" ) )
@@ -820,7 +829,7 @@ public static string ResultToHash(ProcessResult result)
820829 /// <returns>
821830 /// The <see cref="System.String"/> containing the export result.
822831 /// </returns>
823- public static string ExportOutputToString ( ProcessResult result )
832+ public string ExportOutputToString ( ProcessResult result )
824833 {
825834 if ( result . Success )
826835 {
@@ -850,7 +859,7 @@ public static string ExportOutputToString(ProcessResult result)
850859 /// <returns>
851860 /// A <see cref="System.Int32"/> <see langword="array"/> containing the column start indexes.
852861 /// </returns>
853- private static int [ ] GetColumnList ( string line , bool isPinnedPackageTable = false )
862+ private int [ ] GetColumnList ( string line , bool isPinnedPackageTable = false )
854863 {
855864 int [ ] columns = new int [ 0 ] ;
856865
0 commit comments