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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using kpa.mko.dal; | |
using kpa.common.workflow; | |
using Rainbow.ObjectFlow.Stateful; | |
using kpa.common.container; | |
using kpa.common.interfaces; |
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 Account | |
{ | |
public virtual int AccountId { get; set; } | |
[Matches(@"[A-Z]{2}\d{5}")] | |
public virtual string Code { get; set; } | |
[Required] | |
public virtual string Name { get; set; } | |
public virtual int? Age { get; set; } | |
} |
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 Account | |
{ | |
public virtual int AccountId { get; set; } | |
[Matches(@"[A-Z]{2}\d{5}")] | |
public virtual string Code { get; set; } | |
[Required] | |
public virtual string Name { get; set; } | |
public virtual int? Age { get; set; } | |
} |
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
[TestFixture] | |
class when_adding_numbers | |
{ | |
Maths maths; | |
void Given_an_object_in_bigint_mode() | |
{ | |
maths = new Maths(); | |
maths.BigInt = true; | |
} |
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
var css = { | |
"margin-top": (($(dv).parent().height - $(dv).height()) / 2) + 'px', | |
"position":"absolute" | |
}; | |
$(dv).css(css); | |
$(dv).parent().css('position', 'relative'); |
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
// ... | |
throw new Exception("Wizard package not imported."); | |
} | |
} | |
catch (Exception e) | |
{ | |
Logger.log(e); | |
} |
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
let find kittens = | |
match kittens.IndexOf("kittens") with | |
| -1 -> None | |
| x -> Some kittens.SubString(x, 7) | |
match find "a box of kittens" with | |
| None -> printf "no kittens" | |
| Some container -> printf "kittens found inside '%s'" container |
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 enum LightSwith | |
{ | |
On, | |
Dimmed(int intensity), | |
Off | |
} | |
// And to use | |
var value = GetLightSwitchValue(); |
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 abstract class DomainObject : IDomainObject | |
{ | |
public virtual object Id { get; set; } | |
#region Overloads of Equals & GetHashCode | |
// ... | |
#endregion | |
} |
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 Word { | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public IList<Definition> Definitions { get; private set; } | |
} | |
public class Definition { | |
public int Id { get; set; } | |
public int WordId { get; set; } | |
public string Text { get; set; } |
OlderNewer