[SerializableAttribute]
[XmlRootAttribute("TestExecutionInfo")]
public sealed class TestExecutionInfo
<SerializableAttribute>
<XmlRootAttribute("TestExecutionInfo")>
Public NotInheritable Class TestExecutionInfo
Dim instance As TestExecutionInfo
[SerializableAttribute]
[XmlRootAttribute(L"TestExecutionInfo")]
public ref class TestExecutionInfo sealed
[<SealedAttribute>]
[<SerializableAttribute>]
[<XmlRootAttribute("TestExecutionInfo")>]
type TestExecutionInfo = class end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Sub Test()
Dim successful As Boolean =
TestSuccess(Sub() Convert.ToInt32("Hello World!"))
Dim teInfo As TestExecutionInfo =
TestTime(Sub()
For x As Integer = 0 To 2500
Console.WriteLine(x)
Next x
End Sub)
Dim sb As New Global.System.Text.StringBuilder
Select Case teInfo.Success
Case True
With sb ' Set an information message.
.AppendLine(String.Format("Method Name: {0}", teInfo.Method.Name))
.AppendLine()
.AppendLine(String.Format("Elapsed Time: {0}", teInfo.Elapsed.ToString("hh\:mm\:ss\:fff")))
End With
MessageBox.Show(sb.ToString(), "Code Execution Measurer", MessageBoxButtons.OK, MessageBoxIcon.Information)
Case Else
With sb ' Set an error message.
.AppendLine("Exception occurred during code execution measuring.")
.AppendLine()
.AppendLine(String.Format("Method Name: {0}", teInfo.Method.Name))
.AppendLine()
.AppendLine(String.Format("Exception Type: {0}", teInfo.Exception.GetType().Name))
.AppendLine()
.AppendLine("Exception Message:")
.AppendLine(teInfo.Exception.Message)
.AppendLine()
.AppendLine("Exception Stack Trace:")
.AppendLine(teInfo.Exception.StackTrace)
End With
MessageBox.Show(sb.ToString(), "Code Execution Measurer", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Select
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
TestExecutionInfo | Initializes a new instance of the TestExecutionInfo class. |
Elapsed | Gets the elapsed execution time. |
Exception | Gets the Exception that occured during method execution, if any. |
Method | Gets the method metadata. |
Success | Gets a value indicating whether the execution of the method was successful. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |