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
{ | |
"_id": "Tournament", | |
"Name": "Tournament", | |
"Records": [ | |
{ | |
"_id": "0329201309:57:17.231", | |
"Date": { | |
"$date": "2013-03-23T14:55:25.856Z" | |
}, | |
"Note": "0-2 Gi & 0-2 NoGi at Sasquatch Open" |
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 User | |
{ | |
public string Email {get; set;} | |
public string FirstName {get; set;} | |
public string LastName {get; set;} | |
public string Password {get; set;} | |
} | |
public class UserLogic | |
{ |
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 User | |
{ | |
public string Email {get; set;} | |
public string FirstName {get; set;} | |
public string LastName {get; set;} | |
public string Password {get; set;} | |
public void User() | |
{ | |
} |
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 void Create(User user) | |
{ | |
if(string.IsNullOrWhiteSpace(user.Email)) | |
throw new InvalidEmailException(); | |
if(!new Regex("^[A-Za-z]\w{6,}[A-Za-z]$").IsMatch(user.Password)) | |
throw new InvalidPasswordException(); | |
if(string.IsNullOrWhiteSpace(user.FirstName) || string.IsNullOrWhiteSpace(user.LastName)) | |
throw new InvalidNameException(); |
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 User | |
{ | |
public string Email {get; set;} | |
public string FirstName {get; set;} | |
public string LastName {get; set;} | |
public string Password {get; set;} | |
public int Id {get; set;] | |
public void Validate(bool isUpdate = false) | |
{ |
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 UserController : Controller | |
{ | |
[HttpPost] | |
public ActionResult Create(string email, string password, string firstName, string lastName) | |
{ | |
new UserLogic().Create(email, password, firstName, lastName); | |
return View("UserCreated"); | |
} | |
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 UserController : Controller | |
{ | |
[HttpPost] | |
public ActionResult Create(string email, string password, string firstName, string lastName) | |
{ | |
new UserLogic().Create(email, password, firstName, lastName); | |
return View("UserCreated"); | |
} | |
} |
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 UserController : Controller | |
{ | |
[HttpPost] | |
public ActionResult Create(string email, string password, string firstName, string lastName) | |
{ | |
if(string.IsNullOrWhiteSpace(email)) | |
throw new InvalidEmailException(); | |
if(!new Regex("^[A-Za-z]\w{6,}[A-Za-z]$").IsMatch(password)) | |
throw new InvalidPasswordException(); |
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
string file = null; | |
while ((line = sr.ReadLine()) != null) | |
{ | |
file += line; | |
} | |
window.SetText(file); |
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 interface ICar | |
{ | |
void Start(); | |
} |