Skip to content

Instantly share code, notes, and snippets.

@ChuckSavage
ChuckSavage / XmlLinqConversionExtensions.cs
Created February 20, 2013 00:06
Convert To/From XmlDocument and XDocument/XElements
using System.Xml;
using System.Xml.Linq;
namespace XmlLib
{
/// <summary>
/// Provides extension methods for simple conversion between System.Xml and System.Xml.Linq classes.
/// </summary>
/// <remarks>From: http://brianary.blogspot.com/2010/02/converting-between-xdocument-and.html</remarks>
public static class XmlLinqConversionExtensions
@ChuckSavage
ChuckSavage / Paths.cs
Created February 10, 2013 18:59
Paths utility file for adding params to a string Combine.
public class Paths
{
/// <summary>
/// Apply Path.Combine(on path and list)
/// </summary>
/// <param name="path"></param>
/// <param name="list"></param>
/// <returns></returns>
public static string Combine(string path, params string[] list)
{
[DebuggerDisplay("{Title}, Desc({Description}), Link({Link})")]
public class Item
{
public Item(XElement x)
{
Title = x.Element("title").Value;
Description = x.Element("description").Value;
XElement link = x.Element("link");
if(null != link)
Link = link.Value;
@ChuckSavage
ChuckSavage / ViewExtensions.cs
Created June 6, 2012 19:58
MonoTouch Swipe Event
using System.Collections.Generic;
using MonoTouch.Foundation;
using MonoTouch.ObjCRuntime;
using MonoTouch.UIKit;
namespace iOSLib
{
public static class ViewExtensions
{
static Dictionary<UIView, Dictionary<UISwipeGestureRecognizerDirection, SwipeClass>>