ComparisonCheck is not initialized
Issue #82
resolved
In my use case, i am using ObjectProvider and ConstantObjectProvider in ComparisonCheck.
Object provider is enabled and then ConstantObjectProvider and ComparisonChecks are enabled. Unfortunatelly, the result of ComparisonCheck when it gets enabled is always false. I have to change the value of ObjectProvider or ConstantObjectProvider to calculate right value.
I have changed the constructor of ComparisonCheckprovider to
public ComparisonCheck(IDataProvider firstProvider, IDataProvider secondProvider,
ComparisonType comparisonType)
{
this.firstProvider = firstProvider;
this.firstProvider.ValueChanged += this.OnProviderValueChanged;
this.secondProvider = secondProvider;
this.secondProvider.ValueChanged += this.OnProviderValueChanged;
this.comparisonType = comparisonType;
// Initial value
this.Value = Compare(this.firstProvider.Value, this.secondProvider.Value, this.comparisonType);
}
i have added calculation of the value to the constructor and it seems to be working. may i ask you to re-check it and if possible to fix it in the next release? Any kind of fix is welcomed :)
Comments (5)
-
repo owner -
repo owner - changed milestone to 1.15
-
repo owner Thanks, I fixed the issue with the fix you proposed
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 1.15 (automated comment)
- Log in to comment
Thanks a lot for the report!
I will have a look at it tomorrow or on Friday :)