Example #1
0
        private void MappedNode_Changed(WixFileNode oldValue, WixFileNode newValue)
        {
            if (oldValue != null)
            {
                _allUnmappedFiles.Add(new UnmappedFile(oldValue, _allUnmappedFiles));
                _wixProject.UnmapFile(TargetName);
                _allUnmappedProjectOutputs.Add(_projectOutput);
            }

            if (newValue != null)
            {
                var unmappedFile = _allUnmappedFiles.FirstOrDefault(file => Equals(file.Node, newValue));
                _allUnmappedFiles.Remove(unmappedFile);
                _wixProject.MapFile(TargetName, newValue);
                _allUnmappedProjectOutputs.Remove(_projectOutput);
            }

            UpdateMappingState();
        }