private RunFunctionViewModel CreateRunFunctionViewModel(FunctionSnapshot function, IEnumerable <FunctionParameterViewModel> parameters, string submitText, Guid?parentId)
 {
     return(new RunFunctionViewModel
     {
         QueueName = function.QueueName,
         FunctionId = function.Id,
         Parameters = parameters,
         ParentId = parentId,
         FunctionName = function.ShortName,
         FunctionFullName = function.FullName,
         HostIsNotRunning = !FunctionsController.HostHasHeartbeat(_heartbeatMonitor, function).GetValueOrDefault(true),
         SubmitText = submitText
     });
 }