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 (require, cordova, undefined) { | |
'use strict'; | |
/** | |
* @private | |
*/ | |
var settings = require('settings'); | |
return { | |
/** |
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 (undefined) { | |
'use strict'; | |
return { | |
/** | |
* Initialises the actionsheet helper on the global scope. | |
*/ | |
init: function () { | |
if (this.useNative()) { | |
console.log('Using native actionsheet'); |
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
using System.Net.Http; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace App.API.Handlers | |
{ | |
/// <summary> | |
/// A custom handler for adding an MD5 hash of the HTTP response content to the HTTP response headers. | |
/// </summary> | |
public class HttpResponseChecksumHandler : DelegatingHandler |
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
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Configuration; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading; | |
using System.Threading.Tasks; |
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
using System; | |
using Newtonsoft.Json; | |
namespace App.API.MediaFormatters | |
{ | |
/// <summary> | |
/// A custom JSON converter, for serialising a value type as a string. | |
/// </summary> | |
public class ValueTypeAsStringJsonConverter : JsonConverter | |
{ |
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
using Microsoft.Practices.ServiceLocation; | |
using StructureMap; | |
namespace App.Configuration | |
{ | |
/// <summary> | |
/// An Inversion of Control container and service locator, for StructureMap. | |
/// </summary> | |
public class StructureMapServiceLocator : ServiceLocatorImplBase | |
{ |
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
/// <summary> | |
/// An attribute to allow a CORS preflight request to a decorated action, returning an HTTP 200 OK status code. | |
/// </summary> | |
/// <remarks>See <see href="http://www.html5rocks.com/en/tutorials/cors/"/> for more details.</remarks> | |
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] | |
public class AllowCorsPreflightAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(HttpActionContext actionContext) | |
{ | |
var headers = actionContext.Request.Headers; |
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
/// <summary> | |
/// Extensions for membership providers. | |
/// </summary> | |
public static class MembershipProviderExtensions | |
{ | |
/// <summary> | |
/// Switches the specified ASP.NET membership user to a clear password format, updating the associated fields. | |
/// </summary> | |
/// <param name="user">The membership user.</param> | |
/// <exception cref="System.ArgumentNullException" /> |