Created
December 14, 2012 02:17
-
-
Save btompkins/4281997 to your computer and use it in GitHub Desktop.
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
public class Location | |
{ | |
public double Latitude { get; set; } | |
public double Longitude { get; set; } | |
} | |
public class LocationProcessor : Processor<string, string, Location> | |
{ | |
public LocationProcessor() | |
{ | |
this.OutArguments[0].Name = "Location"; | |
} | |
public override ProcessorResult<Location> OnExecute( string latitude, string longitude) | |
{ | |
var lat = double.Parse(latitude); | |
var lon = double.Parse(longitude); | |
return new ProcessorResult<Location> { Output = new Location { Latitude = lat, Longitude = lon } }; | |
} | |
} | |
[ServiceContract] | |
public class MapResource { | |
[UriTemplate="{latitude},{longitude}"] | |
public Stream Get(Location location) { | |
//return the map | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment