Class FaceRpcResponse
Namespace: haechi.face.unity.sdk.Runtime.Client
Assembly: cs.temp.dll.dll
Syntax
public class FaceRpcResponse : RpcResponseMessage
Constructors
FaceRpcResponse()
Declaration
public FaceRpcResponse()
FaceRpcResponse(WebviewRpcRequest)
Declaration
public FaceRpcResponse(WebviewRpcRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| WebviewRpcRequest | request | Raw request includes id, method, and params |
FaceRpcResponse(Object)
Declaration
public FaceRpcResponse(object id)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | id | Rpc ID. |
FaceRpcResponse(Object, JToken)
Declaration
public FaceRpcResponse(object id, JToken result)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | id | Rpc ID. |
| JToken | result | Rpc result. |
FaceRpcResponse(Object, RpcError)
Declaration
public FaceRpcResponse(object id, RpcError error)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | id | Rpc ID. |
| RpcError | error | Error message. |
FaceRpcResponse(String)
Declaration
public FaceRpcResponse(string method)
Parameters
| Type | Name | Description |
|---|---|---|
| String | method | Rpc method. |
Properties
From
Declaration
public string From { get; }
Property Value
| Type | Description |
|---|---|
| String | From value that indicates where this rpc request made. |
Id
Declaration
public object Id { get; }
Property Value
| Type | Description |
|---|---|
| Object | Rpc ID. |
Method
Declaration
public string Method { get; }
Property Value
| Type | Description |
|---|---|
| String | Rpc method name. |
Request
Declaration
public WebviewRpcRequest Request { get; }
Property Value
| Type | Description |
|---|---|
| WebviewRpcRequest | Webview sent rpc request message. |
To
Declaration
public string To { get; }
Property Value
| Type | Description |
|---|---|
| String | To value that indicates where this rpc request received. |
Methods
CastResult<T>()
Cast result to generic type.
Declaration
public T CastResult<T>()
Returns
| Type | Description |
|---|---|
| T | Object. |
Type Parameters
| Name | Description |
|---|---|
| T | Object you want to cast to. |
Exceptions
| Type | Condition |
|---|---|
| haechi.face.unity.sdk.Runtime.Exception.WebviewClosedException | Throws if unwanted webview closing event invoked. |
IsWebviewClosed()
Declaration
public bool IsWebviewClosed()
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if webview closed. |
ToString()
Overrides ToString() method to customize.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | Customized string value. |
WebviewClosed()
Check if webview page closed.
Declaration
public static FaceRpcResponse WebviewClosed()
Returns
| Type | Description |
|---|---|
| FaceRpcResponse | Rpc response. |