-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend property assignment event (The feature is opted-out by default) #11106
base: main
Are you sure you want to change the base?
Changes from all commits
d9f7791
1988391
c034187
9de0ce2
b1ed4a4
9bd143e
923e833
bf37922
7da96c3
e7f4df1
047bd55
b81fac7
6ed8628
05dad6d
9964cb9
75fe784
aa62e8c
ee58f18
9a5ad3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,6 +146,11 @@ public class BuildParameters : ITranslatable | |
/// </summary> | ||
private PropertyDictionary<ProjectPropertyInstance> _globalProperties = new PropertyDictionary<ProjectPropertyInstance>(); | ||
|
||
/// <summary> | ||
/// Properties passed from the command line (e.g. by using /p:). | ||
/// </summary> | ||
private HashSet<string> _propertiesFromCommandLine; | ||
|
||
/// <summary> | ||
/// The loggers. | ||
/// </summary> | ||
|
@@ -250,6 +255,7 @@ public BuildParameters(ProjectCollection projectCollection) | |
_defaultToolsVersion = projectCollection.DefaultToolsVersion; | ||
|
||
_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(projectCollection.GlobalPropertiesCollection); | ||
_propertiesFromCommandLine = projectCollection.PropertiesFromCommandLine; | ||
} | ||
|
||
/// <summary> | ||
|
@@ -279,6 +285,7 @@ internal BuildParameters(BuildParameters other, bool resetEnvironment = false) | |
_environmentProperties = other._environmentProperties != null ? new PropertyDictionary<ProjectPropertyInstance>(other._environmentProperties) : null; | ||
_forwardingLoggers = other._forwardingLoggers != null ? new List<ForwardingLoggerRecord>(other._forwardingLoggers) : null; | ||
_globalProperties = other._globalProperties != null ? new PropertyDictionary<ProjectPropertyInstance>(other._globalProperties) : null; | ||
_propertiesFromCommandLine = other._propertiesFromCommandLine != null ? new HashSet<string>(other._propertiesFromCommandLine) : null; | ||
HostServices = other.HostServices; | ||
_loggers = other._loggers != null ? new List<ILogger>(other._loggers) : null; | ||
_maxNodeCount = other._maxNodeCount; | ||
|
@@ -472,6 +479,11 @@ public IDictionary<string, string> GlobalProperties | |
} | ||
} | ||
|
||
/// <summary> | ||
/// Properties passed from the command line (e.g. by using /p:). | ||
/// </summary> | ||
public HashSet<string> PropertiesFromCommandLine => _propertiesFromCommandLine; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I think this isn't quite what we want, instead we want "global properties set for the whole build", independent of whether that's through the API or command line args. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we already have it, don't we ? I was adding it to fulfill this requirement There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you please clarify if we need this additional classification or not? |
||
|
||
/// <summary> | ||
/// Interface allowing the host to provide additional control over the build process. | ||
/// </summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still validate the source? or does it not make sense now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't pass the source if File path is known. It seems to be excessive now.