Beispiel #1
0
        public static ITypeReference?TryCreate(ITypeReference?typeReference, Dictionary <ITypeDefinition, DeletedTypeDefinition> cache)
        {
            if (typeReference is ITypeDefinition typeDef)
            {
                if (!cache.TryGetValue(typeDef, out var deletedType))
                {
                    deletedType = new DeletedTypeDefinition(typeDef);
                    cache.Add(typeDef, deletedType);
                }

                return(deletedType);
            }

            return(typeReference);
        }
Beispiel #2
0
 public ITypeReference GetType(EmitContext context)
 {
     return(DeletedTypeDefinition.TryCreate(_oldAttribute.GetType(context), _typesUsedByDeletedMembers));
 }
 public ITypeDefinition?GetResolvedType(EmitContext context)
 {
     return((ITypeDefinition?)DeletedTypeDefinition.TryCreate(_oldParameter.GetResolvedType(context), _typesUsedByDeletedMembers));
 }