public PackageViewModel(PackageReader reader) { _reader = reader; SourcePackageViewModel=new PackageViewModel() { Name = reader.GetRulesSourcePropertyValueByName(Package, "name"), DisplayName = reader.GetRulesSourcePropertyValueByName(Package, "display-name"), Architecture = reader.GetRulesSourcePropertyValueByName(Package, "arch"), Feed = reader.GetRulesSourcePropertyValueByName(Package, "feed"), Location = reader.GetRulesSourcePropertyValueByName(Package, "location"), Publisher = reader.GetRulesSourcePropertyValueByName(Package, "publisher"), Version = reader.GetRulesSourcePropertyValueByName(Package, "version"), IsEditable = true, IsSource = true, }; Name = reader.GetRulesPropertyValueByName(Package, "name"); DisplayName = reader.GetRulesPropertyValueByName(Package, "display-name"); Architecture = reader.GetRulesPropertyValueByName(Package, "arch"); Feed = reader.GetRulesPropertyValueByName(Package, "feed"); Location = reader.GetRulesPropertyValueByName(Package, "location"); Publisher = reader.GetRulesPropertyValueByName(Package, "publisher"); Version = reader.GetRulesPropertyValueByName(Package, "version"); IsEditable = false; SourceString = reader.GetRulesSourceStringPropertyValueByName(Package); SourcePackageViewModel.PropertyChanged += EvaluatedChanged; }
public CompatibilityPolicyViewModel(PackageReader reader) { _reader = reader; Minimum = reader.GetRulesPropertyValueByName(CompatibilityPolicy, "minimum"); Maximum = reader.GetRulesPropertyValueByName(CompatibilityPolicy, "maximum"); Versions = reader.GetRulesPropertyValueByName(CompatibilityPolicy, "versions"); IsEditable = false; SourceValueCompatibilityPolicyViewModel = new CompatibilityPolicyViewModel() { Minimum = reader.GetRulesSourcePropertyValueByName(CompatibilityPolicy, "minimum"), Maximum = reader.GetRulesSourcePropertyValueByName(CompatibilityPolicy, "maximum"), Versions = reader.GetRulesSourcePropertyValueByName(CompatibilityPolicy, "versions"), IsEditable = true, IsSource = true, }; SourceString = reader.GetRulesSourceStringPropertyValueByName(CompatibilityPolicy); SourceValueCompatibilityPolicyViewModel.PropertyChanged += EvaluatedChanged; }
public MetadataViewModel(PackageReader reader) { _reader = reader; Summary = reader.GetRulesPropertyValueByName(Metadata, "summary"); Description = reader.GetRulesPropertyValueByName(Metadata, "description"); AuthorVersion = reader.GetRulesPropertyValueByName(Metadata, "author-version"); BugTracker = reader.GetRulesPropertyValueByName(Metadata, "bug-tracker"); Stability = reader.GetRulesPropertyValueByName(Metadata, "stability"); Licenses = reader.GetRulesPropertyValueByName(Metadata, "licenses"); IsEditable = false; SourceMetadataViewModel = new MetadataViewModel() { Summary = reader.GetRulesSourcePropertyValueByName(Metadata, "summary"), Description = reader.GetRulesSourcePropertyValueByName(Metadata, "description"), AuthorVersion = reader.GetRulesSourcePropertyValueByName(Metadata, "author-version"), BugTracker = reader.GetRulesSourcePropertyValueByName(Metadata, "bug-tracker"), Stability = reader.GetRulesSourcePropertyValueByName(Metadata, "stability"), Licenses = reader.GetRulesSourcePropertyValueByName(Metadata, "licenses"), IsEditable = true, IsSource = true, }; SourceString = reader.GetRulesSourceStringPropertyValueByName(Metadata); SourceMetadataViewModel.PropertyChanged += EvaluatedChanged; }
public LicenseViewModel(PackageReader reader) { _reader = reader; License = reader.GetRulesPropertyValueByName(LicenseString, "license"); LicenseType = reader.GetRulesPropertyValueByName(LicenseString, "license-type"); LicenseUrl = reader.GetRulesPropertyValueByName(LicenseString, "license-url"); _sourceValueLicenseViewModel = new LicenseViewModel() { License = reader.GetRulesSourcePropertyValueByName(LicenseString, "license"), LicenseType = reader.GetRulesSourcePropertyValueByName(LicenseString, "license-type"), LicenseUrl = reader.GetRulesSourcePropertyValueByName(LicenseString, "license-url"), IsEditable = true, IsSource = true, }; SourceString = reader.GetRulesSourceStringPropertyValueByName(LicenseString); SourceValueLicenseViewModel.PropertyChanged += EvaluatedChanged; }
public SigningViewModel(PackageReader reader) { _reader = reader; ReplaceSignature = _reader.GetRulesPropertyValueByName(Signing, "replace-signature") == "true"; CompanyAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "company",false); DescriptionAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "description",false); ProductNameAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "product-name",false); ProductVersion = reader.GetRulesByNameForSigning(Signing, "attributes", "product-version",false); FileVersionAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "file-version",false); EditCollectionViewModel = new EditCollectionViewModel(reader, reader.GetRulesSourceValuesByNameForEditableCollections(Signing, "include")); IsEditable = false; IsReadOnly = true; SourceSigningViewModel = new SigningViewModel() { ReplaceSignature = _reader.GetRulesSourcePropertyValueByName(Signing, "replace-signature") == "true", CompanyAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "company", true), DescriptionAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "description", true), ProductNameAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "product-name", true), ProductVersion = reader.GetRulesByNameForSigning(Signing, "attributes", "product-version", true), FileVersionAttribute = reader.GetRulesByNameForSigning(Signing, "attributes", "file-version", true), EditCollectionViewModel = this.EditCollectionViewModel, IsEditable = true, IsReadOnly = false, IsSource = true, }; SourceString = reader.GetRulesSourceStringPropertyValueByName(Signing); SourceSigningViewModel.PropertyChanged += EvaluatedChanged; }