コード例 #1
0
        public override object Instantiate(object parent, ISessionImplementor session)
        {
            var useParent =
                parent != null &&
                //TODO: Yuck! This is not quite good enough, it's a quick
                //hack around the problem of having a to-one association
                //that refers to an embedded component:
                ReturnedClass.IsInstanceOfType(parent);

            return(useParent ? parent : base.Instantiate(parent, session));
        }
コード例 #2
0
 public override int GetHashCode()
 {
     return(ReturnedClass.GetHashCode());
 }
コード例 #3
0
        private object GetNullValueUsingReflection()
        {
            FieldInfo nullField = ReturnedClass.GetField("Null", BindingFlags.Public | BindingFlags.Static);

            return(nullField.GetValue(null));
        }