//withparam name? public AssemblyRoleViewModel(PackageReader reader) : base() { // Root = root; ApplicationCollection = new ObservableCollection<ApplicationItemViewModel>(); foreach (string parameter in reader.ReadParameters("assembly")) { ObservableCollection<ItemViewModel> includeCollection = new ObservableCollection<ItemViewModel>(reader.ApplicationIncludeList("assembly", parameter, "include")); ApplicationItemViewModel model = new ApplicationItemViewModel() { Label = "Assembly", EditCollectionViewModel = new EditCollectionViewModel(reader, includeCollection), Name = parameter, // Root = root, }; ApplicationCollection.Add(model); } SourceString = reader.GetRulesSourceStringPropertyValueByName("assembly"); ApplicationCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(base.FilesCollectionCollectionChanged); }
public ManifestViewModel(PackageReader reader) { _manifestCollection = new ObservableCollection<ManifestItemViewModel>(); foreach (string parameter in reader.ReadParameters("manifest")) { var includeCollection = new ObservableCollection<ItemViewModel>(reader.GetRulesSourceValuesByParameterForEditableCollections("manifest", parameter, "include")); var assemblyCollection = new ObservableCollection<ItemViewModel>(reader.GetRulesSourceValuesByParameterForEditableCollections("manifest", parameter, "assembly")); var model = new ManifestItemViewModel() { AssemblyCollection = new EditCollectionViewModel(reader, assemblyCollection), IncludeCollection = new EditCollectionViewModel(reader, includeCollection), Name = parameter, }; _manifestCollection.Add(model); } SourceString = reader.GetRulesSourceStringPropertyValueByName("manifest"); _manifestCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(FilesCollectionCollectionChanged); }
public FilesViewModel(PackageReader reader) { _filesCollection = new ObservableCollection<FilesItemViewModel>(); foreach (string parameter in reader.ReadParameters("files")) { ObservableCollection<ItemViewModel> includeCollection = new ObservableCollection<ItemViewModel>(reader.GetRulesSourceValuesByParameterForEditableCollections("files", parameter, "include")); FilesItemViewModel model = new FilesItemViewModel() { FilesRoot = reader.GetFilesRulesPropertyValueByParameterAndName(parameter, "root"), TrimPath = reader.GetFilesRulesPropertyValueByParameterAndName(parameter, "trim-path"), EditCollectionViewModel = new EditCollectionViewModel(reader, includeCollection), Name = parameter, }; _filesCollection.Add(model); } SourceString = reader.GetRulesSourceStringPropertyValueByName("files"); _filesCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(FilesCollectionCollectionChanged); }
public ApplicationRoleViewModel(PackageReader reader) { _applicationCollection = new ObservableCollection<RoleItemViewModel>(); foreach (string parameter in reader.ReadParameters("application")) { var includeCollection = new ObservableCollection<ItemViewModel>(reader.ApplicationIncludeList("application", parameter, "include")); var model = new RoleItemViewModel() { Label = "Application", EditCollectionViewModel = new EditCollectionViewModel(reader, includeCollection), Name = parameter, }; _applicationCollection.Add(model); } SourceString = reader.GetRulesSourceStringPropertyValueByName("application"); _applicationCollection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(FilesCollectionCollectionChanged); }