Boo.Lang.Runtime.DispatcherEmitter.EmitCoercion C# (CSharp) Метод

EmitCoercion() защищенный Метод

protected EmitCoercion ( Type actualType, Type expectedType, int score ) : void
actualType System.Type
expectedType System.Type
score int
Результат void
        protected void EmitCoercion(Type actualType, Type expectedType, int score)
        {
            switch (score)
            {
                case CandidateMethod.WideningPromotion:
                case CandidateMethod.NarrowingPromotion:
                    EmitPromotion(expectedType);
                    break;
                case CandidateMethod.ImplicitConversionScore:
                    EmitCastOrUnbox(actualType);
                    _il.Emit(OpCodes.Call, RuntimeServices.FindImplicitConversionOperator(actualType, expectedType));
                    break;
                default:
                    EmitCastOrUnbox(expectedType);
                    break;
            }
        }