/// <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()); } } }
/// <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()); } } }
/// <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; }