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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security.Principal; | |
using System.Web; | |
using System.Web.Compilation; | |
using System.Web.Routing; | |
using Microsoft.WebPages; | |
/// <summary> |
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
@wipScenario: Assign roles Given the following roles exist | |
| name | | |
| admin | | |
| reader | | |
| publisher | | |
When I am on the roles page | |
Then I should see "admin" | |
And I should see "reader" | |
And I should see "publisher" |
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
using System; | |
using System.Web; | |
namespace LaTrompa.Services | |
{ | |
public interface IServiceable | |
{ | |
void Process(HttpContext context); | |
} |
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
using System; | |
using System.Web; | |
namespace LaTrompa.Services | |
{ | |
public class ServiceHandlerFactory | |
{ | |
public static IServiceable Create(UriProcessor up) | |
{ |
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
using System; | |
using System.Web; | |
using System.Web.Mvc; | |
using LaTrompa.Dal; | |
using MyGeneration.dOOdads; | |
namespace MvcDemo2.Controllers | |
{ | |
public class MovieController : Controller |
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
<ul> | |
<li><a runat="server" href="~/">Home</a></li> | |
<li><%= Html.ActionLink("Movies", "List", "Movie") %></li> | |
<li><%= Html.ActionLink("About Us", "About", "Home") %></li> | |
</ul> |
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 Person | |
{ | |
public string FirstName; | |
public string LastName; | |
public int Age; | |
} |
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
var templateString = "<div class=\"movieContainer\">\n<h4 class=\"movieTitle\">#{title}</h4>\n"; | |
templateString += "<img src=\"#{dvdCover}\" class=\"movieCover\" alt=\"#{title}\" />\n"; | |
templateString += "<p>#{description}</p>\n</div>\n"; | |
// the template (our formatting expression) | |
var myTemplate = new Template(templateString); | |
// our data to be formatted by the template | |
var show = {title: 'The Simpsons', description: 'Create by Matt Groening', dvdCover: 'images/simpsons.jpg' }; |
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
var template = "Hello #{member.name} our records indicate that you purchased the book: #{member.purchases.details.line1}."; |
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
['one', 'two','three'].each(function(s) { | |
alert(s); | |
}); | |
//or even better | |
['one','two','three'].each(doSomething); | |
function doSomething(s){ | |
if (s === 'one'){ | |
alert('The first element'). |
OlderNewer