public void init(string assemblyName, string stubName)
{
this.assemblyName = assemblyName;
if (stubName == null)
{
string libPath = Fan.Sys.Sys.m_homeDir + "/lib/tmp";
if (!Directory.Exists(libPath))
Directory.CreateDirectory(libPath);
this.fileName = libPath + "/" + assemblyName + ".dll";
}
else
{
this.fileName = stubName;
this.stubFileName = stubName;
}
peFile = new PEFile(fileName, assemblyName);
if (!debug && !cache)
{
// Normally we have to write the dll to disk in order to get
// the .pdb file. But if we don't need that, we can just
// generate the whole assembly in memory
buf = new MemoryStream(4096);
peFile.SetOutputStream(buf);
}
}