-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathResult.cs
49 lines (39 loc) · 1.07 KB
/
Result.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Text;
namespace DigitalPlatform
{
[Serializable()]
public class NormalResult
{
public int Value { get; set; }
public string ErrorInfo { get; set; }
public string ErrorCode { get; set; }
public NormalResult(NormalResult result)
{
this.Value = result.Value;
this.ErrorInfo = result.ErrorInfo;
this.ErrorCode = result.ErrorCode;
}
public NormalResult(int value, string error)
{
this.Value = value;
this.ErrorInfo = error;
}
public NormalResult()
{
}
public override string ToString()
{
return $"Value={Value},ErrorInfo={ErrorInfo},ErrorCode={ErrorCode}";
}
}
public class TextResult : NormalResult
{
public string Text { get; set; }
public override string ToString()
{
return $"Value={Value},Text={Text},ErrorInfo={ErrorInfo},ErrorCode={ErrorCode}";
}
}
}