public UsingManageViewModel(CommonParam commonParam,
                                    IEnumerable <string> namespaces) : base(commonParam)
        {
            AllItems = new RemovableCollection <NamespaceItem>();
            namespaces.Distinct()
            .ForEach(x => AllItems.Add(new NamespaceItem(x)));

            AddCommand = new DelegateCommand(Add);
        }
Пример #2
0
        public NugetManageViewModel(CommonParam commonParam,
                                    IEnumerable <InstalledPackage> installedPackages) : base(commonParam)
        {
            InstalledPackages = new RemovableCollection <InstalledPackage>();
            installedPackages.ForEach(x => InstalledPackages.Add(x));

            SearchedPackages = new ObservableCollection <SearchedPackage>();

            SearchCommand = new DelegateCommand(async() => await SearchAsync());
        }
Пример #3
0
        public UsingManageViewModel(CommonParam commonParam,
                                    IEnumerable <string> namespaces) : base(commonParam)
        {
            AllItems = new RemovableCollection <NamespaceItem>();
            foreach (var name in namespaces)
            {
                AllItems.Add(new NamespaceItem(name));
            }

            AddCommand = new DelegateCommand(Add);
        }