/// <summary> /// Returns true if the given equivalence class is consumed by other objects, along /// with a message detailing its uses (otherwise returns false and a null string). /// </summary> public bool EquivalenceClassIsConsumed(string parameter, string equivalenceClass, out string consumers) { consumers = null; string qualifiedEquivalenceClass = $"{parameter}.{equivalenceClass}"; ConsumerObjects consumerObjects = ((_equivalenceClassConsumers == null) || !_equivalenceClassConsumers.ContainsKey(qualifiedEquivalenceClass)) ? null : _equivalenceClassConsumers[qualifiedEquivalenceClass]; if (consumerObjects == null) { return(false); } string consumerList = consumerObjects.ListOfConsumers(); if (string.IsNullOrEmpty(consumerList)) { return(false); } consumers = $"Equivalence class {qualifiedEquivalenceClass} is used by {consumerList}"; return(true); }
/// <summary> /// Returns true if the given parameter is consumed by other objects, along with /// a message detailing its uses (otherwise returns false and a null string). /// </summary> public bool InputParameterIsConsumed(string parameter, out string consumers) { consumers = null; ConsumerObjects consumerObjects = ((_inputParameterConsumers == null) || !_inputParameterConsumers.ContainsKey(parameter)) ? null : _inputParameterConsumers[parameter]; if (consumerObjects == null) { return(false); } string consumerList = consumerObjects.ListOfConsumers(); if (string.IsNullOrEmpty(consumerList)) { return(false); } consumers = $"Input parameter {parameter} is used by {consumerList}"; return(true); }