Skip to content

Instantly share code, notes, and snippets.

View labilbe's full-sized avatar

Franck Quintana labilbe

View GitHub Profile
@labilbe
labilbe / main.cs
Last active August 11, 2016 10:42
Checks if an incoming string is HTML encoded
using System;
using System.Web;
// add strings here to check if they are URL encoded
var incomingStrings = new[] {
"not encoded",
"encodéd",
"dslkfjqmsdlkfjsdmfl",
"AbIfZVn4y514sJbt%2BCCMJy6lsmsMi6uOWyhUhynDSf1MEqZ%2FWJnwUuCFO8zMFa4jCRWQrXHKdBaHd9CCdDNfoKDnPg1W9No16JQbL2DBEGg%3D"
};
@labilbe
labilbe / AppServiceBase.cs
Last active October 25, 2015 12:03
WebAppHost sample for ServiceStack
public abstract class AppServiceBase : ServiceStack.Service
{
private ISupplierService _supplierService;
internal ISupplierService SupplierService
{
get { return _supplierService ?? (_supplierService = TryResolve<ISupplierService>()); }
set { _supplierService = value; }
}