Class ElementProxyExtensions
Extension methods for element proxies.
Inheritance
System.Object
ElementProxyExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Hypar.Elements.dll
Syntax
public static class ElementProxyExtensions
Methods
Elements<T>(IEnumerable<ElementProxy<T>>)
Returns a list of element proxies' element references. Assumes they have already been hydrated.
Declaration
public static IEnumerable<T> Elements<T>(this IEnumerable<ElementProxy<T>> proxies)
where T : Element
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ElementProxy<T>> |
proxies |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
Hydrate<T>(IEnumerable<ElementProxy<T>>, Dictionary<String, Model>)
Re-populate a list of element proxies' element references.
Declaration
public static IEnumerable<T> Hydrate<T>(this IEnumerable<ElementProxy<T>> proxies, Dictionary<string, Model> models)
where T : Element
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ElementProxy<T>> |
proxies |
|
System.Collections.Generic.Dictionary<System.String, Model> |
models |
Keyed dictionary of available models to search for the element reference in.
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
Proxies<T>(IEnumerable<T>, String)
Create or get proxies for a list of elements.
Declaration
public static IEnumerable<ElementProxy<T>> Proxies<T>(this IEnumerable<T> elements, string dependencyName)
where T : Element
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
elements |
|
System.String |
dependencyName |
The name of the dependency these elements came from. The assumption is that we only need proxies for elements from dependencies.
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ElementProxy<T>> |
|
Type Parameters
Proxy<T>(T, String)
Create a proxy for this element, or get the existing proxy already created for this element if it exists.
Declaration
public static ElementProxy<T> Proxy<T>(this T element, string dependencyName)
where T : Element
Parameters
Type |
Name |
Description |
T |
element |
|
System.String |
dependencyName |
The name of the dependency this element came from. The assumption is that we only need proxies for elements from dependencies.
|
Returns
Type Parameters
Proxy<T>(IEnumerable<ElementProxy<T>>, T)
Grab the proxy for an element from a list of proxies.
Declaration
public static ElementProxy<T> Proxy<T>(this IEnumerable<ElementProxy<T>> proxies, T element)
where T : Element
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ElementProxy<T>> |
proxies |
Proxies to search for teh element in.
|
T |
element |
The element to find a proxy for.
|
Returns
Type Parameters