View evil.cs
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
private static void ChangeToReturnFalse(MethodInfo methodInfo) | |
{ | |
var intPtrConstructor = typeof(IntPtr).GetConstructor(new[] { typeof(void*) }); | |
var method = new DynamicMethod("ChangeToReturnFalse", typeof(IntPtr), Type.EmptyTypes, typeof(ServiceLocationModule)); | |
var generator = method.GetILGenerator(); | |
generator.Emit(OpCodes.Ldftn, methodInfo); | |
generator.Emit(OpCodes.Newobj, intPtrConstructor); | |
generator.Emit(OpCodes.Ret); | |
var addressFunctor = (Func<IntPtr>)method.CreateDelegate(typeof(Func<IntPtr>)); | |
var address = addressFunctor(); |
View Test.cs
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.Reflection.Emit; | |
class Program | |
{ | |
delegate object FuncObjectObject(Object o); | |
static void Main(string[] args) | |
{ | |
var dm = new DynamicMethod("", typeof(object), new [] { typeof(object) }); |
View Action.il
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
.assembly ActionTest {} | |
.assembly extern mscorlib | |
{ | |
.ver 4:0:0:0 | |
.publickeytoken = (B7 7A 5C 56 19 34 E0 89) | |
} | |
.namespace Test | |
{ |
View a.The Code You Run.cs
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; | |
class Program | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("Hello, CoreCLR!"); | |
} | |
} |
View gist:141dcbeed7079af1662e
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
vb6 vba vb homework grails coldfusion flash iphone air sifr ms-access db2 vbscript perl sap jpa gql java-ee magento ipad qt weblogic blackberry gwt pentaho wordpress mac corba intellij-idea lucene safari seo redis itouch ant antlr ada gtk doctrine lotus tomcat jcl mongodb netlogo nosql smalltalk beamer spring symbian agile firebird samba jasper-reports sybase fortran qtp itunes sqlite soapui acrobat actionscript* flex* cocoa* struts* ruby* zend* *php* java-* joomla* maven* *hibernate* ipod* xcode* jboss* dotnetnuke* *facebook* java groovy* *jaxb* kanban iphone* telerik osx python* jsf* jquery* r latex oracle* android* devexpress umbraco* wolfram-mathematica awk sed *dreamweaver* symfony* crystal-reports* alfresco *postgres* dojo* codeigniter* xbap oscommerce cucumber mod-rewrite mysql* jpa* extjs semantic-web kohana* django* sqlalchemy cufon birt .htaccess inno-setup jira drupal* postscript swf* automapper ssas jms asterisk amazon-ecs ios* delphi* labview jvm* *payment* *dynamics* yahoo-pipes websphere* siebe |
View BloomFilter.cs
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 BloomFilter | |
{ | |
using System; | |
using System.Collections; | |
/// <summary> | |
/// Bloom filter. | |
/// </summary> | |
/// <typeparam name="T">Item type </typeparam> | |
public class Filter<T> |
NewerOlder