コード例 #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);
        }
コード例 #2
0
 public ITypeReference GetType(EmitContext context)
 {
     return(DeletedTypeDefinition.TryCreate(_oldAttribute.GetType(context), _typesUsedByDeletedMembers));
 }
コード例 #3
0
 public ITypeDefinition?GetResolvedType(EmitContext context)
 {
     return((ITypeDefinition?)DeletedTypeDefinition.TryCreate(_oldParameter.GetResolvedType(context), _typesUsedByDeletedMembers));
 }