Exemplo n.º 1
0
        public void AddOrUpdatePackageSourceMappingSourceItem(PackageSourceMappingSourceItem packageSourceMappingSourceItem)
        {
            if (packageSourceMappingSourceItem == null)
            {
                throw new ArgumentNullException(nameof(packageSourceMappingSourceItem));
            }

            _settings.AddOrUpdate(ConfigurationConstants.PackageSourceMapping, packageSourceMappingSourceItem);

            _settings.SaveToDisk();
        }
Exemplo n.º 2
0
        public override SettingBase Clone()
        {
            var newItem = new PackageSourceMappingSourceItem(
                Key,
                Patterns.Select(c => c.Clone() as PackagePatternItem).ToArray());

            if (Origin != null)
            {
                newItem.SetOrigin(Origin);
            }

            return(newItem);
        }