public CSharpCompiler(RazorReferenceManagerImp manager, string appName, bool isDevelopment) { _referenceManager = manager ?? throw new ArgumentNullException(nameof(manager)); _appName = appName ?? throw new ArgumentNullException(nameof(appName)); _isDevelopment = isDevelopment; EmitOptions = new EmitOptions(debugInformationFormat: _pdbFormat); }
public RazorTemplate() { var curAssemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name; this.referenceManager = new RazorReferenceManagerImp(AssemblyDiscovery.GetAllLoaded()); this.compiler = new CSharpCompiler(this.referenceManager, curAssemblyName, Development.IsAttached); this.razorViewExecutor = new RazorViewExecutor(); }