public void RegisterTargetPlatformForDesignModelType(string designModelType, ITargetPlatform targetPlatform, bool replace = false) { if (replace && _targetPlatformByDesignModelTypeMap.ContainsKey(designModelType)) { _targetPlatformByDesignModelTypeMap.Remove(designModelType); } _targetPlatformByDesignModelTypeMap.Add(designModelType, targetPlatform); }
public void RegisterTargetPlatform(ITargetPlatform targetPlatform, bool overwrite = false) { if (_map.ContainsKey(targetPlatform.Name)) { if (overwrite) { _map.Remove(targetPlatform.Name); } else { throw new ConfigurationException($"Target platform '{targetPlatform.Name}' is already registered."); } } _map[targetPlatform.Name] = targetPlatform; }