-
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
Added constructors with name argument to the target types #1434
Merged
Conversation
This file contains 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
Resolves issues #1297. Added constructors to the Target classes with a string parameter for the Target name. Added a unit test to check that each Target class can be constructed with new constructor and default constructor and that objects will have the same property values (other than name).
Changed calls to PropertyInfo.GetValue in unit test to work on other platforms than .NET 4.5.
Compare all properties, not just public ones. Need to filter SyncRoot since it will differ per instance. Fix comparison to properly compare values of properties from each instance.
Execute efreshFileArchive() + RefreshArchiveFilePatternToWatch() only after first initialize (because of potentional stackoverflow)
Current coverage is 75.63%
@@ master #1434 diff @@
==========================================
Files 268 268
Lines 16049 16213 +164
Methods 0 0
Messages 0 0
Branches 1737 1738 +1
==========================================
+ Hits 12081 12262 +181
+ Misses 3546 3526 -20
- Partials 422 425 +3
|
@@ -87,13 +87,23 @@ public class AsyncTargetWrapper : WrapperTargetBase | |||
/// Initializes a new instance of the <see cref="AsyncTargetWrapper" /> class. | |||
/// </summary> | |||
public AsyncTargetWrapper() | |||
: this(null) | |||
: this((Target)null) |
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.
Breaking?
//clear cache | ||
cachedCleanedFileNamed = null; | ||
} | ||
var simpleLayout = value as SimpleLayout; |
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.
Fix indentation
fix & check unit test
AppVeyor/pr passed, so I assume it is safe to merge this. |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added "name" to the constructors of all the Targets.
target(string name)
target(string name, params Target target)
target(string name, params Target[] targetst)
supersedes #1370
fixes #1297
Thanks @flyingcroissant !