public IComponentModelDTO Create(CreateDTO value) { switch (value) { case CreateDTO.ComponentModel: return new ComponentModelDTO (); case CreateDTO.ResponseMethod: ResponseMethodDTO responseMethodDTO = new ResponseMethodDTO (); responseMethodDTO.SetExecutionSuccess (false); //Por defecto inicializará a false. return responseMethodDTO; default: return null; } }
private void CallBackExecuteRedirectView() { lock (responseMethodDTO) { responseMethodDTO = (ResponseMethodDTO)FactoryDTO.Instance.Create (CreateDTO.ResponseMethod); object ret = methodToExecute.Invoke (componentModel, parameters); responseMethodDTO.MethodResult = ret; responseMethodDTO.SetExecutionSuccess (true); if (componentModel.VirtualMethod != null) { componentModel.VirtualMethod (responseMethodDTO); componentModel.VirtualMethod = null; } methodToResponse.Invoke (viewHandler, new object[] {responseMethodDTO}); } }