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
_AuthenticationFailure_ |
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.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Threading; | |
using System.Windows.Forms; | |
namespace Screenshot | |
{ | |
public static class StartupController | |
{ |
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 GoBlog.AutoMapper; | |
using GoBlog.Controllers; | |
using GoBlog.Data; | |
using GoBlog.Data.Entities; | |
using GoBlog.Models; | |
using GoBlog.Paging; | |
using Moq; | |
using NUnit.Framework; | |
using System; | |
using System.Collections.ObjectModel; |
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 AccountController : Controller | |
{ | |
private readonly Authenticator authenticator = new Authenticator(); | |
public ActionResult Login() | |
{ | |
return View(); | |
} | |
[HttpPost, ValidateAntiForgeryToken] |
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 GrandExchange | |
Public Structure GrandExchangeItem | |
#Region "Public Read-Only Properties" | |
Public ReadOnly Property ItemName As String | |
Get | |
Return privItemName | |
End Get | |
End Property | |
Public ReadOnly Property ItemPrice As String | |
Get |
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 Counter | |
{ | |
public static int CountLines(string path) | |
{ | |
return | |
File.ReadLines(path) | |
.Count(Predicate); | |
} | |
private static bool Predicate(string line) |
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 GoBlog.AutoMapper; | |
using GoBlog.Controllers; | |
using GoBlog.Data; | |
using GoBlog.Data.Entities; | |
using GoBlog.Models; | |
using GoBlog.Paging; | |
using Moq; | |
using NUnit.Framework; | |
using System; | |
using System.Collections.ObjectModel; |
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
.centered-container { | |
width: 800px; | |
height: 270px; | |
top: 50%; | |
left: 50%; | |
margin-left: -400px; | |
margin-top: -135px; | |
position: fixed; | |
} |
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 static void SetFakeControllerContext(this Controller controller, NameValueCollection querystring = null) | |
{ | |
var context = new Mock<HttpContextBase>(); | |
context.Setup(c => c.Request.QueryString).Returns(querystring ?? new NameValueCollection()); | |
controller.ControllerContext = new ControllerContext(context.Object, new RouteData(), | |
new Mock<ControllerBase>().Object); |
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 static class Serializer | |
{ | |
public static string Serialize(object graph) | |
{ | |
var document = new XDocument(); | |
var type = graph.GetType(); | |
document.Add(new XElement(type.Name)); | |
var properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetProperty); | |
foreach (var property in properties) |