public void Delete(string id)
{
ITracer tracer = _traceFactory.GetTracer();
using (tracer.Step($"DeploymentManager.Delete(id:{id})"))
{
string path = GetRoot(id, ensureDirectory: false);
if (!FileSystemHelpers.DirectoryExists(path))
{
throw new DirectoryNotFoundException(String.Format(CultureInfo.CurrentCulture, Resources.Error_UnableToDeleteNoDeploymentFound, id));
}
if (IsActive(id))
{
throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_UnableToDeleteDeploymentActive, id));
}
_status.Delete(id);
}
}