-
Notifications
You must be signed in to change notification settings - Fork 5
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 optional flag to disable exception on dependency check fail #25
Conversation
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.
Adding optional parameter to the ctor is not backward compatible change. Consider to add separate constructor with throwExceptionOnFail
flag. This will allow to use old code, which is referenced to the old version of the SettingsReader with new SettingReader version actually referenced by the entry-point assembly.
@@ -4,9 +4,19 @@ namespace Lykke.SettingsReader.Attributes | |||
{ | |||
public class AmqpCheckAttribute : BaseCheckAttribute |
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.
Plz add a description. It is a public shared class with an unclear name.
} | ||
|
||
var checkResult = checker.CheckField(model, property.Name, val); | ||
Console.WriteLine(checkResult.Description); | ||
if (!checkResult.Result && checkResult.ThrowExceptionOnFail) |
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.
Will be better to incapsulate this check and exception throwing into the FieldCheckResult.ThrowIfFailed()
method or something like this.
No description provided.