XSpect.Yacq.Expressions.DispatchExpression.DispatchFailback C# (CSharp) Méthode

DispatchFailback() private méthode

private DispatchFailback ( SymbolTable symbols ) : Expression
symbols XSpect.Yacq.Symbols.SymbolTable
Résultat System.Linq.Expressions.Expression
        private Expression DispatchFailback(SymbolTable symbols)
        {
            // Default constructor of value types
            if (this.DispatchType.HasFlag(DispatchTypes.Constructor)
                && ((TypeCandidateExpression) this._left).ElectedType.IsValueType
                && this.Arguments.IsEmpty()
            )
            {
                return Default(((TypeCandidateExpression) this._left).ElectedType);
            }
            // Cast Operation
            else if (this.DispatchType.HasFlag(DispatchTypes.Constructor)
                && ((TypeCandidateExpression) this._left).ElectedType != null
                && this.Arguments.Count == 1)
            {
                return Convert(
                    this.Arguments
                        .Single()
                        .Reduce(symbols),
                    ((TypeCandidateExpression) this._left).ElectedType
                );
            }
            else
            {
                throw new ParseException("Dispatch failed: " + this, this);
            }
        }