Beispiel #1
0
        public void EmitDemangler(IILEmitter emitter)
        {
            if (!Context.MappedTypes.TryGetValue(Demangler.Method.DeclaringType.CreateKey(), out _))
            {
                Context.Error("demangler must be defined in the target assembly");
            }
            var method = emitter.Importer.Import(Demangler.Method);
            var mi     = emitter.Importer.Import(method);

            emitter.Call(mi);
        }
Beispiel #2
0
        internal void EmitGetValueOrDefault(Type nullableType)
        {
            var method = nullableType.GetMethod("GetValueOrDefault", Type.EmptyTypes);

            _ilg.Call(method);
        }