Esempio n. 1
0
 /// <summary>
 /// Creates a new RPC response.
 /// </summary>
 /// <param name="code">The code.</param>
 /// <param name="message">The message.</param>
 /// <param name="details">The details.</param>
 internal RpcResponse(string code, string message, string details)
 {
     _error = new RpcError(code, message, details);
     _data  = null;
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a new RPC response.
 /// </summary>
 /// <param name="data">The provided data.</param>
 /// <param name="type">The data type.</param>
 internal RpcResponse(object data, Type type)
 {
     _data     = data;
     _dataType = type;
     _error    = null;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new RPC exception with the RPC error object.
 /// </summary>
 /// <param name="error">The error.</param>
 public RpcException(RpcError error)
     : this(error.Code, error.Message, error.Details)
 {
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new RPC response.
 /// </summary>
 /// <param name="data">The provided data.</param>
 internal RpcResponse(object data)
 {
     _data  = data;
     _error = null;
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a new RPC exception with the RPC error object and inner exception.
 /// </summary>
 /// <param name="error">The error.</param>
 /// <param name="innerException">The inner exception.</param>
 public RpcException(RpcError error, Exception innerException)
     : this(error.Code, error.Message, innerException)
 {
 }