public void SetDestinationForFormat(string format, Destination destination) { if (destinationByFormat.ContainsKey(format)) { if (!destination.Id.Equals(destinationByFormat[format])) { destinationByFormat[format].RemoveFormat(format); destination.AddFormat(format); destinationByFormat[format] = destination; } } else { destination.AddFormat(format); destinationByFormat.Add(format, destination); } }