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.AspNetCore.Antiforgery.Internal; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Net.Http.Headers; | |
public class Antiforgery : DefaultAntiforgery | |
{ | |
public Antiforgery( | |
Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions> antiforgeryOptionsAccessor, | |
IAntiforgeryTokenGenerator tokenGenerator, | |
IAntiforgeryTokenSerializer tokenSerializer, |
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
import * as React from 'react'; | |
type Parse<T> = { parse: (value: string) => T }; | |
type MaybeParse<T> = T extends string ? {} : Parse<T>; | |
interface GenericTextboxBaseProps<TModel, TProperties extends keyof TModel> { | |
model: TModel; | |
name: TProperties; | |
display?: (prop: TModel[TProperties]) => string; | |
} |
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
const noop = () => {}; | |
export default class CancellablePromise { | |
constructor(executorOrPromise){ | |
this._promise = new Promise((resolve, reject) => { | |
let promise = executorOrPromise; | |
if(!promise.then) promise = new Promise(executorOrPromise); | |
promise.then((...args) => { | |
if(this.cancelled) reject('cancelled', ...args); |
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.Web; | |
namespace TestOfMyDreams { | |
[TestClass] | |
public class Test { | |
[TestMethod] | |
public void TestRequest(){ | |
using(var app = MyMvcApplication.Create("C:\\path\\to\\project\\")) |
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
<!doctype html> | |
<html> | |
<head> | |
</head> | |
<body> | |
<div id="notices"></div> | |
<script src="Razor.js"></script> | |
<script type="application/x-razor-js" data-view-id="notice"> |
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
function combine() { | |
var ret = '', flags = ''; | |
[ ].forEach.call(arguments, function (exp) { | |
exp = exp.toString(); | |
if (exp[0] !== '/') { | |
flags = exp; | |
} else { | |
ret += exp.substr(1, exp.length - 2); | |
} |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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.IO; | |
namespace AE.Net.Mail { | |
//http://stackoverflow.com/questions/842465/reading-a-line-from-a-streamreader-without-consuming | |
public class PeekableTextReader : TextReader { | |
private TextReader _Underlying; | |
private MemoryStream _Buffer; | |
private StreamReader _BufferReader; | |
private StreamWriter _BufferWriter; |
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
/* | |
MIT License (MIT) | |
Copyright (c) 2011 Andy Edinborough | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH TH |
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
public class MvcApplication : System.Web.HttpApplication { | |
void Application_Start() { | |
MvcMiniProfiler.Data.ProfiledDbProviderFactory.RegisterProviders(); | |
} | |
} |
NewerOlder