设计模式与运行时数据模式详解
1. 辅助类和函数设计模式
辅助类和函数的设计模式提供了额外的功能。以下是几种常见的设计模式及其代码实现:
- AssertResult :该设计模式用于检查结果是否触发预定义操作。
Function ASSERT_RESULT(ByVal iResult)
' -----------------------------------------------------
' Function : ASSERT_RESULT
' Purpose : Checks if the result triggers a predefined action
' Args : ByVal iResult
' Returns : The value of iResult (unless the run session is
' terminated)
' -----------------------------------------------------
ASSERT_RESULT = CLng(iResult)
If CLng(iResult) <> CLng(micPass) Then
Reporter.ReportEvent micWarning, "ASSERT_RESULT", "The action stopped by ASSERT_RESULT"
Execu
超级会员免费看
订阅专栏 解锁全文
3435

被折叠的 条评论
为什么被折叠?



