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
When I do "git status", this is shown: | |
# On branch master | |
# Changes to be committed: | |
# (use "git reset HEAD <file>..." to unstage) | |
# | |
# modified: example/HelloWorldMvc/HelloWorldMvc.csproj | |
# modified: example/TrackWebService/TrackWebService.csproj | |
# | |
# Changed but not updated: |
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 SubdomainRoute : Route, IRouteWithArea | |
{ | |
private string[] namespaces; | |
public string Subdomain { get; private set; } | |
public SubdomainRoute(string subdomain, string url, object defaults, string[] namespaces) | |
: base(url, new RouteValueDictionary(defaults), new MvcRouteHandler()) | |
{ | |
this.Subdomain = subdomain; | |
this.namespaces = namespaces; |
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 AdminAreaRegistration : AreaRegistration | |
{ | |
public override string AreaName | |
{ | |
get { return "Admin"; } | |
} | |
public override void RegisterArea(AreaRegistrationContext context) | |
{ | |
context.Routes.Add("Admin_Home", new SubdomainRoute( |
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 myAjaxChart; | |
$(document).ready(function () { | |
myAjaxChart = new Highcharts.Chart({ | |
chart: { | |
renderTo: 'myAjaxChart', | |
type: 'column' | |
}, title: { | |
text: 'Tickets per month' | |
}, xAxis: { | |
categories: ['Jan','Feb','Mar'] |
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
@( | |
Html.Highchart("myAjaxChart") | |
.Title("Tickets per month") | |
.WithSerieType(ChartSerieType.Column) | |
.AxisX("Jan", "Feb", "Mar") | |
.AxisY("Quantity") | |
.Series( | |
AjaxConfig.LoadFrom(Url.Action("LoadData", "Ajax")).Reload(5000) | |
) | |
.ToHtmlString() |
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
<script type="text/javascript"> | |
var message = '@(MyStrings.WelcomeMessage)'; | |
</script> | |
<script type="text/javascript" src="util.js"></script> | |
Then, in your util.js you do: | |
alert(message); |
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
<script type="text/javascript" src="util.js"></script> | |
In your util.js you do: | |
alert(MyStrings.WelcomeMessage); |
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
[HttpGet] | |
public ActionResult LocalizedScript() | |
{ | |
string javaScript = SerializeResourceToJavaScript(); | |
return Content(javaScript, "application/javascript"); | |
} | |
[NonAction] | |
private string SerializeResourceToJavaScript() | |
{ |
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
//Usage: | |
context.Routes.Add("Site_Home", new SubdomainRoute( | |
"", | |
"", | |
new { area = this.AreaName, controller = "Home", action = "Index" }, | |
new { httpMethod = new HttpMethodConstraint("GET") }, | |
new string[] { "SubdomainRouting.Areas.Site.Controllers" } | |
)); | |
//Custom Route: |
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
Arrisquei uma implementação do acoplamento aferente. | |
Meu objetivo foi fazer os testes passarem, agora eu preciso refatorar, pois a implementação está bem amadora. | |
O que falta: | |
1) Não é necessário coletar todos os tipos que um tipo referencia para depois saber se esta coleção referencia ou não o tipo que está sendo calculado o Ca. Se no meio da inspeção encontrarmos a referência que procuramos, podemos abortar o resto da inspeção | |
2) Atualmente está buscando apenas os tipos do assembly atual. Como fazer para incluir todos os assemblies que referenciam o assembly analisado? Não posso pegar todos os do AppDomain, pois eu teria como resultados assemblies sem imporância neste contexto, como as do próprio .net, nunit e specflow. |
OlderNewer