public void Apply(IManyToOneInstance instance)
    {
        Type instanceType = instance.Class.GetUnderlyingSystemType();

        if (instanceType = typeof(IFoo))
        {
            instance.CustomClass <Foo>();
        }
        instance.Cascade.All();
    }
示例#2
0
    public void Apply(IManyToOneInstance instance)
    {
        Type instanceType = instance.Class.GetUnderlyingSystemType();

        if (instanceType.IsInterface)
        {
            string className = instanceType.Name.Substring(1);
            instance.CustomClass(instanceType.Assembly.GetType(instanceType.FullName.Replace(instanceType.Name, className)));
        }
        instance.Cascade.All();
    }
示例#3
0
    public void Apply(IManyToOneInstance instance)
    {
        Type instanceType = instance.Class.GetUnderlyingSystemType();

        if (instanceType.IsInterface)
        {
            // Assuming that the type starts with an I get the name of the concrete class
            string className = instanceType.Name.Substring(1);
            instance.CustomClass(instanceType.Assembly.GetType(
                                     instanceType.FullName.Replace(instanceType.Name, className)));
        }
        instance.Cascade.All();
    }