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; }
private void LoadData() { _reader = new PackageReader(); _reader.Read(PathToFile); PackageViewModel = new PackageViewModel(_reader); MetadataViewModel = new MetadataViewModel(_reader); ManifestViewModel = new ManifestViewModel(_reader); RequiresViewModel = new RequiresViewModel(_reader); DefineViewModel = new DefineViewModel(_reader); SigningViewModel = new SigningViewModel(_reader); LicenseViewModel = new LicenseViewModel(_reader); CompatibilityPolicy = new CompatibilityPolicyViewModel(_reader); ApplicationRoleViewModel = new ApplicationRoleViewModel(_reader); AssemblyRoleViewModel = new AssemblyRoleViewModel(_reader); FilesViewModel = new FilesViewModel(_reader); //PackageCompositionViewModel = new PackageCompositionViewModel(_reader); //_allViewModels.Add(PackageViewModel); }