Skip to content

Instantly share code, notes, and snippets.

@chrisnicola
Created January 20, 2011 01:22
Show Gist options
  • Save chrisnicola/787236 to your computer and use it in GitHub Desktop.
Save chrisnicola/787236 to your computer and use it in GitHub Desktop.
using (OpenRastaConfiguration.Manual)
{
ResourceSpace.Has.ResourcesOfType<RetailStream>()
.AtUri("/streams/{id}").And.AtUri("/streams")
.HandledBy<RetailStreamHandler>()
.TranscodedBy<JsonRestCodec>().And.;
ResourceSpace.Has.ResourcesOfType<RetailStreamListItem[]>()
.AtUri("/streams")
.HandledBy<RetailStreamHandler>()
.TranscodedBy<JsonRestCodec>();
ResourceSpace.Has.ResourcesOfType<ProductModel>()
.AtUri("/products/{id}").And.AtUri("/products/{type}/{manufacturer}/{model}")
.And.AtUri("/products")
.HandledBy<ProductHandler>()
.TranscodedBy<JsonRestCodec>();
ResourceSpace.Has.ResourcesOfType<ProductModel[]>()
.AtUri("/products")
.HandledBy<ProductHandler>()
.TranscodedBy<JsonRestCodec>();
ResourceSpace.Has.ResourcesOfType<AssetLink[]>()
.AtUri("/products/{id}/add-asset")
.HandledBy<ProductAssetHandler>()
.TranscodedBy<JsonRestCodec>();
ResourceSpace.Has.ResourcesOfType<ShoppingCart>()
.AtUri("/shoppingcarts/{id}").And.AtUri("/shoppingcarts")
.HandledBy<ShoppingCartHandler>()
.TranscodedBy<JsonRestCodec>();
ResourceSpace.Has.ResourcesOfType<ShoppingCartListItem[]>()
.AtUri("/shoppingcarts")
.HandledBy<ShoppingCartHandler>()
.TranscodedBy<JsonRestCodec>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment