Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace StructuredLogger.BinaryLogger
{
internal class ExtendedPropertyInitialValueSetEventArgs : BuildMessageEventArgs
public class ExtendedPropertyInitialValueSetEventArgs : PropertyInitialValueSetEventArgs
{
/// <summary>
/// Creates an instance of the <see cref="ExtendedPropertyInitialValueSetEventArgs"/> class.
Expand All @@ -28,26 +28,8 @@ public ExtendedPropertyInitialValueSetEventArgs(
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)
: base(propertyName, propertyValue, propertySource, 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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace StructuredLogger.BinaryLogger
{
internal class ExtendedPropertyReassignmentEventArgs : BuildMessageEventArgs
public class ExtendedPropertyReassignmentEventArgs : PropertyReassignmentEventArgs
{
/// <summary>
/// Creates an instance of the <see cref="PropertyReassignmentEventArgs"/> class.
Expand All @@ -28,26 +28,8 @@ public ExtendedPropertyReassignmentEventArgs(
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)
: base(propertyName, previousValue, newValue, location: message, message)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we can't just call this constructor directly? Why do we need our own type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point and now I can't justify why these were added on the first place.
Removed.

{
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; }
}
}