This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Our Hello response object; /Index action | |
/// </summary> | |
public class HelloWorldResponse | |
{ | |
public bool Success { get; set; } | |
public DateTime Time { get; set; } |
This file contains hidden or 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
# Serializer loader | |
$extAssembly = [Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") | |
$serializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer | |
# Url's formatted | |
$gistUserListUrlForm = "http://gist.github.com/api/v1/json/gists/{0}"; | |
$gistInfoUrlForm = "http://gist.github.com/api/v1/json/{0}"; | |
$gistContentsUrlForm = "http://gist.github.com/raw/{0}/{1}"; | |
# Json downloader |
This file contains hidden or 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
using System; | |
using System.Linq; | |
using System.Web.Mvc; | |
using JSONPhoneApp1.Web.Models; | |
public class TeamController : Controller | |
{ | |
// Our Team data; fake data is loaded in the constructor. | |
private static TeamRepository _teams = new TeamRepository(); |
This file contains hidden or 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
using System; | |
using System.Windows; | |
using System.Windows.Input; | |
using JSONPhoneApp1.Common; | |
using JSONPhoneApp1.Service; | |
public class HelloWorldVM : ViewModelBase | |
{ | |
private HelloWorldService _helloServ = new HelloWorldService(); |
This file contains hidden or 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
using System; | |
using System.ComponentModel; | |
using System.Reflection; | |
using System.Windows; | |
using System.Windows.Input; | |
/// <summary> | |
/// Base class for Viewmodels providing common INotifyPropertyChanged functionality. | |
/// </summary> | |
public abstract class ViewModelBase : INotifyPropertyChanged |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// Team information | |
/// </summary> | |
public class Team | |
{ | |
public int Id { get; set; } |
This file contains hidden or 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Extensions to help postify parameters. | |
/// </summary> | |
public static class PostifyExtensions | |
{ | |
private static Postifier postifier = new Postifier(); |
This file contains hidden or 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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Runtime.Serialization.Json; | |
using System.Text; | |
/// <summary> | |
/// Strongly typed GET and POST utility enum. | |
/// </summary> | |
public enum HTTPMethod |
This file contains hidden or 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
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Interactivity; | |
public class BindableColumnHeader : Behavior<DataGridColumn> | |
{ | |
/// <summary> | |
/// The <see cref="Header" /> dependency property's name. | |
/// </summary> | |
public const string HeaderPropertyName = "Header"; |
This file contains hidden or 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
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Interactivity; | |
public class UpdateSourceOnTextChanged : Behavior<TextBox> | |
{ | |
BindingExpression textBinding; | |
protected override void OnAttached() | |
{ |