public static IMethodReturn ToMethodReturn(this IActionReturn @this, IMethodReturn res, IMethodInvocation original) { if (res != null) { if (@this.Exception != null) { res.Exception = @this.Exception; } else { res.ReturnValue = @this.Value; for (var i = 0; i < @this.Outputs.Count; i++) { res.Outputs[i] = @this.Outputs[i].Value; } } return(res); } else { return((@this.Exception != null) ? new VirtualMethodReturn(original, @this.Exception) : new VirtualMethodReturn(original, @this.Value, @this.Outputs.Select(x => x.Value).ToArray())); } }
public void AfterInvocation(IActionReturn actionReturn) { if (doAfterInvocation != null) { doAfterInvocation(actionReturn); } }
public IActionResult GetUserByUserName(string AppID, string userName) { try { IActionReturn result = _userProfile.GetUserByUserName(AppID, userName); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult DeleteCustomUserRoleByUserID(int UserID) { try { IActionReturn result = _userProfile.DeleteCustomUserRoleByUserID(UserID); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult UpdateCustomRole([FromBody] CustomRole newRole) { try { IActionReturn result = _userProfile.UpdateCustomRole(newRole); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult CreateCustomUserRole([FromBody] List <CustomUserRoleId> userRoleList) { try { IActionReturn result = _userProfile.CreateCustomUserRole(userRoleList); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult CreateUser([FromBody] CustomUserProfile userInfo) { try { IActionReturn result = _userProfile.CreateUser(userInfo); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult GetCustomerRoleByRoleName(string AppID, string roleName) { try { IActionReturn result = _userProfile.GetCustomRoleByRoleName(AppID, roleName); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult GetUserByID(int id) { try { IActionReturn result = _userProfile.GetUserByID(id); return(Ok(result)); } catch (Exception exception) { return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult GetAllUsersByAppID(string AppID) { try { IActionReturn result = _userProfile.GetAllUsersByAppID(AppID); return(Ok(result)); } catch (Exception exception) { _logger.LogError("Customer Profile Failed GetAllUsers for Username: {0} logged in at {1}", AppID, DateTime.Now, exception.Message); return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult GetRoleByID(int Id) { try { IActionReturn result = _iRole.GetRoleByID(Id); return(Ok(result)); } catch (Exception exception) { _logger.LogError("Role Failed GetRoleByID for Id: {0} logged in at {1} with Error {2}", Id, DateTime.Now, exception.Message); return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult DeletePageRoleByPageID(int PageID) { try { IActionReturn result = _iRole.DeletePageRoleByPageID(PageID); return(Ok(result)); } catch (Exception exception) { _logger.LogError("Role Failed DeletePageRoleByPageID for Id: {0} logged in at {1} with Error {2}", PageID, DateTime.Now, exception.Message); return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult AuthenticateUser(string UserName, string Password, string SecurityGroupArray) { try { IActionReturn result = _login.AuthenticateUser(UserName, Password, SecurityGroupArray); return(Ok(result)); } catch (Exception exception) { _logger.LogError("Login Failed AuthenticateUser for Input: {0} logged in at {1} with Error {2}", UserName, DateTime.Now, exception.Message); return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult GetAllUsers() { try { IActionReturn result = _userProfile.GetAllUsers(); return(Ok(result)); } catch (Exception exception) { _logger.LogError("Customer Profile Failed GetAllUsers logged in at {0} with error Message {1}", DateTime.Now, exception.Message); return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public IActionResult GetAllPagesByAppID(string AppID) { try { IActionReturn result = _iRole.GetAllPagesByAppID(AppID); return(Ok(result)); } catch (Exception exception) { _logger.LogError("Role Failed GetAllPagesByAppID for AppID: {0} logged in at {1} with Error {2}", AppID, DateTime.Now, exception.Message); return(StatusCode((int)HttpStatusCode.InternalServerError, exception)); } }
public static IActionReturn ApplyMethodReturn(this IActionReturn @this, IMethodReturn res) { if (res != null) { if (res.Exception != null) { @this.Exception = res.Exception; } else { @this.Value = res.ReturnValue; for (var i = 0; i < res.Outputs.Count; i++) { @this.Outputs[i].Value = res.Outputs[i]; } } } return(@this); }
public void AfterInvocation(IActionReturn actionReturn) { if (doAfterInvocation != null) doAfterInvocation(actionReturn); }
public void AfterInvocation(IActionReturn actionInvocation) { }
public IActionResult Get(int id) { IActionReturn result = userProfile.GetUserByID(id); return(Ok(result)); }
public IActionResult Get() { IActionReturn result = userProfile.GetAllUsers(); return(Ok(result)); }
public IActionResult Post([FromBody] CustomUserProfile userInfo) { IActionReturn result = userProfile.CreateUser(userInfo); return(Ok(result)); }