Last change
on this file since 28897 was 28897, checked in by davidb, 10 years ago |
GUI front-end to server base plus web page content
|
File size:
1.7 KB
|
Rev | Line | |
---|
[28897] | 1 | //------------------------------------------------------------------------------
|
---|
| 2 | // <copyright file="RpcResult.cs" company="Microsoft">
|
---|
| 3 | // Copyright (c) Microsoft Corporation. All rights reserved.
|
---|
| 4 | // </copyright>
|
---|
| 5 | //------------------------------------------------------------------------------
|
---|
| 6 |
|
---|
| 7 | namespace Microsoft.Samples.Kinect.Webserver
|
---|
| 8 | {
|
---|
| 9 | /// <summary>
|
---|
| 10 | /// Represents a remote procedure call result.
|
---|
| 11 | /// </summary>
|
---|
| 12 | /// <typeparam name="T">
|
---|
| 13 | /// Type of call result.
|
---|
| 14 | /// </typeparam>
|
---|
| 15 | public class RpcResult<T>
|
---|
| 16 | {
|
---|
| 17 | /// <summary>
|
---|
| 18 | /// Initializes a new instance of the <see cref="RpcResult{T}"/> class.
|
---|
| 19 | /// </summary>
|
---|
| 20 | /// <param name="success">
|
---|
| 21 | /// True if call was successful. False otherwise.
|
---|
| 22 | /// </param>
|
---|
| 23 | /// <param name="result">
|
---|
| 24 | /// Result of remote procedure call.
|
---|
| 25 | /// </param>
|
---|
| 26 | public RpcResult(bool success, T result)
|
---|
| 27 | {
|
---|
| 28 | this.Success = success;
|
---|
| 29 | this.Result = result;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | /// <summary>
|
---|
| 33 | /// Initializes a new instance of the <see cref="RpcResult{T}"/> class with
|
---|
| 34 | /// the default value of type T as the result.
|
---|
| 35 | /// </summary>
|
---|
| 36 | /// <param name="success">
|
---|
| 37 | /// True if call was successful. False otherwise.
|
---|
| 38 | /// </param>
|
---|
| 39 | public RpcResult(bool success) : this(success, default(T))
|
---|
| 40 | {
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | /// <summary>
|
---|
| 44 | /// True if call was successful. False otherwise.
|
---|
| 45 | /// </summary>
|
---|
| 46 | public bool Success { get; private set; }
|
---|
| 47 |
|
---|
| 48 | /// <summary>
|
---|
| 49 | /// Result of remote procedure call.
|
---|
| 50 | /// </summary>
|
---|
| 51 | public T Result { get; private set; }
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.