// // Helper methods // internal static CompilerType GetCompilerTypeFromBuildProvider( BuildProvider buildProvider) { HttpContext context = null; if (EtwTrace.IsTraceEnabled(EtwTraceLevel.Verbose, EtwTraceFlags.Infrastructure) && (context = HttpContext.Current) != null) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PARSE_ENTER, context.WorkerRequest); } try { CompilerType compilerType = buildProvider.CodeCompilerType; if (compilerType != null) { CompilationUtil.CheckCompilerOptionsAllowed(compilerType.CompilerParameters.CompilerOptions, false /*config*/, null, 0); } return(compilerType); } finally { if (EtwTrace.IsTraceEnabled(EtwTraceLevel.Verbose, EtwTraceFlags.Infrastructure) && context != null) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PARSE_LEAVE, context.WorkerRequest); } } }
internal static CompilerType GetCompilerTypeFromBuildProvider(System.Web.Compilation.BuildProvider buildProvider) { HttpContext context = null; CompilerType type2; if (EtwTrace.IsTraceEnabled(5, 1) && ((context = HttpContext.Current) != null)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PARSE_ENTER, context.WorkerRequest); } try { CompilerType codeCompilerType = buildProvider.CodeCompilerType; if (codeCompilerType != null) { CompilationUtil.CheckCompilerOptionsAllowed(codeCompilerType.CompilerParameters.CompilerOptions, false, null, 0); } type2 = codeCompilerType; } finally { if (EtwTrace.IsTraceEnabled(5, 1) && (context != null)) { EtwTrace.Trace(EtwTraceType.ETW_TYPE_PARSE_LEAVE, context.WorkerRequest); } } return(type2); }