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
<files> | |
<file src="Enumeration.cs" target="content\Headspring\Enumeration.cs" /> | |
<file src="LICENSE.txt" target="content\Headspring\LICENSE.txt" /> | |
</files> |
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
<files> | |
<file src="$package_dir\*.dll" target="lib\net40" /> | |
<file src="$package_dir\*.pdb" target="lib\net40" /> | |
</files> |
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
<files> | |
<file src="$package_dir\*.dll" target="lib\net40" /> | |
<file src="$package_dir\*.pdb" target="lib\net40" /> | |
<file src="$source_dir\**\*.cs" target="src" /> | |
</files> |
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
public ActionResult Edit() | |
{ | |
var conferenceName = Request["ConferenceName"] as string; | |
var repository = new ConferenceRepository(); | |
var conference = repository.GetByName(conferenceName); | |
if (conference == null) | |
return View("ConferenceNotFound"); | |
ViewData["ConferenceId"] = conference.Id, |
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
[HttpGet] | |
public ActionResult Edit(Conference conference) | |
{ | |
return AutoMapView<ConferenceEditModel(View(conference)); | |
} | |
[HttpPost] | |
public ActionResult Edit(ConferenceEditModel form) | |
{ | |
if (!ViewData.ModelState.IsValid) |
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
[HttpGet] | |
public ActionResult Edit(Conference conference) | |
{ | |
return AutoMapView<ConferenceEditModel>(View(conference)); | |
} | |
[HttpPost] | |
public ActionResult Edit(ConferenceEditModel form) | |
{ | |
if (!ViewData.ModelState.IsValid) |
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
Json.Rule = | |
Choice(True, False, Null, Number, Quotation, Dictionary, Array); | |
Dictionary.Rule = | |
from pairs in Between(Token("{"), ZeroOrMore(Pair, Token(",")), Token("}")) | |
select ToDictionary(pairs); | |
Pair.Rule = | |
from key in Quotation | |
from colon in Token(":") |
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
public string Stringify(int x) | |
{ | |
return x.ToString(); | |
} | |
… | |
Func<int, string> func = Stringify; | |
Converter<int, string> convert = Stringify; |
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
public string Stringify(int x) | |
{ | |
return x.ToString(); | |
} | |
//Later... | |
Func<int, string> func = Stringify; | |
Converter<int, string> convert = Stringify; |
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
int[] integers = new[] {1, 2, 3}; | |
integers.Select(func); // returns "1", "2", "3" | |
integers.Select(convert); // fails to compile! |