OperateResultTCheck 方法 (FuncT, Boolean, String) |
返回一个检查结果对象,可以进行自定义的数据检查。
Returns a check result object that allows you to perform custom data checks.
命名空间:
HslCommunication
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public OperateResult<T> Check(
Func<T, bool> check,
string message = "All content data check failed"
)
Public Function Check (
check As Func(Of T, Boolean),
Optional message As String = "All content data check failed"
) As OperateResult(Of T)
public:
OperateResult<T>^ Check(
Func<T, bool>^ check,
String^ message = L"All content data check failed"
)
member Check :
check : Func<'T, bool> *
?message : string
(* Defaults:
let _message = defaultArg message "All content data check failed"
*)
-> OperateResult<'T>
参数
- check
- 类型:SystemFuncT, Boolean
检查的委托方法 - message (Optional)
- 类型:SystemString
检查失败的错误消息
返回值
类型:
OperateResultT如果检查成功,则返回对象本身,如果失败,返回错误信息。
参见