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); }
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)); } }
public MixedGenericCallableType(TypeSystemServices tss, ExternalCallableType definition, IType[] arguments) : base(tss, definition, arguments) { _definition = definition; }