This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Amikiri/src/Amikiri.Api/Infrastructure/Filters/ValidationExceptionFilter.cs | |
namespace Amikiri.Api.Infrastructure.Filters | |
{ | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Web.Http.Filters; | |
using global::FluentValidation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UnhandledExceptionFilterAttribute.cs | |
// http://stackoverflow.com/questions/12519561/throw-httpresponseexception-or-return-request-createerrorresponse | |
// http://pastebin.com/Uu65fRwT | |
// https://blog.iamandycohen.com/2013/02/09/webapi-and-the-behavior-of-exceptions-and-an-alternative-configurable-way-to-deal/ | |
// https://github.com/iamandycohen/Omegaluz.GlobalApiExceptions/blob/master/ExampleApi/App_Start/WebApiExceptionConfig.cs | |
namespace Northwind.WebApi2Services.Filters | |
{ | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var startModule = function (jQuery,userInfoWeb,userInfoProfile) { | |
function ShowUserName() { | |
userInfoWeb.getUserName(); | |
userInfoProfile.getUserName(); | |
}; | |
SP.SOD.loadMultiple(['sp.js', 'userprofile'], ShowUserName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var userProfileModule = function (jQuery) { | |
// Define user class/module | |
var userProfileInfoModule = function () { | |
function _getUserName() { | |
var userProfileProperties; | |
//Get Current Context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var userInfoWebModule = function (jQuery) { | |
// Define user class/module | |
var userModule = function () { | |
function _getUserName() { | |
var context = SP.ClientContext.get_current(); | |
var user = context.get_web().get_currentUser(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
//debugger; | |
var rconfig = { | |
baseUrl: '../Scripts/app', | |
deps: | |
[ | |
'spruntime_js','sp_js' | |
], | |
paths: { |
NewerOlder