Skip to content

Commit

Permalink
Initialize onlineRequestState to Complete for parameters and matrices
Browse files Browse the repository at this point in the history
References #8
  • Loading branch information
andreashuber-lawo committed Jan 5, 2016
1 parent 5f2907e commit 7f1ea9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Lawo.EmberPlusSharp/Model/ElementWithSchemas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public abstract class ElementWithSchemas<TMostDerived> : Element<TMostDerived>,
/// are changed at once in a large tree.</item>
/// </list>
/// </remarks>
private RequestState onlineRequestState;
private RequestState offlineRequestState = RequestState.Complete;
private RequestState onlineRequestState;

private IReadOnlyList<string> schemaIdentifiers;

Expand All @@ -56,8 +56,9 @@ public IReadOnlyList<string> SchemaIdentifiers

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

internal ElementWithSchemas()
internal ElementWithSchemas(RequestState onlineRequestState)
{
this.onlineRequestState = onlineRequestState;
}

/// <summary>Gets or sets the request state.</summary>
Expand Down
4 changes: 2 additions & 2 deletions Lawo.EmberPlusSharp/Model/Matrix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ internal override RequestState ReadContents(EmberReader reader, ElementType actu
////}

////this.SetFinalTytpe(valueType, enumType, typeType);
return RequestState.Complete;
return this.RequestState;
}

internal sealed override void WriteChanges(EmberWriter writer, IInvocationCollection invocationCollection)
Expand Down Expand Up @@ -216,7 +216,7 @@ internal sealed override void WriteChanges(EmberWriter writer, IInvocationCollec

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

private Matrix()
private Matrix() : base(RequestState.Complete)
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion Lawo.EmberPlusSharp/Model/NodeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void IParent.OnPropertyChanged(PropertyChangedEventArgs e)
this.OnPropertyChanged(e);
}

internal NodeBase()
internal NodeBase() : base(RequestState.None)
{
}

Expand Down
4 changes: 2 additions & 2 deletions Lawo.EmberPlusSharp/Model/ParameterBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ IReadOnlyList<KeyValuePair<string, int>> IParameter.EnumMap
get { return this.EnumMapCore; }
}

internal ParameterBase()
internal ParameterBase() : base(RequestState.Complete)
{
}

Expand Down Expand Up @@ -298,7 +298,7 @@ internal override RequestState ReadContents(EmberReader reader, ElementType actu
}

this.SetFinalTytpe(valueType, enumType, typeType);
return RequestState.Complete;
return this.RequestState;
}

internal sealed override void WriteChanges(EmberWriter writer, IInvocationCollection invocationCollection)
Expand Down

0 comments on commit 7f1ea9b

Please sign in to comment.