/// <summary> /// Gets the engine instance or throws a webfault exception. /// </summary> /// <param name="instanceId">The instance id.</param> /// <returns></returns> private IEngineInstance GetInstanceOrFault(string instanceId) { var instance = _engineManager.GetInstance(instanceId); if (instance == null) { throw new WebFaultException(HttpStatusCode.NotFound); } return(instance); }