Beispiel #1
0
 /// <summary>
 /// Returns whether debug mode is enabled.
 /// </summary>
 /// <param name="configuration">Compiler configuration.</param>
 /// <rereturns>Whether debug mode is enabled.</rereturns>
 public static bool IsDebugMode(this ICompilerConfiguration configuration)
 {
     Ensure.NotNull(configuration, "configuration");
     return(configuration.Get("IsDebugMode", false));
 }
Beispiel #2
0
 /// <summary>
 /// Returns path to temp directory.
 /// </summary>
 /// <param name="configuration">Compiler configuration.</param>
 /// <returns>Path to temp directory.</returns>
 public static string TempDirectory(this ICompilerConfiguration configuration)
 {
     Ensure.NotNull(configuration, "configuration");
     return(configuration.Get("TempDirectory", Path.GetTempPath()));
 }
Beispiel #3
0
 /// <summary>
 /// Returns behavior instance generator.
 /// </summary>
 /// <param name="configuration">Compiler configuration.</param>
 /// <param name="defaultValue">Fallback value, when <paramref name="configuration"/> doesn't contain generator.</param>
 /// <returns>Behavior instance generator.</returns>
 public static ICodeDomBehaviorGenerator GetBehaviorGenerator(this ICompilerConfiguration configuration, ICodeDomBehaviorGenerator defaultValue)
 {
     Ensure.NotNull(configuration, "configuration");
     return(configuration.Get <ICodeDomBehaviorGenerator>("BehaviorGenerator", defaultValue));
 }