This file contains hidden or 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
| [Serializable] | |
| public class EmailAddressType : IUserType | |
| { | |
| public SqlType[] SqlTypes | |
| { | |
| get | |
| { | |
| var types = new SqlType[1]; | |
| types[0] = new SqlType(DbType.String); |
This file contains hidden or 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
| [Serializable] | |
| public class EmailAddress : IComparable<EmailAddress> | |
| { | |
| public const int MaxLength = 256; | |
| // Regex based on Phil Haacks http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx | |
| public const string Expression = @"[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|museum|uk)\b"; | |
| private readonly string value; | |
| public EmailAddress(string value) | |
| { |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8" ?> | |
| <commands> | |
| <command name="CreateUserCommand"> | |
| <username>lukesmith</username> | |
| <password>password1</password> | |
| <firstname>Luke</firstname> | |
| <lastname>Smith</lastname> | |
| <emailaddress>[email protected]</emailaddress> | |
| </command> | |
| <command name="CreateUserCommand"> |
This file contains hidden or 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.Linq; | |
| namespace BookUpon.Tests | |
| { | |
| public static class IMappedEngineConfigurationBuilderExtensions | |
| { | |
| public static void ScanAssembly<T>(this IMappedEngineConfigurationBuilder builder) | |
| { | |
| var maps = typeof(T).Assembly.GetTypes().Where(x => typeof(IAutoPocoMap<>).IsAssignableFrom(x) && !x.IsAbstract); |
This file contains hidden or 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
| this.For<IRepository<ICommandLog>>() | |
| .Use(x => { | |
| var session = x.GetInstance<ISessionFactory>().OpenSession(); | |
| session.FlushMode = FlushMode.Commit; | |
| return new CommandLogRepository(new NHibernateUnitOfWork(session)); | |
| }); |
NewerOlder