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.ComponentModel; | |
using System.Diagnostics.Contracts; | |
using System.Linq.Expressions; | |
namespace ConsoleApplication | |
{ | |
class MyViewModel : INotifyPropertyChanged | |
{ | |
public object Value { get; set; } |
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 crlf = @"(\r\n)"; | |
var wsp = @"[ \t]"; | |
var vchar = @"[\u0021-\u007e]"; | |
var obsNoWsCtl = @"[\u0001-\u0008\u000b\u000c\u000e-\u001f\u007f]"; | |
var commentText = @"([\u0021-\u0027\u002a-\u005b\u005d-\u007e]|" + obsNoWsCtl + ")"; | |
var quotedPair = @"\\(" + vchar + "|" + wsp + @"|[\r\n\0]|" + obsNoWsCtl + ")"; | |
var quotedText = @"([\u0021\u0023-\u005b\u005d-\u007e]|"+obsNoWsCtl+")"; | |
var domainText = "([\u0021-\u005A\u005e-\u007e]|" + obsNoWsCtl + ")"; | |
var atomText = "[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]"; | |
var fws = "(" + wsp + "+" + "(" + crlf + wsp + "+)?|(" + crlf + wsp + "+)+)"; |
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
void SendEmail(string address) | |
{ | |
// ... | |
} |
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 static void Main(string[] args) | |
{ | |
var s = "<x>els o, ø and y\u001a</x>".Replace((char)0x1a, ' '); | |
var utf8 = Encoding.UTF8.GetBytes(s); | |
var utf16 = Encoding.Unicode.GetBytes(s); | |
using (MemoryStream memoryStream = new MemoryStream(utf8)) | |
using (XmlTextReader xsText = new XmlTextReader(memoryStream)) | |
{ |
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; | |
static class Program | |
{ | |
public static void Main() | |
{ | |
new Slow().Go(); | |
} | |
} | |
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; | |
static class Program | |
{ | |
public static void Main() | |
{ | |
using (new Slow()) ; | |
} | |
} | |
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
{ | |
Slow slow = null; | |
try | |
{ | |
slow = new Slow(); | |
} | |
finally | |
{ | |
if (slow != null) | |
{ |
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
{ | |
Slow slow = null; | |
try | |
{ | |
slow = new Slow(); | |
} | |
finally | |
{ | |
if (slow != null) | |
{ |
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 interface IQueryHandler<in TQuery, QueryResult> // for some reason out parameters can't be 'out', I probably need to read up why | |
{ | |
/// result indicates success? | |
bool Handle(TQuery query, out TQueryResult); | |
} | |
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
# UTF-8 (Unicode) compose sequence | |
# [email protected] | |
# | |
# Part 1 - Manual definitions | |
# Spacing versions of dead accents | |
<dead_tilde> <space> : "~" asciitilde # TILDE | |
<dead_tilde> <dead_tilde> : "~" asciitilde # TILDE | |
<dead_acute> <space> : "'" apostrophe # APOSTROPHE |
OlderNewer