상속: ExternalType, ICallableType
예제 #1
0
        public IType Map(Type type)
        {
            ExternalType entity = (ExternalType)_entityCache[type];

            if (null == entity)
            {
                if (type.IsArray)
                {
                    return(GetArrayType(Map(type.GetElementType()), type.GetArrayRank()));
                }
                else
                {
                    if (type.IsSubclassOf(Types.MulticastDelegate))
                    {
                        entity = new ExternalCallableType(this, type);
                    }
                    else
                    {
                        entity = new ExternalType(this, type);
                    }
                }
                Cache(entity);
            }
            return(entity);
        }
예제 #2
0
        protected override IType ConstructInternalEntity(IType[] arguments)
        {
            ExternalCallableType callable = _type as ExternalCallableType;

            if (null != callable)
            {
                return(new GenericConstructedCallableType(callable, arguments));
            }
            return(new GenericConstructedType(_type, arguments));
        }
        protected override IEntity MakeMixedEntity(IType[] arguments)
        {
            ExternalCallableType callable = _type as ExternalCallableType;

            if (null != callable)
            {
                return(new MixedGenericCallableType(_tss, callable, arguments));
            }
            else
            {
                return(new MixedGenericType(_tss, _type, arguments));
            }
        }
예제 #4
0
 public MixedGenericCallableType(TypeSystemServices tss, ExternalCallableType definition, IType[] arguments) :
     base(tss, definition, arguments)
 {
     _definition = definition;
 }