Skip to content

Instantly share code, notes, and snippets.

_client = new TcpClient(_serveraddress, _port);
var certcoll = new X509Certificate2Collection {_certificate};
_sslStream = new SslStream(_client.GetStream(), false, ValidateCertificate, null);
_sslStream.AuthenticateAsClient("irc.rizon.net", certcoll, SslProtocols.Default, false);
_reader = new StreamReader(_sslStream);
_writer = new StreamWriter(_sslStream) {NewLine = "\r\n", AutoFlush = true};
var match in from r in entities.Regexes
select new System.Text.RegularExpressions.Regex(r.Expression)
into regex
from Match match in regex.Matches(source)
where !entities.Links.Any(l => l.Link1 == match.Groups[1].Value
@twibird
twibird / gist:b8d00992355e1c8d0287
Created August 23, 2015 06:13
Regex constructor overload
public partial class Regex
{
public Regex()
{
this = new System.Text.RegularExpressions.Regex(Pattern);
}
public string Pattern { get; set; }
}