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); }
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)); }