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 Manos; | |
using System.IO; | |
using LibGit2Sharp.Core; | |
namespace GitWiki | |
{ | |
public class GitWiki : ManosApp | |
{ | |
static string repodir = "testrepo.git/.git/"; |
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; | |
using System.Collections.Generic; | |
// Modified version of SmartIrc4Net available at: https://github.com/txdv/smartirc4net | |
using Meebey.SmartIrc4net; | |
using Manos.Http; | |
public class Test | |
{ |
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.Security.Cryptography; | |
namespace Awesome | |
{ | |
public static class RandomGenerator | |
{ | |
private static RNGCryptoServiceProvider global = | |
new RNGCryptoServiceProvider(); | |
[ThreadStatic] |
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 Manos; | |
using Manos.IO; | |
using Manos.Threading; | |
using Manos.IO.Managed; | |
using System.Threading; | |
namespace Manos | |
{ | |
public static class BoundaryExtensions |
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.Text; | |
using Manos.IO; | |
namespace Test | |
{ | |
public static class ByteBufferExtensions | |
{ | |
public static string GetString(this ByteBuffer buffer, Encoding encoding) |
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 ParseHost(string host, TimeSpan timeSpan, Action<Exception, string, IPAddress> callback) | |
{ | |
IPAddress ipaddress; | |
if (IPAddress.TryParse(host, out ipaddress)) { | |
callback(null, host, ipaddress); | |
} else { | |
bool timeout = false; | |
Context.CreateTimerWatcher(timeSpan, delegate { | |
callback(new Exception("Timeout while resolving"), null, null); | |
timeout = 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
namespace NiceParsing | |
{ | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
var packetWrapper = new { | |
Length = 3, | |
Number = typeof(byte) | |
}; |
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 Proposal1(Context context) | |
{ | |
// Old school C# style! | |
// Has the ability to actually remove those events afterwards!. | |
MySqlConnector.Connect(context, "test", "test", "password", (stream) => { | |
var cmd = stream.Query("SELECT name, surname FROM people where city = 'Aachen'"); | |
cmd.OnRow += (row) => { | |
Console.WriteLine("{0} {1}", row.name, row[1]); | |
}); | |
cmd.OnEnd += () => { |
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; | |
namespace Epoch | |
{ | |
public class Epoch | |
{ | |
static readonly DateTime epochStart = new DateTime(1970, 1, 1, 0, 0, 0); | |
static readonly DateTimeOffset epochDateTimeOffset = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero); | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> | |
<ProductVersion>10.0.0</ProductVersion> | |
<SchemaVersion>2.0</SchemaVersion> | |
<ProjectGuid>{34F9CC9C-7FA8-4C7C-B21B-139A0C1B56FD}</ProjectGuid> | |
<OutputType>Exe</OutputType> | |
<RootNamespace>ByteBufferCollection</RootNamespace> |
OlderNewer