Skip to content

Instantly share code, notes, and snippets.

@glennblock
Created January 8, 2012 06:35
Show Gist options
  • Save glennblock/1577486 to your computer and use it in GitHub Desktop.
Save glennblock/1577486 to your computer and use it in GitHub Desktop.
Web Api - Linkable
public interface ILinkable<T> {
T Instance {get;}
IList<Link> Links {get;}
}
public interface ILinkableCollection<T> : IList<ILinkable<T>> {
IList<Link> Links {get;}
void Add(string name, Uri uri, string rel="");
}
public class Link {
public Uri Uri {get;set;}
public string Rel {get;set;}
public string Name {get;set;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment