internal static IScienceActivator GetDefaultScienceActivator(Type type, AutomatedScienceSampler ass) { if (!DefaultActivators.TryGetValue(type, out var result)) { result = (IScienceActivator)Activator.CreateInstance(typeof(GenericDefaultActivator <>).MakeGenericType(type)); result.AutomatedScienceSampler = ass; DefaultActivators.Add(type, result); } return(result); }