Skip to content

Commit

Permalink
Merge pull request #35 from intelligentplant/v2-working
Browse files Browse the repository at this point in the history
Stop TagValueBuilder.WithError from setting bad quality for null or white space error messages
  • Loading branch information
wazzamatazz committed Nov 26, 2020
2 parents a9543d4 + 06d7bfb commit cc6bf07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/DataCore.Adapter/RealTimeData/TagValueBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,14 @@ public class TagValueBuilder {
/// The updated <see cref="TagValueBuilder"/>.
/// </returns>
/// <remarks>
/// The status of the value will also be set to <see cref="TagValueStatus.Bad"/>.
/// If <paramref name="error"/> is not <see langword="null"/> or white space, the status
/// of the value will also be set to <see cref="TagValueStatus.Bad"/>.
/// </remarks>
public TagValueBuilder WithError(string? error) {
_error = error;
_status = TagValueStatus.Bad;
if (!string.IsNullOrWhiteSpace(error)) {
_status = TagValueStatus.Bad;
}
return this;
}

Expand Down

0 comments on commit cc6bf07

Please sign in to comment.