C# Class Blade.Utility.DataSourceHelper

Handles resolution of data source item(s) values for renderings
Based on a heavily modified/simplified version of John West's SC7 sublayout parameters prototype helper code: http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/05/Sitecore-7-Data-Sources-Part-6-Access-Multiple-Data-Source-Items-from-MVC-Views.aspx Thanks for all the work you've done for the community John :)
Show file Open project: kamsar/Blade

Public Methods

Method Description
ResolveDataSource ( string dataSource, System.Item contextItem ) : System.Item

Given a DataSource string (from the layout editor), resolves the item that refers to.

ResolveDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext ) : System.Item

Given a DataSource string (from the layout editor), resolves the item that refers to.

ResolveDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext, bool assertSingleItem ) : System.Item

Given a DataSource string (from the layout editor), resolves the item that refers to.

ResolveMultipleDataSource ( string dataSource, System.Item contextItem ) : System.Item[]

Given a DataSource string (from the layout editor), resolves the item(s) that refers to.

ResolveMultipleDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext ) : System.Item[]

Given a DataSource string (from the layout editor), resolves the item(s) that refers to.

ResolveMultipleDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext, bool assertSingleItem ) : System.Item[]

Given a DataSource string (from the layout editor), resolves the item(s) that refers to.

Private Methods

Method Description
RunPipeline ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext ) : System.Item[]

Invoke the ResolveRenderingDataSource pipeline to resolve the data source item

Method Details

ResolveDataSource() public static method

Given a DataSource string (from the layout editor), resolves the item that refers to.
public static ResolveDataSource ( string dataSource, System.Item contextItem ) : System.Item
dataSource string The string data source passed to the presentation component.
contextItem System.Item The context item for relative paths and specifying the database from which to retrieve other items.
return System.Item

ResolveDataSource() public static method

Given a DataSource string (from the layout editor), resolves the item that refers to.
public static ResolveDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext ) : System.Item
dataSource string The string data source passed to the presentation component.
contextItem System.Item The context item for relative paths and specifying the database from which to retrieve other items.
searchContext IProviderSearchContext The search context.
return System.Item

ResolveDataSource() public static method

Given a DataSource string (from the layout editor), resolves the item that refers to.
public static ResolveDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext, bool assertSingleItem ) : System.Item
dataSource string The string data source passed to the presentation component.
contextItem System.Item The context item for relative paths and specifying the database from which to retrieve other items.
searchContext IProviderSearchContext The search context.
assertSingleItem bool If true, an exception will be thrown if more than one item matches the data source spec
return System.Item

ResolveMultipleDataSource() public static method

Given a DataSource string (from the layout editor), resolves the item(s) that refers to.
public static ResolveMultipleDataSource ( string dataSource, System.Item contextItem ) : System.Item[]
dataSource string The string data source passed to the presentation component.
contextItem System.Item The context item for relative paths and specifying the database from which to retrieve other items.
return System.Item[]

ResolveMultipleDataSource() public static method

Given a DataSource string (from the layout editor), resolves the item(s) that refers to.
public static ResolveMultipleDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext ) : System.Item[]
dataSource string The string data source passed to the presentation component.
contextItem System.Item The context item for relative paths and specifying the database from which to retrieve other items.
searchContext IProviderSearchContext The search context.
return System.Item[]

ResolveMultipleDataSource() public static method

Given a DataSource string (from the layout editor), resolves the item(s) that refers to.
public static ResolveMultipleDataSource ( string dataSource, System.Item contextItem, IProviderSearchContext searchContext, bool assertSingleItem ) : System.Item[]
dataSource string The string data source passed to the presentation component.
contextItem System.Item The context item for relative paths and specifying the database from which to retrieve other items.
searchContext IProviderSearchContext The search context.
assertSingleItem bool If true, an exception will be thrown if more than one item matches the data source spec
return System.Item[]