Snippets

Alan Holt apxA: Untitled snippet

Created by Alan Holt
/*
 * Created by SharpDevelop.
 * User: Dev
 * Date: 9/5/2014
 * Time: 8:54 PM
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;

namespace Foo.Bar.Suite.framework.json
{
	/// <summary>
	/// Description of LoginResponse.
	/// </summary>
	public class LoginResponse : BaseJsonObject
	{
		public bool success{get;set;}
		public String firstName{get;set;}
		public String forward{get;set;}
		
		public LoginResponse()
		{
		}
		public LoginResponse(bool success,String firstName,String forward){
			this.success = success;
			this.firstName = firstName;
			this.forward = forward;
		}
		
		/// <inheritdoc/>
		public override String ToString(){
			return Newtonsoft.Json.JsonConvert.SerializeObject(this);
		}
		
		/// <summary>
		/// Convert the json string to a LoginResponse object
		/// </summary>
		/// <param name="json"></param>
		/// <returns></returns>
		public static LoginResponse fromString(String json){
			return Newtonsoft.Json.JsonConvert.DeserializeObject<LoginResponse>(json);
		}
		
		
	}
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.