/// <summary> /// Create a process cluster /// </summary> /// <param name="providerName"></param> /// <param name="config"></param> /// <returns>ICluster</returns> public static ICluster CreateCluster(string providerName, ClusterConfig config) { if (providerName == null) { throw new ArgumentNullException(nameof(providerName)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } if (providers.ContainsKey(providerName)) { return(providers[providerName](config)); } else { throw new ArgumentException($"'{providerName}' isn't a registered provider", nameof(providerName)); } }
/// <summary> /// Returns True if the meta-data contains the key specified /// </summary> public bool MetaDataContains <T>(string key) => Metadata.ContainsKey(key);
/// <summary> /// Checks for existence of a key in the map /// </summary> /// <param name="key">Key to check</param> /// <returns>True if an item with the key supplied is in the map</returns> public static bool containsKey <K, V>(Map <K, V> map, K key) => map.ContainsKey(key);