C# Класс Microsoft.Scripting.Actions.ErrorInfo

Encapsulates information about the result that should be produced when a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: an expression which creates an Exception to be thrown an expression which produces a value which should be returned directly to the user and represents an error has occured (for example undefined in JavaScript) an expression which produces a value which should be returned directly to the user but does not actually represent an error. ErrorInfo's are produced by an ActionBinder in response to a failed binding.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
FromException ( Expression exceptionValue ) : ErrorInfo

Creates a new ErrorInfo which represents an exception that should be thrown.

FromValue ( Expression resultValue ) : ErrorInfo

Creates a new ErrorInfo which represents a value which should be returned to the user.

FromValueNoError ( Expression resultValue ) : ErrorInfo

Crates a new ErrorInfo which represents a value which should be returned to the user but does not represent an error.

Приватные методы

Метод Описание
ErrorInfo ( Expression value, ErrorInfoKind kind ) : System.Linq.Expressions

Private constructor - consumers must use static From* factories to create ErrorInfo objects.

Описание методов

FromException() публичный статический Метод

Creates a new ErrorInfo which represents an exception that should be thrown.
public static FromException ( Expression exceptionValue ) : ErrorInfo
exceptionValue System.Linq.Expressions.Expression
Результат ErrorInfo

FromValue() публичный статический Метод

Creates a new ErrorInfo which represents a value which should be returned to the user.
public static FromValue ( Expression resultValue ) : ErrorInfo
resultValue System.Linq.Expressions.Expression
Результат ErrorInfo

FromValueNoError() публичный статический Метод

Crates a new ErrorInfo which represents a value which should be returned to the user but does not represent an error.
public static FromValueNoError ( Expression resultValue ) : ErrorInfo
resultValue System.Linq.Expressions.Expression
Результат ErrorInfo