Class ElementProxy<T>
Proxy for an element from another function. This is used to attach additional information to upstream elements. Proxies created via Element.Proxy() are intended to be reused, so we are not creating multiple proxies for each element. Proxies deserialized from other functions are not added to the current proxy cache, so that each function will create its own, new proxies for each element.
Implements
Inherited Members
Namespace: Elements
Assembly: Hypar.Elements.dll
Syntax
public class ElementProxy<T> : Element, INotifyPropertyChanged where T : Element
Type Parameters
Name | Description |
---|---|
T |
Properties
Dependency
Dependency string for the dependency that this element came from.
Declaration
[JsonProperty("dependency")]
public string Dependency { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Element
Original element that the proxy refers to. If null, the element needs to be hydrated.
Declaration
[JsonIgnore]
public T Element { get; }
Property Value
Type | Description |
---|---|
T |
ElementId
ID of element that this is a proxy for.
Declaration
[JsonProperty("elementId")]
public Guid ElementId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Methods
Hydrate(Dictionary<String, Model>)
Re-populate the element reference in a proxy if it is missing. Does nothing if it is already populated.
Declaration
public T Hydrate(Dictionary<string, Model> models)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, Model> | models | Keyed dictionary of available models to search for the element reference in. |
Returns
Type | Description |
---|---|
T |