Example #1
0
 public SnapApps([NotNull] SnapApps snapApps)
 {
     if (snapApps == null)
     {
         throw new ArgumentNullException(nameof(snapApps));
     }
     Channels = snapApps.Channels.Select(x => new SnapsChannel(x)).ToList();
     Apps     = snapApps.Apps.Select(x => new SnapsApp(x)).ToList();
     Generic  = new SnapAppsGeneric(snapApps.Generic);
     Schema   = snapApps.Schema;
 }
Example #2
0
 internal SnapApps([NotNull] SnapApp snapApp)
 {
     if (snapApp == null)
     {
         throw new ArgumentNullException(nameof(snapApp));
     }
     Channels = snapApp.Channels.Select(x => new SnapsChannel(x)).ToList();
     Apps     = new List <SnapsApp> {
         new(snapApp)
     };
     Generic = new SnapAppsGeneric();
 }
Example #3
0
 public SnapAppsGeneric([NotNull] SnapAppsGeneric snapAppsGeneric)
 {
     if (snapAppsGeneric == null)
     {
         throw new ArgumentNullException(nameof(snapAppsGeneric));
     }
     Artifacts    = snapAppsGeneric.Artifacts;
     Packages     = snapAppsGeneric.Packages;
     Nuspecs      = snapAppsGeneric.Nuspecs;
     Installers   = snapAppsGeneric.Installers;
     PackStrategy = snapAppsGeneric.PackStrategy;
 }
Example #4
0
 public SnapApps()
 {
     Channels = new List <SnapsChannel>();
     Apps     = new List <SnapsApp>();
     Generic  = new SnapAppsGeneric();
 }