C# Class Skybrud.LinkPicker.LinkPickerItem

Class representing a single link item.
Datei anzeigen Open project: skybrud/Skybrud.LinkPicker Class Usage Examples

Private Properties

Property Type Description
LinkPickerItem System

Public Methods

Method Description
GetFromContent ( IPublishedContent content ) : LinkPickerItem

Initializes a new link picker item from an instance of IPublishedContent representing a content item.

GetFromMedia ( IPublishedContent media ) : LinkPickerItem

Initializes a new link picker item from an instance of IPublishedContent representing a media item.

GetFromUrl ( string url, string name = null, string target = null ) : LinkPickerItem

Initializes a new link picker item from the specified url, name and target.

LinkPickerItem ( int id, string name, string url, string target, LinkPickerMode mode ) : System

Initializes a new link picker item.

Parse ( Newtonsoft.Json.Linq.JObject obj ) : LinkPickerItem

Parses the specified obj into an instance of LinkPickerItem.

Protected Methods

Method Description
GetCalculatedUrl ( ) : string

Private Methods

Method Description
LinkPickerItem ( ) : System

Method Details

GetCalculatedUrl() protected method

protected GetCalculatedUrl ( ) : string
return string

GetFromContent() public static method

Initializes a new link picker item from an instance of IPublishedContent representing a content item.
public static GetFromContent ( IPublishedContent content ) : LinkPickerItem
content IPublishedContent An instance of representing a content item.
return LinkPickerItem

GetFromMedia() public static method

Initializes a new link picker item from an instance of IPublishedContent representing a media item.
public static GetFromMedia ( IPublishedContent media ) : LinkPickerItem
media IPublishedContent An instance of representing a media item.
return LinkPickerItem

GetFromUrl() public static method

Initializes a new link picker item from the specified url, name and target.
public static GetFromUrl ( string url, string name = null, string target = null ) : LinkPickerItem
url string The URL of the link.
name string The name (text) of the link.
target string The target of the link.
return LinkPickerItem

LinkPickerItem() public method

Initializes a new link picker item.
public LinkPickerItem ( int id, string name, string url, string target, LinkPickerMode mode ) : System
id int The ID of the content or media item.
name string The name (text) of the link.
url string The URL of the link.
target string The target of the link.
mode LinkPickerMode The mode of the link - either , /// or .
return System

Parse() public static method

Parses the specified obj into an instance of LinkPickerItem.
public static Parse ( Newtonsoft.Json.Linq.JObject obj ) : LinkPickerItem
obj Newtonsoft.Json.Linq.JObject The instance of to be parsed.
return LinkPickerItem