internal SnapApp([NotNull] SnapApp app) { if (app == null) { throw new ArgumentNullException(nameof(app)); } Id = app.Id; InstallDirectoryName = app.InstallDirectoryName; MainExe = app.MainExe; SuperVisorId = app.SuperVisorId; Version = app.Version; // TODO: Can this null check be removed? if (app.Target != null) { Target = new SnapTarget(app.Target); } Channels = app.Channels?.Select(x => new SnapChannel(x)).ToList(); IsGenesis = app.IsGenesis; IsFull = app.IsFull; ReleaseNotes = app.ReleaseNotes; Description = app.Description; RepositoryUrl = app.RepositoryUrl; RepositoryType = app.RepositoryType; Authors = app.Authors; }
public SnapRelease([NotNull] SnapRelease release) : this() { if (release == null) { throw new ArgumentNullException(nameof(release)); } Id = release.Id; UpstreamId = release.UpstreamId; Version = release.Version; Channels = release.Channels; Target = new SnapTarget(release.Target); IsGenesis = release.IsGenesis; IsFull = release.IsFull; Filename = release.Filename; FullFilesize = release.FullFilesize; FullSha256Checksum = release.FullSha256Checksum; DeltaFilesize = release.DeltaFilesize; DeltaSha256Checksum = release.DeltaSha256Checksum; CreatedDateUtc = release.CreatedDateUtc; ReleaseNotes = release.ReleaseNotes; Gc = release.Gc; Files = release.Files.Select(x => new SnapReleaseChecksum(x)).ToList(); New = release.New.Select(x => new SnapReleaseChecksum(x)).ToList(); Modified = release.Modified.Select(x => new SnapReleaseChecksum(x)).ToList(); Unmodified = release.Unmodified.ToList(); Deleted = release.Deleted.ToList(); }
internal SnapsTarget([NotNull] SnapTarget target) { if (target == null) { throw new ArgumentNullException(nameof(target)); } Os = target.Os; Framework = target.Framework; Rid = target.Rid; Icon = target.Icon; Shortcuts = target.Shortcuts; PersistentAssets = target.PersistentAssets; Installers = target.Installers; }