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.Configuration; | |
using System.Data.SqlClient; | |
using System.Data; | |
using System.IO; | |
using System.Reflection; | |
using System.Web; |
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
DataBus = ServiceBusFactory.New(x => | |
{ | |
x.ReceiveFrom(ConfigurationManager.AppSettings["SourceQueue"]); | |
x.SetPurgeOnStartup(false); | |
x.UseMsmq(); | |
x.UseMulticastSubscriptionClient(m => m.SetNetworkKey(ConfigurationManager.AppSettings["NetworkName"])); | |
x.SetConcurrentConsumerLimit(4); | |
x.UseDistributorFor<DoSimpleWorkItem>(); |
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
3.Times(x => Console.Write("{0} ", x)); | |
5.UpTo(10).Each(x => Console.Write("{0} ", x)); | |
10.DownTo(5).Each(x => Console.Write("{0} ", x)); |
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
[TestClass] | |
public class RavenDbTests | |
{ | |
private DocumentStore _documentStore; | |
[TestInitialize] | |
public void Inicializacao() | |
{ | |
_documentStore = new DocumentStore{Url = "http://localhost:8080"}; | |
_documentStore.Initialize(); |
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
private IDocumentStore _documentStore; | |
[TestInitialize] | |
public void Inicializacao() | |
{ | |
_documentStore = new DocumentStore {Url = "http://localhost:8080"}; | |
_documentStore.Initialize(); | |
} |
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(IDocumentSession session = _documentStore.OpenSession()) | |
{ | |
session.Store(album); | |
session.SaveChanges(); | |
} |
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
const double pi = 3.14; | |
// erro de compilação | |
pi = 3.15; |
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
class Foo | |
{ | |
private readonly double _pi = 3.14; | |
private readonly double _foo; | |
public Foo() | |
{ | |
_foo = Double.MaxValue; | |
} |
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 nomes = new List<string>(); | |
for (int i = 0; i < 1000; i++) | |
{ | |
nomes.Add("Althmann"); | |
} | |
Console.WriteLine("Digite o mesmo texto várias vezes."); | |
while (true) |
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 nomes = new List<string>(); | |
for (int i = 0; i < 1000; i++) | |
{ | |
nomes.Add("Althmann"); | |
} | |
Console.WriteLine("Agora usando String.Intern"); | |
Console.WriteLine("Digite o mesmo texto várias vezes."); |
OlderNewer