示例#1
0
 internal bool ResolveMissingTypeIsValueType(MissingType missingType)
 {
     if (missingTypeIsValueType != null)
     {
         return(missingTypeIsValueType(missingType));
     }
     throw new MissingMemberException(missingType);
 }
示例#2
0
        private Type GetMissingType(Module requester, Module module, Type declaringType, TypeName typeName)
        {
            if (missingTypes == null)
            {
                missingTypes = new Dictionary <ScopedTypeName, Type>();
            }
            ScopedTypeName stn = new ScopedTypeName(declaringType ?? (object)module, typeName);
            Type           type;

            if (!missingTypes.TryGetValue(stn, out type))
            {
                type = new MissingType(module, declaringType, typeName.Namespace, typeName.Name);
                missingTypes.Add(stn, type);
            }
            if (ResolvedMissingMember != null && !module.Assembly.__IsMissing)
            {
                ResolvedMissingMember(requester, type);
            }
            return(type);
        }