Esempio n. 1
0
		public virtual bool IsNDimensional(IReflectClass a_class)
		{
			if (a_class is GenericArrayClass)
			{
				return false;
			}
			return _delegate.IsNDimensional(a_class.GetDelegate());
		}
Esempio n. 2
0
 public virtual bool IsNDimensional(IReflectClass a_class)
 {
     if (a_class is GenericArrayClass)
     {
         return(false);
     }
     return(_delegate.IsNDimensional(a_class.GetDelegate()));
 }
Esempio n. 3
0
 public virtual object NewInstance(IReflectClass componentType, int length)
 {
     componentType = componentType.GetDelegate();
     if (componentType is GenericClass)
     {
         return(new GenericArray(((GenericClass)componentType).ArrayClass(), length));
     }
     return(_delegate.NewInstance(componentType, length));
 }
Esempio n. 4
0
 public virtual IReflectClass GetComponentType(IReflectClass claxx)
 {
     claxx = claxx.GetDelegate();
     if (claxx is GenericClass)
     {
         return(claxx);
     }
     return(_delegate.GetComponentType(claxx));
 }
Esempio n. 5
0
		public virtual object NewInstance(IReflectClass componentType, int length)
		{
			componentType = componentType.GetDelegate();
			if (componentType is GenericClass)
			{
				return new GenericArray(((GenericClass)componentType).ArrayClass(), length);
			}
			return _delegate.NewInstance(componentType, length);
		}
Esempio n. 6
0
		public virtual IReflectClass GetComponentType(IReflectClass claxx)
		{
			claxx = claxx.GetDelegate();
			if (claxx is GenericClass)
			{
				return claxx;
			}
			return _delegate.GetComponentType(claxx);
		}
Esempio n. 7
0
        public static Type ToNative(IReflectClass reflectClass)
        {
            NetClass netClass = reflectClass.GetDelegate() as NetClass;

            if (netClass == null)
            {
                return(null);
            }
            return(netClass.GetNetType());
        }
Esempio n. 8
0
 public virtual object NewInstance(IReflectClass componentType, ArrayInfo info)
 {
     componentType = componentType.GetDelegate();
     if (componentType is GenericClass)
     {
         var length = info.ElementCount();
         return(new GenericArray(((GenericClass)componentType).ArrayClass(), length));
     }
     return(_delegate.NewInstance(componentType, info));
 }
Esempio n. 9
0
		public virtual object NewInstance(IReflectClass componentType, ArrayInfo info)
		{
			componentType = componentType.GetDelegate();
			if (componentType is GenericClass)
			{
				int length = info.ElementCount();
				return new GenericArray(((GenericClass)componentType).ArrayClass(), length);
			}
			return _delegate.NewInstance(componentType, info);
		}
Esempio n. 10
0
        /// <summary>Determines if a candidate ReflectClass is a collection</summary>
        /// <param name="candidate">candidate ReflectClass</param>
        /// <returns>true  if a candidate ReflectClass is a collection.</returns>
        public virtual bool IsCollection(IReflectClass candidate)
        {
            //candidate = candidate.getDelegate();
            IEnumerator i = _collectionPredicates.GetEnumerator();

            while (i.MoveNext())
            {
                if (((IReflectClassPredicate)i.Current).Match(candidate))
                {
                    return(true);
                }
            }
            return(_delegate.IsCollection(candidate.GetDelegate()));
        }
Esempio n. 11
0
    	private static Type GetNetType(IReflectClass clazz)
        {
            if (null == clazz)
            {
                return null;
            }

            NetClass netClass = clazz as NetClass;
            if (null != netClass)
            {
                return netClass.GetNetType();
            }
            IReflectClass claxx = clazz.GetDelegate();
            if (claxx == clazz)
            {
                return null;
            }
            return GetNetType(claxx);
        }
Esempio n. 12
0
 public virtual object NewInstance(IReflectClass componentType, int[] dimensions)
 {
     return(_delegate.NewInstance(componentType.GetDelegate(), dimensions));
 }
Esempio n. 13
0
		public virtual object NewInstance(IReflectClass componentType, int[] dimensions)
		{
			return _delegate.NewInstance(componentType.GetDelegate(), dimensions);
		}
Esempio n. 14
0
 /// <summary>Determines if a candidate ReflectClass is a collection</summary>
 /// <param name="candidate">candidate ReflectClass</param>
 /// <returns>true  if a candidate ReflectClass is a collection.</returns>
 public virtual bool IsCollection(IReflectClass candidate)
 {
     //candidate = candidate.getDelegate(); 
     var i = _collectionPredicates.GetEnumerator();
     while (i.MoveNext())
     {
         if (((IReflectClassPredicate) i.Current).Match(candidate))
         {
             return true;
         }
     }
     return _delegate.IsCollection(candidate.GetDelegate());
 }
Esempio n. 15
0
		public static Type ToNative(IReflectClass reflectClass)
		{
            NetClass netClass = reflectClass.GetDelegate() as NetClass;
            if(netClass == null)
            {
                return null;
            }
			return netClass.GetNetType();
		}