Interface IEvent
Base interface for script events.
Namespace: Attachmate.Verastream.HostIntegrator.ScriptAPI
Assembly: Attachmate.Verastream.HostIntegrator.ScriptAPI.dll
Syntax
public interface IEvent
Properties
EventStack
Gets the stack of currently executing events.
Declaration
IList<EventInfo> EventStack { get; }
Property Value
Type | Description |
---|---|
IList<EventInfo> | An immutable list of EventInfo objects. |
Remarks
Gets the stack of currently executing events. The first event in the list is the outer most event, while the last event in the list is this event.
Logger
Gets the logging interface used to make entries in the VHI log file.
Declaration
ILogger Logger { get; }
Property Value
Type | Description |
---|---|
ILogger | The logging interface |
Remarks
The ILogger interface must only be used within the event that obtained it. No reference to the interface should exist upon returning from the event.
Methods
CheckForTimeout()
Checks if the event or a parent event has timed out.
Declaration
void CheckForTimeout()
Remarks
Checks if the event or a parent event has timed out. If a timeout has not occurred, this method does nothing. If a timeout has occured, however, this method throws an EventTimeoutException exception.
Exceptions
Type | Condition |
---|---|
EventTimeoutException | Thrown when this is called if the event or a parent event has timed out. |
CreateErrorMessage(int)
Creates a VHI defined error message without parameters.
Declaration
ErrorMessage CreateErrorMessage(int errorCode)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | The VHI error code. |
Returns
Type | Description |
---|---|
ErrorMessage | The resulting ErrorMessage object. |
Remarks
Creates a VHI defined error message without parameters. One or more error messages can be used to create an ApptrieveException.
Exceptions
Type | Condition |
---|---|
ApplicationException | Thrown if the error code is invalid. |
CreateErrorMessage(int, object[])
Creates a VHI defined error message with parameters.
Declaration
ErrorMessage CreateErrorMessage(int errorCode, object[] errorParams)
Parameters
Type | Name | Description |
---|---|---|
int | errorCode | The VHI error code. |
object[] | errorParams | The error message parameter values. |
Returns
Type | Description |
---|---|
ErrorMessage | The resulting ErrorMessage object. |
Remarks
Creates a VHI defined error message with parameters. One or more error messages can be used to create a ApptrieveException.
Exceptions
Type | Condition |
---|---|
ApplicationException | Thrown if the error code is invalid or the number of object parameters is incorrect for the error code. |
CreateUserErrorMessage(string)
Creates a user-defined error message.
Declaration
ErrorMessage CreateUserErrorMessage(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | The contents of the message. |
Returns
Type | Description |
---|---|
ErrorMessage | The resulting ErrorMessage object. |
Remarks
Creates a user-defined error message. One or more error messages can be used to create a ApptrieveException.
GetHandlerProperty(string)
Gets the value of the given handler property.
Declaration
string GetHandlerProperty(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the property. |
Returns
Type | Description |
---|---|
string | The value of the property or null |
Remarks
Gets the value of the given handler property. If the property is not found, null is returned.
IsDesignEnvironment()
Determines whether or not an event is being fired in a design environment.
Declaration
bool IsDesignEnvironment()
Returns
Type | Description |
---|---|
bool | True if the event is being fired by the VHI Design Tool, false if it is being fired by the VHI server. |