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
Configuration smtpServerConfiguration = new Configuration(); | |
smtpServerConfiguration.SetPort(25); | |
smtpServerConfiguration.SetServer("smtp.8bitclockwork.com"); | |
smtpServerConfiguration.SetTimeout(60); |
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
Configuration smtpServerConfiguration = new Configuration(); | |
smtpServerConfiguration | |
.SetPort(3) | |
.SetServer("bob") | |
.SetTimeout(333); |
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 Configuration | |
{ | |
private String _server { get; set; } | |
private int _timeout { get; set; } | |
private int _port { get; set; } | |
public Configuration SetPort(int port) | |
{ | |
_port = port; | |
return this; |
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 result = session | |
.Query<Wine>() | |
.Where(p => p.Id == wineId)) | |
.First() |
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 x = 10; | |
var y = "2"; | |
var result = x * y; |
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
HTTP/1.0 304 Not Modified | |
Date: Wed, 09 May 2012 00:26:52 GMT | |
Content-Type: text/html; charset=UTF-8 | |
Last-Modified: Tue, 08 May 2012 23:51:26 GMT | |
Age: 113 | |
X-Cache: HIT from cp1015.eqiad.wmnet | |
X-Cache-Lookup: HIT from cp1015.eqiad.wmnet:3128 | |
X-Cache: MISS from cp1011.eqiad.wmnet | |
X-Cache-Lookup: MISS from cp1011.eqiad.wmnet:80 | |
Connection: keep-alive |
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
dynamic expando = new ExpandoObject(); | |
expando.Title = "Ceci est un titre"; | |
expando.Nom = "Paradis"; | |
expando.Prenom = "Pascal"; | |
foreach (var e in (IDictionary<String, Object>) expando) | |
{ | |
Console.WriteLine(e.Value); | |
} |
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
dynamic expando = new ExpandoObject(); | |
expando.Title = "Ceci est un titre"; | |
expando.Nom = "Paradis"; | |
expando.Prenom = "Pascal"; |
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
dynamic urlDictionnary = new UrlDictionnary(); | |
urlDictionnary.HomePage = "http://www.parad.is"; | |
urlDictionnary.About = "http://frenchcoding.wordpress.com/about/"; | |
urlDictionnary.Blog = "http://frenchcoding.wordpress.com"; |
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 UrlDictionnary : DynamicObject | |
{ | |
Dictionary<string, string> dictionary = new Dictionary<string, string>(); | |
public int Count | |
{ | |
get | |
{ | |
return dictionary.Count; | |
} |
OlderNewer