in JetBrains.Profiler.SelfApi/src/DotMemory.cs [71:78]
public Config SaveToDir(string dirPath)
{
if (WorkspaceDir != null)
throw new InvalidOperationException("The SaveToDir and SaveToFile are mutually exclusive.");
WorkspaceDir = dirPath ?? throw new ArgumentNullException(nameof(dirPath));
return this;
}