Moved numpad control to Tanshu.Common. Billing feature complete. Delete not working as expected
Signed-off-by: unknown <tanshu@.(none)>
This commit is contained in:
1 parent
eb05811868
commit
0f323f8fab
64 files changed
+2029
-1382
No files matched your search
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user