Created
December 7, 2010 20:56
-
-
Save slmcmahon/732395 to your computer and use it in GitHub Desktop.
Container for transferring data between a client application and an ASP.NET server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AppServer.Models | |
{ | |
/// <summary> | |
/// This is a generic server response container that provides a way to | |
/// transfer any serializable type between the client and the server with | |
/// meta info about the data being transferred | |
/// </summary> | |
/// <typeparam name="T">The type of the Payload Property</typeparam> | |
public class ServerResponse<T> | |
{ | |
/// <summary> | |
/// Holds the data that we want to return from the server | |
/// </summary> | |
public T Payload { get; set; } | |
/// <summary> | |
/// Indicates whether or not the action on the server was successful | |
/// </summary> | |
public bool Success { get; set; } | |
/// <summary> | |
/// Contains any messages that need to accompany the payload. This is | |
/// generally used to contain any exception mesages encountered during | |
/// the server operation. | |
/// </summary> | |
public string Message { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment