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; | |
using Castle.MicroKernel.Registration; | |
using Castle.MicroKernel.Resolvers; | |
namespace CompositeWPFContrib.Composite.WindsorExtensions | |
{ | |
public class LazyLoader : ILazyComponentLoader | |
{ | |
private readonly string[] allowedAssembliesNames = new[] |
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
Comment on http://msmvps.com/blogs/lopez/archive/2009/07/29/no-somos-vulcanos.aspx (We are not vulcans) | |
The mechanism of evolution works more than anything because the variability. In software, this is no different. The evolution is because many people do different things, and only some, holed out. |
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
public string[] GetUserTemplates(int userId) | |
{ | |
return Enumerable.Range(1, 10) | |
.Select(i => | |
{ | |
string template = string.Empty; | |
int templateLenght = 0; | |
driver.GetUserTmpStr(0, userId, i, ref template, ref templateLenght); | |
return template; | |
}).ToArray(); |
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; | |
using Castle.Core; | |
using Castle.Core.Interceptor; | |
using Castle.MicroKernel; | |
using Castle.MicroKernel.Facilities; | |
using Castle.MicroKernel.Registration; | |
using Chinook.Domain.Base; | |
using GenWise.Data; |
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 CP2010.Domain; | |
using FluentNHibernate.Automapping; | |
using FluentNHibernate.Automapping.Alterations; | |
namespace CP2010.Data.Impl.Domain | |
{ | |
public class GrupoMapping : IAutoMappingOverride<Grupo> | |
{ | |
public void Override(AutoMapping<Grupo> mapping) |
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
var fail = false; | |
var configuration = new Configuration().Configure(); | |
configuration.Properties[Environment.ShowSql] = "false"; | |
var sessionFactory = configuration.BuildSessionFactory(); | |
using (var session = sessionFactory.OpenSession()) | |
{ | |
var allClassMetadata = session.SessionFactory.GetAllClassMetadata(); | |
foreach (var entry in allClassMetadata) |
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.Collections.Generic; | |
using System.ComponentModel; | |
using PostSharp.Aspects; | |
using PostSharp.Aspects.Advices; | |
using PostSharp.CodeModel; | |
using PostSharp.Extensibility; | |
namespace VanAOP.PostSharp._4to | |
{ |
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
//A way to map WellKnownInstaceType ( http://fabiomaulo.blogspot.com/2009/08/from-db-to-ram-wellknowinstancetype.html ) | |
//artifact | |
public class WellKnownInstancePattern<TType, TWellKnownInstanceType> | |
: IPatternApplier<MemberInfo, IPropertyMapper> | |
where TWellKnownInstanceType : WellKnownInstanceType<TType> | |
where TType : class | |
{ | |
public bool Match(MemberInfo subject) |
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 is from nhibernate source code | |
public class MsSql2008Dialect : MsSql2005Dialect | |
{ | |
// Methods | |
public MsSql2008Dialect() | |
{ | |
base.RegisterColumnType(DbType.DateTime2, "DATETIME2"); | |
base.RegisterColumnType(DbType.DateTimeOffset, "DATETIMEOFFSET"); | |
base.RegisterColumnType(DbType.Date, "DATE"); |
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.Linq; | |
using ConfOrm; | |
using ConfOrm.NH; | |
using NHibernate.Cfg.MappingSchema; | |
using NUnit.Framework; | |
using SharpTestsEx; | |
namespace ConfOrmTests.TestCase | |
{ | |
public class Foo<T> |