예제 #1
0
        public void Box(ITypeRef boxedType)
        {
            TypeReference type = CecilTypeRef.GetReference(boxedType);

            if (!type.IsValueType)
            {
                return;
            }
            _il.Emit(OpCodes.Box, type);
        }
예제 #2
0
        public ITypeRef ForCecilType(TypeReference type)
        {
            ITypeRef typeRef;

            if (!_typeCache.TryGetValue(type, out typeRef))
            {
                typeRef = new CecilTypeRef(this, type);
                _typeCache.Add(type, typeRef);
            }
            return(typeRef);
        }
예제 #3
0
 private static TypeReference GetTypeReference(ITypeRef type)
 {
     return(CecilTypeRef.GetReference(type));
 }