Skip to content

Instantly share code, notes, and snippets.

@rpgmaker
rpgmaker / gist:3522016
Created August 30, 2012 03:26
Http Streaming
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Threading;
using System.IO;
using System.Text.RegularExpressions;
namespace TestStreamingHttp {
@rpgmaker
rpgmaker / gist:3411649
Created August 21, 2012 04:45
MessageStoreNotification
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Interface;
using PServiceBus.Core.Runtime.Messages;
using PServiceBus.Services.Gateway.Runtime;
using PServiceBus.Core.Runtime;
namespace PServiceBus.MessageStores {
@rpgmaker
rpgmaker / gist:3379157
Created August 17, 2012 14:31
ZeroMQReceiver
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.ExceptionServices;
using System.Threading;
using ZeroMQ;
namespace Phoenix.ZeroMQConnectors {
@rpgmaker
rpgmaker / gist:3336912
Created August 13, 2012 04:18
XmlSerializer Generator (Final I think)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Reflection.Emit;
using System.Xml;
namespace PServiceBus.Serializer.Xml {
@rpgmaker
rpgmaker / gist:3270438
Created August 6, 2012 04:27
XmlReaderEx (Improved Version 3)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
@rpgmaker
rpgmaker / gist:3262261
Created August 5, 2012 06:28
XmlReaderEx (Improved Version 2)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Security;
@rpgmaker
rpgmaker / gist:3234105
Created August 2, 2012 05:43
XmlReaderEx (Improved Version)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
namespace PServiceBus.Serializer.Xml {
public unsafe class XmlReaderEx {
@rpgmaker
rpgmaker / gist:3233902
Created August 2, 2012 05:15
Small Xml Result
Iteration: 100000
Completed TestXmlReader in Avg 528 Milliseconds
Iteration: 100000
Completed TestXmlReaderEx in Avg 162 Milliseconds
---------------------------------------------------------
Iteration: 1000000
Completed TestXmlReader in Avg 5223 Milliseconds
@rpgmaker
rpgmaker / gist:3217797
Created July 31, 2012 15:25
DoSomething2 IL
.method private hidebysig static void DoSomething2() cil managed
{
.maxstack 2
.locals init (
[0] int32 id)
L_0000: ldsfld class [mscorlib]System.Random TestILIdeas.Program::_rand
L_0005: callvirt instance int32 [mscorlib]System.Random::Next()
L_000a: stloc.0
L_000b: ldloc.0
L_000c: ldc.i4.1
@rpgmaker
rpgmaker / gist:3217794
Created July 31, 2012 15:25
DoSomething IL
.method private hidebysig static void DoSomething() cil managed
{
.maxstack 2
.locals init (
[0] int32 id)
L_0000: ldsfld class [mscorlib]System.Random TestILIdeas.Program::_rand
L_0005: callvirt instance int32 [mscorlib]System.Random::Next()
L_000a: stloc.0
L_000b: ldloc.0
L_000c: brtrue.s L_000f