Skip to content

Instantly share code, notes, and snippets.

@vbedegi
vbedegi / BrokenSwitch.coffee
Created September 24, 2011 07:19
Web Workbench won't compile this code. Something about the switch
class SomeClass
someMethod: ->
x = 42
switch x
when 41
alert 'less'
when 43
alert 'more'
@vbedegi
vbedegi / Demo.cs
Created July 6, 2011 19:49
ReadLinesFromTextFile
@"c:\textfile.txt".ReadLinesFromTextFile().Where(x => x.Length > 10)
@vbedegi
vbedegi / gist:984694
Created May 21, 2011 17:10
SimpleCursorAdapter - Android
String[] columns = new String[]{"columnA", "columnB", "columnC"};
int[] widgets = new int[]{R.id.widgetA, R.id.widgetB, R.id.widgetC};
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.list_item, cursor, columns, widgets);
[Test]
public void CreateClassProxyWithTarget_Uses_The_Provided_Options()
{
var proxyGenerator = new ProxyGenerator();
var options = new ProxyGenerationOptions();
options.AddMixinInstance(new SimpleMixin());
var target = new SimpleClassWithProperty();
var proxy = proxyGenerator.CreateClassProxyWithTarget(target, options);