一款简单易用的基础网络通讯组件库。

Result 结构

结果返回

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:4.0.0-beta.143+5fcca7a4e70968794985dc3793adc50531308be6
C#
public struct Result : IEquatable<Result>
Inheritance
Object    ValueType    Result
Implements
IEquatableResult

构造函数

Result(Exception) 构造函数
Result(ResultCode) 构造函数
Result(ResultCode, String) 构造函数

属性

方法

FromCanceled 创建来自CanceledResult
FromError 创建来自ErrorResult
FromException(Exception) 根据异常生成结果对象
FromException(String) 创建来自ExceptionResult
FromFail 创建来自FailureResult
FromOvertime 创建来自OvertimeResult
FromSuccess 创建来自SuccessResult
GetTypeGets the Type of the current instance.
(继承自 Object。)
ToStringReturns the fully qualified type name of this instance.
(重写 ValueTypeToString)

字段

Canceled 取消
Default 初始状态
Disposed 操作对象已被释放
Overtime 超时
Success 成功
UnknownFail 未知失败

扩展方法

Map 将源对象的属性映射到目标对象的属性中。
(由 Mapper 定义。)
Map 将源对象映射到目标类型的实例。
(由 Mapper 定义。)
MapTTarget 将源对象映射到指定目标类型的新实例。
(由 Mapper 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

参见