Ejemplo n.º 1
0
 private static string GetNewErrorCondition(string oldCondition, IEnumerable <IVsPackageMetadata> packages, string slnDir, string projectDirPath, ModifyPackagePathDelegate modifyPackagePath, MsBuild.Project project)
 {
     return(Regex.Replace
                (oldCondition
                , @"(?<=^!Exists\(').*(?='\)$)"
                , m => modifyPackagePath(MsBuildHelper.Evaluate(m.Value, project), m.Value, packages, slnDir, projectDirPath) ?? m.Value
                ));
 }
Ejemplo n.º 2
0
 private static string GetNewErrorText(string oldText, IEnumerable <IVsPackageMetadata> packages, string slnDir, string projectDirPath, ModifyPackagePathDelegate modifyPackagePath, MsBuild.Project project)
 {
     return(Regex.Replace
                (oldText
                , @"(?<=^\$\(\[System\.String\]::Format\('\$\(ErrorText\)', ').*(?='\)\)$)"
                , m => modifyPackagePath(MsBuildHelper.Evaluate(m.Value, project), m.Value, packages, slnDir, projectDirPath) ?? m.Value
                ));
 }