/// <summary> /// Add the compilation level to the params. /// </summary> /// <param name="closureCompliationMode">the compilation mode</param> public void AddCompilationLevel(ClosureCompilerMode? closureCompliationMode) { string mode = GetCompilationModeFromEnum(ClosureCompilerMode.Whitespace); if( closureCompliationMode != null) { mode = GetCompilationModeFromEnum(closureCompliationMode); } this.AddParam("compilation_level", mode); }
private static string GetCompilationModeFromEnum(ClosureCompilerMode? closureCompliationMode) { switch (closureCompliationMode) { case ClosureCompilerMode.Advanced: return "ADVANCED_OPTIMIZATIONS"; case ClosureCompilerMode.Simple: return "SIMPLE_OPTIMIZATIONS"; case ClosureCompilerMode.Whitespace: return "WHITESPACE_ONLY"; case ClosureCompilerMode.Raw: return "RAW"; } return null; }