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 TestPerson : DtoBase, IValidatableObject | |
{ | |
public string Title { get; set; } | |
public string FirstName { get; set; } | |
public string LastName { get; set; } | |
public string Initials { get; set; } | |
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) | |
{ | |
//if (Id == 0) |
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
// return object as URL encoded string | |
// I did not write this code, it was pasted from somewhere. | |
UrlEncodeObj = function (o) { | |
var sdata = ''; | |
for (var k in o) { | |
if (sdata) { | |
sdata += '&'; | |
} | |
sdata += k + '=' + escape(o[k]); | |
} |
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 AwsHelper | |
{ | |
private const string LOG_PREFIX = "AwsHelper/"; | |
/* A class to return Metadata from a running Amazon instance. | |
Requires: using System.Net; | |
We call these methods in the startup routine of our windows service. |
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 ReplaceAll(string, search, replacement) { | |
// http://stackoverflow.com/questions/1144783/replacing-all-occurrences-of-a-string-in-javascript | |
return string.split(search).join(replacement); | |
} |