Misc. forgot all changes
Working on Cashier Checkout
This commit is contained in:
1 parent
0f323f8fab
commit
1400f42989
32 files changed
+4591
-255
No files matched your search
@@ -1,24 +1,20 @@
|
||||
using System;
|
||||
using FluentNHibernate.Conventions;
|
||||
using System.Reflection;
|
||||
using FluentNHibernate;
|
||||
using FluentNHibernate.Conventions.Instances;
|
||||
using FluentNHibernate.Conventions.Inspections;
|
||||
using FluentNHibernate.Conventions.AcceptanceCriteria;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
//using System;
|
||||
//using FluentNHibernate.Conventions;
|
||||
//using System.Reflection;
|
||||
//using FluentNHibernate;
|
||||
//using FluentNHibernate.Conventions.Instances;
|
||||
//using FluentNHibernate.Conventions.Inspections;
|
||||
//using FluentNHibernate.Conventions.AcceptanceCriteria;
|
||||
//using Tanshu.Accounts.Contracts;
|
||||
|
||||
namespace Tanshu.Accounts.Conventions
|
||||
{
|
||||
public class NotNullConvention : IPropertyConvention
|
||||
{
|
||||
public void Apply(IPropertyInstance instance)
|
||||
{
|
||||
if (!HasAttribute(instance.Property.MemberInfo)) return;
|
||||
instance.Not.Nullable();
|
||||
}
|
||||
bool HasAttribute(ICustomAttributeProvider provider)
|
||||
{
|
||||
return provider.GetCustomAttributes(typeof(NotNullAttribute), false).Length == 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//namespace Tanshu.Accounts.Conventions
|
||||
//{
|
||||
// public class NotNullConvention : IPropertyConvention
|
||||
// {
|
||||
// public void Apply(IPropertyInstance instance)
|
||||
// {
|
||||
// instance.Not.Nullable();
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
Reference in new issue
Block a user