Skip to content

Instantly share code, notes, and snippets.

View strvmarv's full-sized avatar

Paul M strvmarv

View GitHub Profile
public static class HtmlHelperExtensions
{
private static readonly char Separator = '/';
private static readonly string TemplateFolder = HttpContext.Current.Server.MapPath("~/App/templates");
private static readonly IViewEngine ViewEngine = new HandlebarsRazorViewEngine();
public static MvcHtmlString RenderEmber(this HtmlHelper helper, string path = "", bool noTemplateName = false)
{
if (HttpRuntime.Cache[path] == null)
{
using System;
class C
{
static void Main()
{
const long x = -1;
long y = x;
Console.WriteLine(unchecked(long.MinValue / x));
Console.WriteLine(unchecked(long.MinValue / y));
using Dapper;
using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
public class OracleDynamicParameters : Dapper.SqlMapper.IDynamicParameters {
private static Dictionary<SqlMapper.Identity, Action<IDbCommand, object>> paramReaderCache = new Dictionary<SqlMapper.Identity, Action<IDbCommand, object>>( );
@strvmarv
strvmarv / Maybe.cs
Created February 25, 2014 01:54 — forked from bradwilson/Maybe.cs
public struct Maybe<T>
{
public static readonly Maybe<T> NoValue;
public Maybe(T value, bool hasValue = true) : this()
{
HasValue = hasValue;
Value = value;
}