public static CourseData ToSerializableFormat(this CourseEditorState editorState) { var props = ImmutableList.Create <Prop>(); for (int i = 0; i < editorState.PropOrder.Count; i++) { var editorProp = editorState.Props[editorState.PropOrder[i]]; props = props.Add(new Prop { PropType = editorProp.PropType, Transform = editorProp.Transform }); } return(new CourseData { Id = editorState.Id, Name = editorState.CourseName, Props = props }); }
protected bool Equals(CourseEditorState other) { return(Equals(_transientState, other._transientState) && Equals(_historicalState, other._historicalState)); }