public HashSet<string> PreviewCloneDependencies(FileData file, CloneObjectParameters cloneParameters)
{
ModuleFile owningFile = (file as IModuleFileData).GetModuleFile();
if (owningFile != null)
{
return PreviewCloneDependencies(owningFile, cloneParameters);
}
HashSet<string> alreadyCloned = new HashSet<string>();
string newPath = cloneParameters.TransformParameter(file.Path);
// Code will only get here if owningFile is null, so calling the below will cause a null ref exception when indexing the owningFile
// .Replace(owningFile.Module.Name, cloneParameters.TargetModule);
file.Clone(newPath, cloneParameters, alreadyCloned, false);
return alreadyCloned;
}