ByteTransformHelperGetSuccessResultFromOtherTResult, TIn 方法 |
使用指定的转换方法,来获取到实际的结果对象内容,所转换的规则
命名空间:
HslCommunication.Core
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static OperateResult<TResult> GetSuccessResultFromOther<TResult, TIn>(
OperateResult<TIn> result,
Func<TIn, TResult> trans
)
Public Shared Function GetSuccessResultFromOther(Of TResult, TIn) (
result As OperateResult(Of TIn),
trans As Func(Of TIn, TResult)
) As OperateResult(Of TResult)
public:
generic<typename TResult, typename TIn>
static OperateResult<TResult>^ GetSuccessResultFromOther(
OperateResult<TIn>^ result,
Func<TIn, TResult>^ trans
)
static member GetSuccessResultFromOther :
result : OperateResult<'TIn> *
trans : Func<'TIn, 'TResult> -> OperateResult<'TResult>
参数
- result
- 类型:HslCommunicationOperateResultTIn
原始的结果对象 - trans
- 类型:SystemFuncTIn, TResult
转换方法,从类型TIn转换拿到TResult的泛型委托
类型参数
- TResult
- 结果类型
- TIn
- 输入类型
返回值
类型:
OperateResultTResult类型为TResult的对象
参见