public ProjectBuildInfo(ProjectStartedEventArgs projectStartedEventArgs, IReadOnlyDictionary <int, ProjectBuildInfo> otherProjects, Dictionary <string, SortedSet <GlobalPropertyValue> > globalPropertySubsets) { StartedEventArgs = projectStartedEventArgs; ParentProjectInstanceId = projectStartedEventArgs.ParentProjectBuildEventContext.ProjectInstanceId; ProjectInstanceId = projectStartedEventArgs.BuildEventContext.ProjectInstanceId; GlobalProperties = projectStartedEventArgs.GlobalProperties ?? new Dictionary <string, string>(); _globalPropertySubsets = globalPropertySubsets; if (GlobalProperties == null) { return; } if (otherProjects.TryGetValue(ParentProjectInstanceId, out ProjectBuildInfo other)) { foreach (var propertyName in other.GlobalProperties.Keys) { if (!GlobalProperties.TryGetValue(propertyName, out _)) { RemovedProperties[propertyName] = other.GlobalProperties[propertyName]; } } } }
private T GetValue() { T val; GlobalProperties <T> .TryGetValue(m_PropertyReference, out val); return(val); }
public T GetPropertyValue <T>(Guid id, out bool validId) { T val; validId = GlobalProperties <T> .TryGetValue(id, out val); return(val); }