Example #1
0
        private bool HasValueTypeBehavior(object obj)
        {
            bool isSimple = Platform4.IsSimple(obj.GetType());

            if (isSimple)
            {
                return(true);
            }
            IReflectClass reflectClass = _container.Reflector().ForObject(obj);

            if (Platform4.IsStruct(reflectClass))
            {
                return(true);
            }
            bool isEnum = Platform4.IsEnum(_container.Reflector(), reflectClass);

            if (isEnum)
            {
                return(true);
            }
            ITypeHandler4 typeHandler = _container.TypeHandlerForClass(reflectClass);

            return(Handlers4.IsValueType(typeHandler));
        }