private VariableSet(VariableSet other) { foreach (var kvp in other.Values) Values.Add(kvp.Key, kvp.Value); Values["jsildirectory"] = Program.GetJSILDirectory; }
private static string MakeExceptionMessage(string text, VariableSet vs, string missingKey) { return String.Format( "Failed to expand '{0}' because the variable '{1}' does not exist.\r\nValid variables at this location:\r\n{2}", text, missingKey, String.Join("\r\n", vs.DefinedVariables.OrderBy((v) => v)) ); }
private static string MakeExceptionMessage(string text, VariableSet vs, string missingKey) { return(String.Format( "Failed to expand '{0}' because the variable '{1}' does not exist.\r\nValid variables at this location:\r\n{2}", text, missingKey, String.Join("\r\n", vs.DefinedVariables.OrderBy((v) => v)) )); }
private VariableSet(VariableSet other) { foreach (var kvp in other.Values) { Values.Add(kvp.Key, kvp.Value); } Values["jsildirectory"] = Program.GetJSILDirectory; }
public VariableSet ApplyTo(VariableSet variables) { var result = variables.Clone(); foreach (var kvp in CustomVariables) result[kvp.Key] = BindCustomVariable(kvp.Key); result["ConfigDirectory"] = () => Path; result["OutputDirectory"] = () => OutputDirectory; result["Profile"] = () => Profile; result["Configuration"] = () => SolutionBuilder.Configuration; result["Platform"] = () => SolutionBuilder.Platform; result["Target"] = () => SolutionBuilder.Target; return result; }
static string MapPath(string path, VariableSet variables, bool ensureExists, bool reportErrors = false) { var result = variables.ExpandPath(path, false); if (ensureExists) { if (!Directory.Exists(result) && !File.Exists(result)) { if (reportErrors) { Console.Error.WriteLine("// Could not find file '{0}' -> '{1}'!", path, result); } return(null); } } return(result); }
public VariableSet ApplyTo(VariableSet variables) { var result = variables.Clone(); foreach (var kvp in CustomVariables) { result[kvp.Key] = BindCustomVariable(kvp.Key); } result["ConfigDirectory"] = () => Path; result["OutputDirectory"] = () => OutputDirectory; result["Profile"] = () => Profile; result["Configuration"] = () => SolutionBuilder.Configuration; result["Platform"] = () => SolutionBuilder.Platform; result["Target"] = () => SolutionBuilder.Target; return(result); }
static string MapPath(string path, VariableSet variables, bool ensureExists, bool reportErrors = false) { var result = variables.ExpandPath(path, false); if (ensureExists) { if (!Directory.Exists(result) && !File.Exists(result)) { if (reportErrors) Console.Error.WriteLine("// Could not find file '{0}' -> '{1}'!", path, result); return null; } } return result; }
public VariableExpansionException(string text, VariableSet vs, string missingKey) : base(MakeExceptionMessage(text, vs, missingKey)) { }
public VariableExpansionException(string text, VariableSet vs, string missingKey) : base( MakeExceptionMessage(text, vs, missingKey) ) { }