Class RenderContext
Context used for rendering a media item
Inheritance
System.Object
RenderContext
Assembly: ImageVault.Common.dll
Syntax
public class RenderContext : Object
Constructors
RenderContext()
Declaration
RenderContext(Media)
Declaration
public RenderContext(Media media)
Parameters
Type |
Name |
Description |
Media |
media |
|
RenderContext(String)
Declaration
public RenderContext(string renderData)
Parameters
Type |
Name |
Description |
String |
renderData |
|
Properties
DefaultHtml
Default html to use in case no renderer is defined
Declaration
public string DefaultHtml { get; set; }
Property Value
ImageVaultUrl
Url to ImageVault instance
Declaration
public string ImageVaultUrl { get; }
Property Value
Keys
Declaration
public IEnumerable<string> Keys { get; }
Property Value
MediaKey
Declaration
public string MediaKey { get; }
Property Value
Name
Declaration
public string Name { get; }
Property Value
PublishedMedia
True if the renderer should produce links to published media
Declaration
public bool PublishedMedia { get; }
Property Value
Type |
Description |
System.Boolean |
|
RendererId
Declaration
public string RendererId { get; set; }
Property Value
Methods
CreateAuxiliaryContentUrl(String)
Creates an auxiliary content url
Declaration
public string CreateAuxiliaryContentUrl(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
CreateEmbedUrl()
Creates the url to the embed handler of the current media
Declaration
public string CreateEmbedUrl()
Returns
CreateMediaEndpointUrl(String)
Creates an url to the supplied media
Declaration
public string CreateMediaEndpointUrl(string mediaKeyAndName)
Parameters
Type |
Name |
Description |
String |
mediaKeyAndName |
|
Returns
ExportRenderData()
Declaration
public string ExportRenderData()
Returns
Get(ContextKey)
Gets the value associated with the supplied key
Declaration
public string Get(ContextKey key)
Parameters
Returns
Get(String)
Gets the value associated with the supplied key
Declaration
public string Get(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Returns
Get<T>(ContextKey, T)
Declaration
public T Get<T>(ContextKey key, T defaultValue = null)
Parameters
Type |
Name |
Description |
ContextKey |
key |
|
T |
defaultValue |
|
Returns
Type Parameters
Get<T>(String, T)
Declaration
public T Get<T>(string key, T defaultValue = null)
Parameters
Type |
Name |
Description |
String |
key |
|
T |
defaultValue |
|
Returns
Type Parameters
ImportRenderData(String)
Imports and replaces the current data
Declaration
public void ImportRenderData(string renderData)
Parameters
Type |
Name |
Description |
String |
renderData |
|
Set(ContextKey, Boolean)
Sets the supplied key to a boolean value
Declaration
public void Set(ContextKey key, bool value = true)
Parameters
Type |
Name |
Description |
ContextKey |
key |
|
System.Boolean |
value |
The value to set, defaults to true
|
Set(ContextKey, Object)
Sets the supplied key/value pair of the context
Declaration
public void Set(ContextKey key, object value)
Parameters
Type |
Name |
Description |
ContextKey |
key |
Key of the pair
|
System.Object |
value |
Value of the pair
|
Set(String, Boolean)
Sets the supplied key to a boolean value
Declaration
public void Set(string key, bool value = true)
Parameters
Type |
Name |
Description |
String |
key |
|
System.Boolean |
value |
The value to set, defaults to true
|
Set(String, Object)
Sets the supplied key/value pair of the context
Declaration
public void Set(string key, object value)
Parameters
Type |
Name |
Description |
String |
key |
Key of the pair
|
System.Object |
value |
Value of the pair
|
UpdateFromDictionary(IDictionary<String, String>)
Declaration
public void UpdateFromDictionary(IDictionary<string, string> dict)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<String, String> |
dict |
|
UpdateFromNameValueCollection(NameValueCollection)
Declaration
public void UpdateFromNameValueCollection(NameValueCollection qs)
Parameters
Type |
Name |
Description |
System.Collections.Specialized.NameValueCollection |
qs |
|
UpdateFromUrl(String)
Declaration
public void UpdateFromUrl(string mediaUrl)
Parameters
Type |
Name |
Description |
String |
mediaUrl |
|
Exceptions
Extension Methods