File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,10 +9,14 @@ namespace MLAPI
99 public class RpcResponse < T > : RpcResponseBase
1010 {
1111 /// <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
1413 /// </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+ }
1620 }
1721
1822 /// <summary>
@@ -41,7 +45,7 @@ public abstract class RpcResponseBase
4145 /// The amount of time to wait for the operation to complete
4246 /// </summary>
4347 public float Timeout { get ; set ; } = 10f ;
44- internal object Result { get ; set ; }
48+ internal abstract object Result { set ; }
4549 internal Type Type { get ; set ; }
4650 }
4751}
You can’t perform that action at this time.
0 commit comments