C++ C#

Semata.Lazy

API Reference

Provides properties that are only initialized when accessed

Structs

Name Description
LazyValue<T>

Allows a value to be set by a supplied initializer the first time it is accessed. The value maybe reset, so that any further access will cause it to be initialized again. LazyValue is read only

Interfaces

Name Description
INotifyPropertySourceChanged

Notifies clients that a changed has occured

Classes

Name Description
LazyList<T>

Provides a list that is populated, by a supplied loader, the first time it is accessed. The list maybe reloaded. When a list is reloaded, the existing list is not cleared, but passed to the loader allowing it to merge in new data, rather than clear and repopulate. The loader takes a List of type T and boolean as arguments. The boolean indicates whether or not events should be raised as the list is loaded.

LazyProperty<T>

Allows a property to be used in a Lazy manner. Its value is initialized by a the propertyGet delegate the first time it is accessed. The source needs to implement INotifyPropertySourceChanged, and raise PropertySourceChanged when the value needs to be reinitialized. Once the value is initialized, LazyProperty susbscribes to the source's PropertySourceChanged event. When this event, with the correct name, is received, the value is retrived once again by propertyGet If a propertySet delegate is provided LazyProperty is read/write. Otherwise it is readonly. There is an option to provide a delegate that is called when PropertySourceChanged is received.

Exceptions

This website stores cookies on your computer that are used to manage the order in which you see the pages. To find out more about the cookies we use, see our Privacy Policy.