/// <summary> /// Initializes a new instance of the <see cref="Storyline"/> class. /// </summary> /// <param name="storyline">The <see cref="Storyline"/> for which to create this viewmodel.</param> /// <param name="getIdForModelFunc">A function returning the Id for the provided model.</param> public StorylineViewModel(RedYarn.Storyline storyline, Func <object, Guid> getIdForModelFunc = null) { if (getIdForModelFunc != null) { Id = getIdForModelFunc(storyline); } Name = storyline.Name; Description = storyline.Description; }
/// <summary> /// Initializes a new instance of the <see cref="StorylineViewModel"/> class. /// </summary> /// <param name="storyline">The <see cref="Storyline"/> for which to create this viewmodel.</param> /// <param name="storylineNode">The <see cref="StorylineNode"/> with which to create this viewmodel.</param> /// <param name="getIdForModelFunc">A function returning the Id for the provided model.</param> public StorylineViewModel(RedYarn.Storyline storyline, Database.StorylineNode storylineNode, Func <object, Guid> getIdForModelFunc = null) : this(storyline, storylineNode.XPosition, storylineNode.YPosition, getIdForModelFunc) { }