public GetMSBuildPropertyValue ( Project project, string propName ) : string | ||
project | Project | |
propName | string | |
return | string |
private void UpdateConfigurationForProject(IVsHierarchy project) { if (project == null) { return; } IEnumerable <CmdArgument> checkedArgs = ToolWindowViewModel.TreeViewModel.Projects.GetValueOrDefault(project.GetGuid())?.CheckedArguments; if (checkedArgs == null) { return; } IEnumerable <string> enabledEntries; if (IsMacroEvaluationEnabled) { enabledEntries = checkedArgs.Select( e => msBuildPropertyRegex.Replace(e.Value, match => vsHelper.GetMSBuildPropertyValue(project, match.Groups["propertyName"].Value) ?? match.Value)); } else { enabledEntries = checkedArgs.Select(e => e.Value); } string prjCmdArgs = string.Join(" ", enabledEntries); ProjectArguments.SetArguments(project, prjCmdArgs); Logger.Info($"Updated Configuration for Project: {project.GetName()}"); }
private void UpdateConfigurationForProject(Project project) { if (project == null) { return; } IEnumerable <string> enabledEntries; if (IsMacroEvaluationEnabled) { enabledEntries = ToolWindowViewModel.EnabledItemsForCurrentProject().Select( e => msBuildPropertyRegex.Replace(e.Command, match => vsHelper.GetMSBuildPropertyValue(project.UniqueName, match.Groups["propertyName"].Value) ?? match.Value)); } else { enabledEntries = ToolWindowViewModel.EnabledItemsForCurrentProject().Select(e => e.Command); } string prjCmdArgs = string.Join(" ", enabledEntries); ProjectArguments.SetArguments(project, prjCmdArgs); Logger.Info($"Updated Configuration for Project: {project.UniqueName}"); }