Example #1
0
 /// <summary>
 /// Reads the script text from an embedded resource file, replacing any variable references with the
 /// variable's value.
 /// </summary>
 /// <param name="scriptFile">The embedded resurce script file.</param>
 /// <returns>The processed script text.</returns>
 private string LoadScript(IStaticFile scriptFile)
 {
     using (var reader = scriptFile.OpenReader())
     {
         using (var preprocessReader = new PreprocessReader(reader, variables))
         {
             return(preprocessReader.ReadToEnd());
         }
     }
 }
Example #2
0
 /// <summary>
 /// Reads the script text from an embedded resource file, replacing any variable references with the
 /// variable's value.
 /// </summary>
 /// <param name="scriptFile">The embedded resurce script file.</param>
 /// <returns>The processed script text.</returns>
 private string LoadScript(IStaticFile scriptFile)
 {
     using (var reader = scriptFile.OpenReader())
     {
         using (var preprocessReader = new PreprocessReader(reader, variables))
         {
             preprocessReader.VariableExpansionRegex = PreprocessReader.CurlyVariableExpansionRegex;
             return(preprocessReader.ReadToEnd());
         }
     }
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the DefaultPathUtility class.
 /// </summary>
 /// <param name="staticPath">Static path.</param>
 /// <param name="staticDirectory">Static directory.</param>
 /// <param name="staticFile">Static file.</param>
 public DefaultPathUtility(IStaticPath staticPath, IStaticDirectory staticDirectory, IStaticFile staticFile)
 {
     this.staticPath = staticPath;
     this.staticDirectory = staticDirectory;
     this.staticFile = staticFile;
 }