Skip to content

Instantly share code, notes, and snippets.

View brendanzagaeski's full-sized avatar

Brendan Zagaeski brendanzagaeski

  • Microsoft
  • Boston, MA, United States
View GitHub Profile
@brendanzagaeski
brendanzagaeski / System.Runtime.Serialization.patch
Created October 23, 2013 19:17
Proposed fixes for bugs in System.Runtime.Serialization
diff --git a/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs b/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
index f3c707e..8e713d7 100755
--- a/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
+++ b/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs
@@ -248,8 +248,10 @@ namespace System.Runtime.Serialization
return;
Type elementType = type;
- if (type.HasElementType)
+ if (type.HasElementType) {
@brendanzagaeski
brendanzagaeski / desc.xml
Created October 14, 2013 18:25
Preserve WebConfigurationHost constructors during linking
<linker>
<assembly fullname="System.Web">
<type fullname="System.Web.Configuration.WebConfigurationHost">
<method name=".ctor" />
</type>
</assembly>
</linker>
@brendanzagaeski
brendanzagaeski / desc.xml
Created September 18, 2013 15:26
XML descriptor file to preserve MonoTouch.GLKit.GLKView
<linker>
<assembly fullname="monotouch">
<type fullname="MonoTouch.GLKit.GLKView" />
</assembly>
</linker>
@brendanzagaeski
brendanzagaeski / gist:6547582
Created September 13, 2013 07:16
Work-around for incorrectly generated abstract Next() method
using System;
using Android.Runtime;
namespace Com.Nostra13.Universalimageloader.Core.Assist.Deque
{
public partial class LinkedBlockingDeque
{
public partial class DescendingItr
{
static IntPtr id_next;
@brendanzagaeski
brendanzagaeski / gist:6237091
Created August 15, 2013 00:12
Some command line piping using `monodis` to find files that reference outdated, unsigned `monotouch` assemblies.
find . -iname '*.dll' | while read FILE; do monodis --assemblyref "$FILE" | sed -n '/monotouch/ { N; N; p; }' | grep -iq 'Zero sized public key' && echo "$FILE"; done
@brendanzagaeski
brendanzagaeski / CustomRootElement.cs
Created August 8, 2013 03:00
A custom RootElement subclass to detect when the TableView has scrolled past "maxRows", and so should load more rows
using System;
using MonoTouch.Dialog;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
namespace MTDialogViewControllerTest
{
public class CustomRootElement : RootElement
{
public CustomRootElement (string caption, Group group) : base (caption, group)