From 60859a4592e67b5f26e740b4cfe8a1e5855c6499 Mon Sep 17 00:00:00 2001 From: andreashuber-lawo Date: Wed, 6 Jan 2016 11:32:37 +0100 Subject: [PATCH] Set RequestState directly rather than through SetRequestState References #8 --- Lawo.EmberPlusSharp/Model/Node.cs | 3 +-- Lawo.EmberPlusSharp/Model/ParameterBase.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Lawo.EmberPlusSharp/Model/Node.cs b/Lawo.EmberPlusSharp/Model/Node.cs index 93e3cfb2..8ca8fa36 100644 --- a/Lawo.EmberPlusSharp/Model/Node.cs +++ b/Lawo.EmberPlusSharp/Model/Node.cs @@ -101,8 +101,7 @@ internal sealed override RequestState ReadContents(EmberReader reader, ElementTy break; case GlowNodeContents.IsOnline.OuterNumber: this.IsOnline = reader.AssertAndReadContentsAsBoolean(); - var newRequestState = this.RequestState & RequestState.Complete; - this.SetRequestState(false, ref newRequestState); + this.RequestState &= RequestState.Complete; break; case GlowNodeContents.SchemaIdentifiers.OuterNumber: this.ReadSchemaIdentifiers(reader); diff --git a/Lawo.EmberPlusSharp/Model/ParameterBase.cs b/Lawo.EmberPlusSharp/Model/ParameterBase.cs index c0e814b0..13e4b940 100644 --- a/Lawo.EmberPlusSharp/Model/ParameterBase.cs +++ b/Lawo.EmberPlusSharp/Model/ParameterBase.cs @@ -294,8 +294,7 @@ internal override RequestState ReadContents(EmberReader reader, ElementType actu this.IsOnline = reader.AssertAndReadContentsAsBoolean(); var send = (this.IsOnlineChangeStatus == IsOnlineChangeStatus.Changed) && this.IsOnline && this.StreamIdentifier.HasValue; - var newRequestState = this.RequestState & (send ? RequestState.None : RequestState.Complete); - this.SetRequestState(false, ref newRequestState); + this.RequestState &= send ? RequestState.None : RequestState.Complete; break; case GlowParameterContents.Formula.OuterNumber: this.FormulaCore = reader.AssertAndReadContentsAsString();