namespace JSONAPI.Documents
{
///
/// A link that may be found in a "links object"
///
///
public interface ILink
{
///
/// a string containing the link's URL.
///
string Href { get; }
///
/// a meta object containing non-standard meta-information about the link.
///
IMetadata Metadata { get; }
}
///
/// Default implementation of ILink
///
public class Link : ILink
{
public string Href { get; private set; }
public IMetadata Metadata { get; private set; }
///
/// Constructs a link
///
/// The URL of the link
/// metadata about the link
public Link(string href, IMetadata metadata)
{
Href = href;
Metadata = metadata;
}
}
}