Show / Hide Table of Contents

Class ClientActionResult

クライアントデバイスに対して表示された ClientActionRequest 要求のクライアント側の結果を表します。 ClientActionResult 値は、任意のJSON 型を使用してクライアントによって提供される場合がありますが、通常は文字列です。 したがって、クライアントアクション要求の結果を読み取るために2つの方法が提供されています。

  • string Result - 結果を文字列値として返すプロパティ (使用可能な場合)。
  • オブジェクト GetResultObject() - 固有のオブジェクト (PageInfo など) として結果を返すメソッド。

アプリケーションは、Type または Requestプロパティをチェックし、それに応じて正しいオブジェクトにキャストすることで、GetResultObject() の正しいオブジェクトの戻り値の型を決定してください。

Inheritance
System.Object
ClientActionResult
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StarMicronics.CloudPrnt.CpMessage
Assembly: cs.temp.dll.dll
Syntax
public class ClientActionResult

Properties

Request

要求の種類に対応する文字列

Declaration
public string Request { get; }
Property Value
Type Description
System.String

Result

クライアントによって通知された結果の文字列値 この値は、特定の ClientAction 結果が JSON 文字列として表される場合にのみ利用可能です。 その他の型の場合は、デシリアライズ化の文字列として基になる JSON object を返します

Declaration
public string Result { get; }
Property Value
Type Description
System.String

Type

'ClientActions' 列挙型と対応する要求の種類。認識できない型の場合、'ClientActions.Other' になり、 アプリケーションは代わりに 'Request' 文字列プロパティ値をチェックする必要があります。

Declaration
public ClientActions Type { get; }
Property Value
Type Description
ClientActions

Methods

GetResultObject()

結果に適したオブジェクトを返します。ほとんどの場合、これは文字列になりますが、一部の ClientActionResult 型では特定のオブジェクト型になります。 アプリケーションは、Type または Request プロパティを確認する必要があります。 正しい戻りオブジェクト型を決定し、それに応じてキャストします。

Declaration
public object GetResultObject()
Returns
Type Description
System.Object

結果を表すオブジェクト。ほとんどの場合、オブジェクトはstring 型になります。クライアント アクションの結果が ClientActions.PageInfo 要求に対する応答である場合、返されるオブジェクトは CpMessage.PageInfo オブジェクトになります。

In This Article
Back to top