public EditablePackageMetadata(IPackage source, IUIServices uiServices, SymbolValidator symbolValidator)
     : this((IPackageMetadata)source, uiServices, symbolValidator)
 {
     // Zip Packages may be signed, we need to load that data async
     if (source is ISignaturePackage zip)
     {
         LoadSignatureData(zip);
     }
 }
        public EditablePackageMetadata(IPackageMetadata source, IUIServices uiServices, SymbolValidator symbolValidator)
        {
            if (source is null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            _uiServices = uiServices;
            _showValidationResultsCommand = new RelayCommand(OnShowValidationResult, () => ValidationResult != null);

            _id          = source.Id;
            _version     = source.Version;
            PackageTypes = new ObservableCollection <PackageType>(source.PackageTypes);
            Title        = source.Title;
            Authors      = ConvertToString(source.Authors);
            Owners       = ConvertToString(source.Owners);
            Icon         = source.Icon;
            IconUrl      = FixIconUrl(source.IconUrl);

            ProjectUrl = source.ProjectUrl;
            RequireLicenseAcceptance = source.RequireLicenseAcceptance;
            DevelopmentDependency    = source.DevelopmentDependency;
            Description                = source.Description;
            Summary                    = source.Summary;
            ReleaseNotes               = source.ReleaseNotes;
            Copyright                  = source.Copyright;
            Language                   = source.Language;
            Tags                       = source.Tags;
            Serviceable                = source.Serviceable;
            _dependencySets            = new ObservableCollection <PackageDependencyGroup>(source.DependencyGroups);
            FrameworkAssemblies        = new ObservableCollection <FrameworkAssemblyReference>(source.FrameworkReferences);
            _packageAssemblyReferences = new ObservableCollection <PackageReferenceSet>();
            ContentFiles               = new ObservableCollection <ManifestContentFiles>(source.ContentFiles);
            _frameworkReferenceGroups  = new ObservableCollection <FrameworkReferenceGroup>(source.FrameworkReferenceGroups);

            if (source.Repository != null)
            {
                Repository            = new RepositoryMetadataViewModel(source.Repository);
                _underlyingRepository = source.Repository;
            }

            LicenseMetadata = source.LicenseMetadata;
            LicenseUrl      = LicenseMetadata != null ? null : source.LicenseUrl; // This will be set for back compat, but should show up as null here

            if (source.PackageAssemblyReferences != null)
            {
                PackageAssemblyReferences.AddRange(source.PackageAssemblyReferences);
            }
            MinClientVersion = source.MinClientVersion;

            SymbolValidator = symbolValidator;
        }