public PluginTypeDTO(IPluginTypeConfiguration configuration) { profile = configuration.ProfileName; pluginType = configuration.PluginType.GetFullName(); lifecycle = configuration.Lifecycle.GetType().Name.Replace("Lifecycle", ""); if (configuration.Default != null) { defaultInstance = new InstanceDTO(configuration.Default); others = configuration.Instances.Where(x => x.Name != configuration.Default.Name) .Select(x => new InstanceDTO(x)) .ToArray(); } else { others = configuration.Instances.Select(x => new InstanceDTO(x)) .ToArray(); } if (configuration.MissingNamedInstance != null) { missingName = new InstanceDTO(configuration.MissingNamedInstance); } if (configuration.Fallback != null) { fallback = new InstanceDTO(configuration.Fallback); } }