public static void AddDependency(this IOutputTarget outputTarget, IOutputTarget dependency) { if (outputTarget.Equals(dependency)) { throw new Exception($"OutputTarget [{outputTarget}] cannot add a dependency to itself"); } var collection = outputTarget.Dependencies(); if (!collection.Contains(dependency)) { collection.Add(dependency); } }
public bool Equals(IOutputTarget other) { return(_outputTarget.Equals(other)); }