File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,14 @@ namespace MLAPI
9
9
public class RpcResponse < T > : RpcResponseBase
10
10
{
11
11
/// <summary>
12
- /// Gets the value from the operation.
13
- /// Note that this is an expensive operation, grab and cache
12
+ /// Gets the return value of the operation
14
13
/// </summary>
15
- public T Value => Result == null ? default ( T ) : ( T ) Result ;
14
+ public T Value { get ; private set ; }
15
+
16
+ internal override object Result
17
+ {
18
+ set => Value = ( T ) value ;
19
+ }
16
20
}
17
21
18
22
/// <summary>
@@ -41,7 +45,7 @@ public abstract class RpcResponseBase
41
45
/// The amount of time to wait for the operation to complete
42
46
/// </summary>
43
47
public float Timeout { get ; set ; } = 10f ;
44
- internal object Result { get ; set ; }
48
+ internal abstract object Result { set ; }
45
49
internal Type Type { get ; set ; }
46
50
}
47
51
}
You can’t perform that action at this time.
0 commit comments