/// <summary> /// Create reference api model /// </summary> /// <param name="model"></param> public NodePathTargetApiModel(NodePathTargetModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } BrowsePath = model.BrowsePath; RemainingPathIndex = model.RemainingPathIndex; Target = model.Target == null ? null : new NodeApiModel(model.Target); }
/// <summary> /// Create reference api model /// </summary> /// <param name="model"></param> public static NodePathTargetApiModel ToApiModel( this NodePathTargetModel model) { if (model == null) { return(null); } return(new NodePathTargetApiModel { BrowsePath = model.BrowsePath, RemainingPathIndex = model.RemainingPathIndex, Target = model.Target.ToApiModel() }); }