ComparisonCheck is not initialized

Issue #82 resolved
Jan D created an issue

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)

  1. Log in to comment