-
-
Notifications
You must be signed in to change notification settings - Fork 206
Extend PropertyInitialValueSetEventArgs and PropertyReassignmentEventArgs #839
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
Merged
KirillOsenkov
merged 8 commits into
KirillOsenkov:main
from
YuliiaKovalova:dev/ykovalova/initial_prop_assignment
Feb 12, 2025
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7d2fef2
add ExtendedPropertyInitialValueSetEventArgs that contains informatio…
YuliiaKovalova ef4324a
change message formatting and bump the version
YuliiaKovalova ce50243
remove extra change
YuliiaKovalova aedfe39
add null check
YuliiaKovalova 082f65f
adjust viewer to MSBuild changes
YuliiaKovalova 24f9a6e
small adjustments
YuliiaKovalova d7d3587
Remove dupes for resource names
YuliiaKovalova 9bc29f2
apply optimization for UninitializedPropertyRead
YuliiaKovalova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/StructuredLogger/BinaryLogger/ExtendedPropertyInitialValueSetEventArgs.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using Microsoft.Build.Framework; | ||
|
||
namespace StructuredLogger.BinaryLogger | ||
{ | ||
internal class ExtendedPropertyInitialValueSetEventArgs : BuildMessageEventArgs | ||
{ | ||
/// <summary> | ||
/// Creates an instance of the <see cref="ExtendedPropertyInitialValueSetEventArgs"/> class. | ||
/// </summary> | ||
/// <param name="propertyName">The name of the property.</param> | ||
/// <param name="propertyValue">The value of the property.</param> | ||
/// <param name="propertySource">The source of the property.</param> | ||
/// <param name="file">The file associated with the event.</param> | ||
/// <param name="line">The line number (0 if not applicable).</param> | ||
/// <param name="column">The column number (0 if not applicable).</param> | ||
/// <param name="message">The message of the property.</param> | ||
/// <param name="helpKeyword">The help keyword.</param> | ||
/// <param name="senderName">The sender name of the event.</param> | ||
/// <param name="importance">The importance of the message.</param> | ||
public ExtendedPropertyInitialValueSetEventArgs( | ||
string propertyName, | ||
string propertyValue, | ||
string propertySource, | ||
string file, | ||
int line, | ||
int column, | ||
string message, | ||
string helpKeyword = null, | ||
string senderName = null, | ||
MessageImportance importance = MessageImportance.Low) | ||
: base(subcategory: null, code: null, file: file, lineNumber: line, columnNumber: column, 0, 0, message, helpKeyword, senderName, importance) | ||
{ | ||
PropertyName = propertyName; | ||
PropertyValue = propertyValue; | ||
PropertySource = propertySource; | ||
} | ||
|
||
/// <summary> | ||
/// The name of the property. | ||
/// </summary> | ||
public string PropertyName { get; set; } | ||
|
||
/// <summary> | ||
/// The value of the property. | ||
/// </summary> | ||
public string PropertyValue { get; set; } | ||
|
||
/// <summary> | ||
/// The source of the property. | ||
/// </summary> | ||
public string PropertySource { get; set; } | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
src/StructuredLogger/BinaryLogger/ExtendedPropertyReassignmentEventArgs.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using Microsoft.Build.Framework; | ||
|
||
namespace StructuredLogger.BinaryLogger | ||
{ | ||
internal class ExtendedPropertyReassignmentEventArgs : BuildMessageEventArgs | ||
{ | ||
/// <summary> | ||
/// Creates an instance of the <see cref="PropertyReassignmentEventArgs"/> class. | ||
/// </summary> | ||
/// <param name="propertyName">The name of the property whose value was reassigned.</param> | ||
/// <param name="previousValue">The previous value of the reassigned property.</param> | ||
/// <param name="newValue">The new value of the reassigned property.</param> | ||
/// <param name="file">The file associated with the event.</param> | ||
/// <param name="line">The line number (0 if not applicable).</param> | ||
/// <param name="column">The column number (0 if not applicable).</param> | ||
/// <param name="message">The message of the property.</param> | ||
/// <param name="helpKeyword">The help keyword.</param> | ||
/// <param name="senderName">The sender name of the event.</param> | ||
/// <param name="importance">The importance of the message.</param> | ||
public ExtendedPropertyReassignmentEventArgs( | ||
string propertyName, | ||
string previousValue, | ||
string newValue, | ||
string file, | ||
int line, | ||
int column, | ||
string message, | ||
string helpKeyword = null, | ||
string senderName = null, | ||
MessageImportance importance = MessageImportance.Low) | ||
: base(subcategory: null, code: null, file: file, lineNumber: line, columnNumber: column, 0, 0, message, helpKeyword, senderName, importance) | ||
{ | ||
PropertyName = propertyName; | ||
PreviousValue = previousValue; | ||
NewValue = newValue; | ||
} | ||
|
||
/// <summary> | ||
/// The name of the property whose value was reassigned. | ||
/// </summary> | ||
public string PropertyName { get; set; } | ||
|
||
/// <summary> | ||
/// The previous value of the reassigned property. | ||
/// </summary> | ||
public string PreviousValue { get; set; } | ||
|
||
/// <summary> | ||
/// The new value of the reassigned property. | ||
/// </summary> | ||
public string NewValue { get; set; } | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.