internal void CopyFrom(ServiceMapping mapping) { ServiceName = mapping.ServiceName; ServiceId = mapping.ServiceId; }
private void CopyServiceMappings(Media media) { var c = ServiceMappings.Count; var ec = media.ServiceMappings.Count; while (c > ec) ServiceMappings.Remove(ServiceMappings.ElementAt(--c)); for (var i = 0; i < ec; i++) { ServiceMapping serviceMapping; if (c < i + 1) { serviceMapping = new ServiceMapping(); ServiceMappings.Add(serviceMapping); } else serviceMapping = ServiceMappings.ElementAt(i); serviceMapping.CopyFrom(media.ServiceMappings.ElementAt(i)); } }