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
using System.Configuration; | |
using Aramis.Core; | |
using Aramis.Persistencia.Configuracao.Convencoes; | |
using FluentNHibernate.Automapping; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using NHibernate; | |
using NHibernate.Tool.hbm2ddl; | |
using NHConfiguration = NHibernate.Cfg.Configuration; |
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
using Aramis.Core; | |
using FluentNHibernate.Automapping; | |
using FluentNHibernate.Automapping.Alterations; | |
namespace Aramis.Persistencia.Configuracao.Convencoes | |
{ | |
public class EventoOverride : IAutoMappingOverride<Evento> | |
{ | |
public void Override(AutoMapping<Evento> mapping) | |
{ |
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
var resposta = Ext.decode(response.responseText); | |
var novaPasta = resposta.Dados; | |
var novoNode = new Ext.tree.TreeNode({ | |
id: novaPasta.id, | |
idServer: novaPasta.idServer, | |
text: novaPasta.text, | |
textFilter: novaPasta.textFilter, | |
children: [], | |
leaf: true |
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 class LimiteDeSaldo | |
{ | |
private decimal disponivel; | |
private decimal concedido; | |
private decimal margemDeCredito; | |
public LimiteDeSaldo(decimal disponivel, decimal concedido, decimal margemDeCredito) { | |
this.disponivel = disponivel; | |
this.concedido = concedido; | |
this.margemDeCredito = margemDeCredito; |
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
NashConventions | |
public void IgnorarPropriedadesQueNaoPossuemSet(IPropertyIgnorer ignorer) | |
{ | |
ignorer.IgnoreProperties(member => !member.CanWrite); | |
} | |
FluentConfigurator | |
.OverrideAll(NashConventions.Para.IgnorarPropriedadesQueNaoPossuemSet) |
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 class Repositorio<T> : IRepositorio<T> where T : Entidade | |
{ | |
public void Altera(T entidade) | |
{ | |
NhSession.Merge(entidade); | |
NhSession.Flush(); | |
} | |
public T Inclui(T entidade) | |
{ |
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
ncrunch - testes automatizados em tempo real, relacionando blocos com testes que os cobrem | |
test driven.net - testes automatizados com atalhos de teclado | |
code alignment - terapia ocupacional, alinhando, geralmente, atribuições em forma de tabela | |
css less - carregas arquivos less junto com o css | |
gac viewer - visualização decente do gac | |
git source control provider - extensão para comando simples do git | |
go to definition - ctrl+click pra navegar entre tipos | |
indent guides - exibe identação | |
javascript parser - exibe document outline de javascript | |
jslint - análise de código javascript |
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 class Servicos : NancyModule | |
{ | |
public Servicos() | |
{ | |
Get[ "/servicos" ] = parms => Response.AsJson(new List<object> | |
{ | |
new { id = 1, nome = "Desenvolvimento" }, | |
new { id = 2, nome = "Consultoria" } | |
}); | |
} |
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
Isso não compila: | |
Func<int> a = null; | |
Func<object> b = a; | |
Isso compila: | |
Func<string> a = null; | |
Func<object> b = a; |
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
Se isso funciona: | |
int a = 1; | |
object b = a; | |
isso também deveria funcionar: | |
Func<int> c = null; | |
Func<object> d = c; |